@fluidframework/fluid-static 2.0.0-dev.1.3.0.96595 → 2.0.0-dev.1.4.5.105745
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/dist/fluidContainer.d.ts +66 -63
- package/dist/fluidContainer.d.ts.map +1 -1
- package/dist/fluidContainer.js +2 -7
- package/dist/fluidContainer.js.map +1 -1
- package/dist/rootDataObject.d.ts +10 -18
- package/dist/rootDataObject.d.ts.map +1 -1
- package/dist/rootDataObject.js +8 -15
- package/dist/rootDataObject.js.map +1 -1
- package/dist/serviceAudience.d.ts +13 -25
- package/dist/serviceAudience.d.ts.map +1 -1
- package/dist/serviceAudience.js +12 -23
- package/dist/serviceAudience.js.map +1 -1
- package/dist/types.d.ts +69 -75
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/lib/fluidContainer.d.ts +66 -63
- package/lib/fluidContainer.d.ts.map +1 -1
- package/lib/fluidContainer.js +2 -7
- package/lib/fluidContainer.js.map +1 -1
- package/lib/rootDataObject.d.ts +10 -18
- package/lib/rootDataObject.d.ts.map +1 -1
- package/lib/rootDataObject.js +8 -15
- package/lib/rootDataObject.js.map +1 -1
- package/lib/serviceAudience.d.ts +13 -25
- package/lib/serviceAudience.d.ts.map +1 -1
- package/lib/serviceAudience.js +12 -23
- package/lib/serviceAudience.js.map +1 -1
- package/lib/types.d.ts +69 -75
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +15 -35
- package/src/fluidContainer.ts +66 -70
- package/src/rootDataObject.ts +10 -18
- package/src/serviceAudience.ts +13 -25
- package/src/types.ts +69 -80
package/dist/fluidContainer.d.ts
CHANGED
|
@@ -10,38 +10,64 @@ import { LoadableObjectClass, LoadableObjectRecord } from "./types";
|
|
|
10
10
|
import { RootDataObject } from "./rootDataObject";
|
|
11
11
|
/**
|
|
12
12
|
* Events emitted from {@link IFluidContainer}.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
*
|
|
16
|
+
* The following is the list of events emitted.
|
|
17
|
+
*
|
|
18
|
+
* ### "connected"
|
|
19
|
+
*
|
|
20
|
+
* The "connected" event is emitted when the `IFluidContainer` completes connecting to the Fluid service.
|
|
21
|
+
*
|
|
22
|
+
* #### Listener signature
|
|
23
|
+
*
|
|
24
|
+
* ```typescript
|
|
25
|
+
* () => void;
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* ### "dispose"
|
|
29
|
+
*
|
|
30
|
+
* The "dispose" event is emitted when the `IFluidContainer` is disposed, which permanently disables it.
|
|
31
|
+
*
|
|
32
|
+
* #### Listener signature
|
|
33
|
+
*
|
|
34
|
+
* ```typescript
|
|
35
|
+
* () => void;
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* ### "disconnected"
|
|
39
|
+
*
|
|
40
|
+
* The "disconnected" event is emitted when the `IFluidContainer` becomes disconnected from the Fluid service.
|
|
41
|
+
*
|
|
42
|
+
* #### Listener signature
|
|
43
|
+
*
|
|
44
|
+
* ```typescript
|
|
45
|
+
* () => void;
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* ### "saved"
|
|
49
|
+
*
|
|
50
|
+
* The "saved" event is emitted when the `IFluidContainer` has local changes acknowledged by the service.
|
|
51
|
+
*
|
|
52
|
+
* #### Listener signature
|
|
53
|
+
*
|
|
54
|
+
* ```typescript
|
|
55
|
+
* () => void
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* ### "dirty"
|
|
59
|
+
*
|
|
60
|
+
* The "dirty" event is emitted when the `IFluidContainer` has local changes that have not yet
|
|
61
|
+
* been acknowledged by the service.
|
|
62
|
+
*
|
|
63
|
+
* #### Listener signature
|
|
64
|
+
*
|
|
65
|
+
* ```typescript
|
|
66
|
+
* () => void
|
|
67
|
+
* ```
|
|
13
68
|
*/
|
|
14
69
|
export interface IFluidContainerEvents extends IEvent {
|
|
15
|
-
|
|
16
|
-
* Emitted when the {@link IFluidContainer} completes connecting to the Fluid service.
|
|
17
|
-
*
|
|
18
|
-
* @eventProperty
|
|
19
|
-
*/
|
|
20
|
-
(event: "connected", listener: () => void): void;
|
|
21
|
-
/**
|
|
22
|
-
* Emitted when the {@link IFluidContainer} is disposed, which permanently disables it.
|
|
23
|
-
*
|
|
24
|
-
* @eventProperty
|
|
25
|
-
*/
|
|
26
|
-
(event: "dispose", listener: () => void): void;
|
|
27
|
-
/**
|
|
28
|
-
* Emitted when the {@link IFluidContainer} becomes disconnected from the Fluid service.
|
|
29
|
-
*
|
|
30
|
-
* @eventProperty
|
|
31
|
-
*/
|
|
32
|
-
(event: "disconnected", listener: () => void): void;
|
|
33
|
-
/**
|
|
34
|
-
* Emitted when all of the {@link IFluidContainer}'s local changes have been acknowledged by the service.
|
|
35
|
-
*
|
|
36
|
-
* @eventProperty
|
|
37
|
-
*/
|
|
38
|
-
(event: "saved", listener: () => void): void;
|
|
39
|
-
/**
|
|
40
|
-
* Emitted when the {@link IFluidContainer} has local changes that have not yet been acknowledged by the service.
|
|
41
|
-
*
|
|
42
|
-
* @eventProperty
|
|
43
|
-
*/
|
|
44
|
-
(event: "dirty", listener: () => void): void;
|
|
70
|
+
(event: "connected" | "dispose" | "disconnected" | "saved" | "dirty", listener: () => void): void;
|
|
45
71
|
}
|
|
46
72
|
/**
|
|
47
73
|
* Provides an entrypoint into the client side of collaborative Fluid data.
|
|
@@ -54,9 +80,6 @@ export interface IFluidContainer extends IEventProvider<IFluidContainerEvents> {
|
|
|
54
80
|
readonly connectionState: ConnectionState;
|
|
55
81
|
/**
|
|
56
82
|
* A container is considered **dirty** if it has local changes that have not yet been acknowledged by the service.
|
|
57
|
-
*
|
|
58
|
-
* @remarks
|
|
59
|
-
*
|
|
60
83
|
* You should always check the `isDirty` flag before closing the container or navigating away from the page.
|
|
61
84
|
* Closing the container while `isDirty === true` may result in the loss of operations that have not yet been
|
|
62
85
|
* acknowledged by the service.
|
|
@@ -74,21 +97,16 @@ export interface IFluidContainer extends IEventProvider<IFluidContainerEvents> {
|
|
|
74
97
|
*/
|
|
75
98
|
readonly isDirty: boolean;
|
|
76
99
|
/**
|
|
77
|
-
* Whether
|
|
100
|
+
* Whether the container is disposed, which permanently disables it.
|
|
78
101
|
*/
|
|
79
102
|
readonly disposed: boolean;
|
|
80
103
|
/**
|
|
81
104
|
* The collection of data objects and Distributed Data Stores (DDSes) that were specified by the schema.
|
|
82
|
-
*
|
|
83
|
-
* @remarks These data objects and DDSes exist for the lifetime of the container.
|
|
105
|
+
* These data objects and DDSes exist for the lifetime of the container.
|
|
84
106
|
*/
|
|
85
107
|
readonly initialObjects: LoadableObjectRecord;
|
|
86
108
|
/**
|
|
87
|
-
* The current attachment state of the container.
|
|
88
|
-
*
|
|
89
|
-
* @remarks
|
|
90
|
-
*
|
|
91
|
-
* Once a container has been attached, it remains attached.
|
|
109
|
+
* The current attachment state of the container. Once a container has been attached, it remains attached.
|
|
92
110
|
* When loading an existing container, it will already be attached.
|
|
93
111
|
*/
|
|
94
112
|
readonly attachState: AttachState;
|
|
@@ -96,9 +114,7 @@ export interface IFluidContainer extends IEventProvider<IFluidContainerEvents> {
|
|
|
96
114
|
* A newly created container starts detached from the collaborative service.
|
|
97
115
|
* Calling `attach()` uploads the new container to the service and connects to the collaborative service.
|
|
98
116
|
*
|
|
99
|
-
* @remarks
|
|
100
|
-
*
|
|
101
|
-
* This should only be called when the container is in the
|
|
117
|
+
* @remarks This should only be called when the container is in the
|
|
102
118
|
* {@link @fluidframework/container-definitions#AttachState.Detatched} state.
|
|
103
119
|
*
|
|
104
120
|
* This can be determined by observing {@link IFluidContainer.attachState}.
|
|
@@ -110,9 +126,7 @@ export interface IFluidContainer extends IEventProvider<IFluidContainerEvents> {
|
|
|
110
126
|
* Attempts to connect the container to the delta stream and process operations.
|
|
111
127
|
* Will throw an error if unsuccessful.
|
|
112
128
|
*
|
|
113
|
-
* @remarks
|
|
114
|
-
*
|
|
115
|
-
* This should only be called when the container is in the
|
|
129
|
+
* @remarks This should only be called when the container is in the
|
|
116
130
|
* {@link @fluidframework/container-definitions#ConnectionState.Disconnected} state.
|
|
117
131
|
*
|
|
118
132
|
* This can be determined by observing {@link IFluidContainer.connectionState}.
|
|
@@ -121,9 +135,7 @@ export interface IFluidContainer extends IEventProvider<IFluidContainerEvents> {
|
|
|
121
135
|
/**
|
|
122
136
|
* Disconnects the container from the delta stream and stops processing operations.
|
|
123
137
|
*
|
|
124
|
-
* @remarks
|
|
125
|
-
*
|
|
126
|
-
* This should only be called when the container is in the
|
|
138
|
+
* @remarks This should only be called when the container is in the
|
|
127
139
|
* {@link @fluidframework/container-definitions#ConnectionState.Connected} state.
|
|
128
140
|
*
|
|
129
141
|
* This can be determined by observing {@link IFluidContainer.connectionState}.
|
|
@@ -132,15 +144,11 @@ export interface IFluidContainer extends IEventProvider<IFluidContainerEvents> {
|
|
|
132
144
|
/**
|
|
133
145
|
* Create a new data object or Distributed Data Store (DDS) of the specified type.
|
|
134
146
|
*
|
|
135
|
-
* @remarks
|
|
136
|
-
*
|
|
137
|
-
* In order to share the data object or DDS with other
|
|
147
|
+
* @remarks In order to share the data object or DDS with other
|
|
138
148
|
* collaborators and retrieve it later, store its handle in a collection like a SharedDirectory from your
|
|
139
149
|
* initialObjects.
|
|
140
150
|
*
|
|
141
|
-
* @param objectClass - The class of
|
|
142
|
-
*
|
|
143
|
-
* @typeParam T - The class of the `DataObject` or `SharedObject`.
|
|
151
|
+
* @param objectClass - The class of data object or DDS to create
|
|
144
152
|
*/
|
|
145
153
|
create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T>;
|
|
146
154
|
/**
|
|
@@ -151,9 +159,7 @@ export interface IFluidContainer extends IEventProvider<IFluidContainerEvents> {
|
|
|
151
159
|
/**
|
|
152
160
|
* Base {@link IFluidContainer} implementation.
|
|
153
161
|
*
|
|
154
|
-
* @remarks
|
|
155
|
-
*
|
|
156
|
-
* Note: this implementation is not complete. Consumers who rely on {@link IFluidContainer.attach}
|
|
162
|
+
* @remarks Note: this implementation is not complete. Consumers who rely on {@link IFluidContainer.attach}
|
|
157
163
|
* will need to utilize or provide a service-specific implementation of this type that implements that method.
|
|
158
164
|
*/
|
|
159
165
|
export declare class FluidContainer extends TypedEventEmitter<IFluidContainerEvents> implements IFluidContainer {
|
|
@@ -187,10 +193,7 @@ export declare class FluidContainer extends TypedEventEmitter<IFluidContainerEve
|
|
|
187
193
|
get initialObjects(): LoadableObjectRecord;
|
|
188
194
|
/**
|
|
189
195
|
* Incomplete base implementation of {@link IFluidContainer.attach}.
|
|
190
|
-
*
|
|
191
|
-
* @remarks
|
|
192
|
-
*
|
|
193
|
-
* Note: this implementation will unconditionally throw.
|
|
196
|
+
* @remarks Note: this implementation will unconditionally throw.
|
|
194
197
|
* Consumers who rely on this will need to utilize or provide a service specific implementation of this base type
|
|
195
198
|
* that provides an implementation of this method.
|
|
196
199
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidContainer.d.ts","sourceRoot":"","sources":["../src/fluidContainer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"fluidContainer.d.ts","sourceRoot":"","sources":["../src/fluidContainer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE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AAO,IAAI,IAAI,CAAC;CACnB;AAED;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,iBAAiB,CAAC,qBAAqB,CAAE,YAAW,eAAe;IAQ/F,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,cAAc;IARnC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAgC;IACjE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAmC;IACvE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA+B;IAC/D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4B;IACzD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4B;gBAGpC,SAAS,EAAE,UAAU,EACrB,cAAc,EAAE,cAAc;IAUnD;;OAEG;IACF,IAAW,OAAO,IAAI,OAAO,CAE7B;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,WAAW,CAEpC;IAED;;OAEG;IACH,IAAW,QAAQ,YAElB;IAED;;OAEG;IACF,IAAW,eAAe,IAAI,eAAe,CAE7C;IAED;;OAEG;IACH,IAAW,cAAc,yBAExB;IAED;;;;;;;;OAQG;IACU,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;IAItC;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrC;;OAEG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxC;;OAEG;IACU,MAAM,CAAC,CAAC,SAAS,cAAc,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAI9F;;OAEG;IACI,OAAO;CAQjB"}
|
package/dist/fluidContainer.js
CHANGED
|
@@ -9,9 +9,7 @@ const common_utils_1 = require("@fluidframework/common-utils");
|
|
|
9
9
|
/**
|
|
10
10
|
* Base {@link IFluidContainer} implementation.
|
|
11
11
|
*
|
|
12
|
-
* @remarks
|
|
13
|
-
*
|
|
14
|
-
* Note: this implementation is not complete. Consumers who rely on {@link IFluidContainer.attach}
|
|
12
|
+
* @remarks Note: this implementation is not complete. Consumers who rely on {@link IFluidContainer.attach}
|
|
15
13
|
* will need to utilize or provide a service-specific implementation of this type that implements that method.
|
|
16
14
|
*/
|
|
17
15
|
class FluidContainer extends common_utils_1.TypedEventEmitter {
|
|
@@ -62,10 +60,7 @@ class FluidContainer extends common_utils_1.TypedEventEmitter {
|
|
|
62
60
|
}
|
|
63
61
|
/**
|
|
64
62
|
* Incomplete base implementation of {@link IFluidContainer.attach}.
|
|
65
|
-
*
|
|
66
|
-
* @remarks
|
|
67
|
-
*
|
|
68
|
-
* Note: this implementation will unconditionally throw.
|
|
63
|
+
* @remarks Note: this implementation will unconditionally throw.
|
|
69
64
|
* Consumers who rely on this will need to utilize or provide a service specific implementation of this base type
|
|
70
65
|
* that provides an implementation of this method.
|
|
71
66
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidContainer.js","sourceRoot":"","sources":["../src/fluidContainer.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,+DAAiE;AAqKjE;;;;;;;GAOG;AACH,MAAa,cAAe,SAAQ,gCAAwC;IAOxE,YACqB,SAAqB,EACrB,cAA8B;QAE/C,KAAK,EAAE,CAAC;QAHS,cAAS,GAAT,SAAS,CAAY;QACrB,mBAAc,GAAd,cAAc,CAAgB;QARlC,qBAAgB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChD,wBAAmB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACtD,oBAAe,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC9C,iBAAY,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxC,iBAAY,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,C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AC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IAED;;OAEG;IACI,OAAO;QACV,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACnD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC7D,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACnD,CAAC;CACJ;AAtGD,wCAsGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { TypedEventEmitter } from \"@fluidframework/common-utils\";\nimport { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport { AttachState, IContainer, ConnectionState } from \"@fluidframework/container-definitions\";\nimport { LoadableObjectClass, LoadableObjectRecord } from \"./types\";\nimport { RootDataObject } from \"./rootDataObject\";\n\n/**\n * Events emitted from {@link IFluidContainer}.\n */\nexport interface IFluidContainerEvents extends IEvent {\n /* eslint-disable @typescript-eslint/unified-signatures */\n /**\n * Emitted when the {@link IFluidContainer} completes connecting to the Fluid service.\n *\n * @eventProperty\n */\n (event: \"connected\", listener: () => void): void;\n\n /**\n * Emitted when the {@link IFluidContainer} is disposed, which permanently disables it.\n *\n * @eventProperty\n */\n (event: \"dispose\", listener: () => void): void;\n\n /**\n * Emitted when the {@link IFluidContainer} becomes disconnected from the Fluid service.\n *\n * @eventProperty\n */\n (event: \"disconnected\", listener: () => void): void;\n\n /**\n * Emitted when all of the {@link IFluidContainer}'s local changes have been acknowledged by the service.\n *\n * @eventProperty\n */\n (event: \"saved\", listener: () => void): void;\n\n /**\n * Emitted when the {@link IFluidContainer} has local changes that have not yet been acknowledged by the service.\n *\n * @eventProperty\n */\n (event: \"dirty\", listener: () => void): void;\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n}\n\n/**\n * Provides an entrypoint into the client side of collaborative Fluid data.\n * Provides access to the data as well as status on the collaboration session.\n */\nexport interface IFluidContainer extends IEventProvider<IFluidContainerEvents> {\n /**\n * Provides the current connected state of the container\n */\n readonly connectionState: ConnectionState;\n\n /**\n * A container is considered **dirty** if it has local changes that have not yet been acknowledged by the service.\n *\n * @remarks\n *\n * You should always check the `isDirty` flag before closing the container or navigating away from the page.\n * Closing the container while `isDirty === true` may result in the loss of operations that have not yet been\n * acknowledged by the service.\n *\n * A container is considered dirty in the following cases:\n *\n * 1. The container has been created in the detached state, and either it has not been attached yet or it is\n * in the process of being attached (container is in `attaching` state). If container is closed prior to being\n * attached, host may never know if the file was created or not.\n *\n * 2. The container was attached, but it has local changes that have not yet been saved to service endpoint.\n * This occurs as part of normal op flow where pending operation (changes) are awaiting acknowledgement from the\n * service. In some cases this can be due to lack of network connection. If the network connection is down,\n * it needs to be restored for the pending changes to be acknowledged.\n */\n readonly isDirty: boolean;\n\n /**\n * Whether or not the container is disposed, which permanently disables it.\n */\n readonly disposed: boolean;\n\n /**\n * The collection of data objects and Distributed Data Stores (DDSes) that were specified by the schema.\n *\n * @remarks These data objects and DDSes exist for the lifetime of the container.\n */\n readonly initialObjects: LoadableObjectRecord;\n\n /**\n * The current attachment state of the container.\n *\n * @remarks\n *\n * Once a container has been attached, it remains attached.\n * When loading an existing container, it will already be attached.\n */\n readonly attachState: AttachState;\n\n /**\n * A newly created container starts detached from the collaborative service.\n * Calling `attach()` uploads the new container to the service and connects to the collaborative service.\n *\n * @remarks\n *\n * This should only be called when the container is in the\n * {@link @fluidframework/container-definitions#AttachState.Detatched} state.\n *\n * This can be determined by observing {@link IFluidContainer.attachState}.\n *\n * @returns A promise which resolves when the attach is complete, with the string identifier of the container.\n */\n attach(): Promise<string>;\n\n /**\n * Attempts to connect the container to the delta stream and process operations.\n * Will throw an error if unsuccessful.\n *\n * @remarks\n *\n * This should only be called when the container is in the\n * {@link @fluidframework/container-definitions#ConnectionState.Disconnected} state.\n *\n * This can be determined by observing {@link IFluidContainer.connectionState}.\n */\n connect(): void;\n\n /**\n * Disconnects the container from the delta stream and stops processing operations.\n *\n * @remarks\n *\n * This should only be called when the container is in the\n * {@link @fluidframework/container-definitions#ConnectionState.Connected} state.\n *\n * This can be determined by observing {@link IFluidContainer.connectionState}.\n */\n disconnect(): void;\n\n /**\n * Create a new data object or Distributed Data Store (DDS) of the specified type.\n *\n * @remarks\n *\n * In order to share the data object or DDS with other\n * collaborators and retrieve it later, store its handle in a collection like a SharedDirectory from your\n * initialObjects.\n *\n * @param objectClass - The class of the `DataObject` or `SharedObject` to create.\n *\n * @typeParam T - The class of the `DataObject` or `SharedObject`.\n */\n create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T>;\n\n /**\n * Dispose of the container instance, permanently disabling it.\n */\n dispose(): void;\n}\n\n/**\n * Base {@link IFluidContainer} implementation.\n *\n * @remarks\n *\n * Note: this implementation is not complete. Consumers who rely on {@link IFluidContainer.attach}\n * will need to utilize or provide a service-specific implementation of this type that implements that method.\n */\nexport class FluidContainer extends TypedEventEmitter<IFluidContainerEvents> implements IFluidContainer {\n private readonly connectedHandler = () => this.emit(\"connected\");\n private readonly disconnectedHandler = () => this.emit(\"disconnected\");\n private readonly disposedHandler = () => this.emit(\"disposed\");\n private readonly savedHandler = () => this.emit(\"saved\");\n private readonly dirtyHandler = () => this.emit(\"dirty\");\n\n public constructor(\n private readonly container: IContainer,\n private readonly rootDataObject: RootDataObject,\n ) {\n super();\n container.on(\"connected\", this.connectedHandler);\n container.on(\"closed\", this.disposedHandler);\n container.on(\"disconnected\", this.disconnectedHandler);\n container.on(\"saved\", this.savedHandler);\n container.on(\"dirty\", this.dirtyHandler);\n }\n\n /**\n * {@inheritDoc IFluidContainer.isDirty}\n */\n public get isDirty(): boolean {\n return this.container.isDirty;\n }\n\n /**\n * {@inheritDoc IFluidContainer.attachState}\n */\n public get attachState(): AttachState {\n return this.container.attachState;\n }\n\n /**\n * {@inheritDoc IFluidContainer.disposed}\n */\n public get disposed() {\n return this.container.closed;\n }\n\n /**\n * {@inheritDoc IFluidContainer.connectionState}\n */\n public get connectionState(): ConnectionState {\n return this.container.connectionState;\n }\n\n /**\n * {@inheritDoc IFluidContainer.initialObjects}\n */\n public get initialObjects() {\n return this.rootDataObject.initialObjects;\n }\n\n /**\n * Incomplete base implementation of {@link IFluidContainer.attach}.\n *\n * @remarks\n *\n * Note: this implementation will unconditionally throw.\n * Consumers who rely on this will need to utilize or provide a service specific implementation of this base type\n * that provides an implementation of this method.\n *\n * The reason is because externally we are presenting a separation between the service and the `FluidContainer`,\n * but internally this separation is not there.\n */\n public async attach(): Promise<string> {\n throw new Error(\"Cannot attach container. Container is not in detached state\");\n }\n\n /**\n * {@inheritDoc IFluidContainer.connect}\n */\n public async connect(): Promise<void> {\n this.container.connect?.();\n }\n\n /**\n * {@inheritDoc IFluidContainer.connect}\n */\n public async disconnect(): Promise<void> {\n this.container.disconnect?.();\n }\n\n /**\n * {@inheritDoc IFluidContainer.create}\n */\n public async create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T> {\n return this.rootDataObject.create(objectClass);\n }\n\n /**\n * {@inheritDoc IFluidContainer.dispose}\n */\n public dispose() {\n this.container.close();\n this.container.off(\"connected\", this.connectedHandler);\n this.container.off(\"closed\", this.disposedHandler);\n this.container.off(\"disconnected\", this.disconnectedHandler);\n this.container.off(\"saved\", this.savedHandler);\n this.container.off(\"dirty\", this.dirtyHandler);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"fluidContain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mGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { TypedEventEmitter } from \"@fluidframework/common-utils\";\nimport { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport { AttachState, IContainer, ConnectionState } from \"@fluidframework/container-definitions\";\nimport { LoadableObjectClass, LoadableObjectRecord } from \"./types\";\nimport { RootDataObject } from \"./rootDataObject\";\n\n/**\n * Events emitted from {@link IFluidContainer}.\n *\n * @remarks\n *\n * The following is the list of events emitted.\n *\n * ### \"connected\"\n *\n * The \"connected\" event is emitted when the `IFluidContainer` completes connecting to the Fluid service.\n *\n * #### Listener signature\n *\n * ```typescript\n * () => void;\n * ```\n *\n * ### \"dispose\"\n *\n * The \"dispose\" event is emitted when the `IFluidContainer` is disposed, which permanently disables it.\n *\n * #### Listener signature\n *\n * ```typescript\n * () => void;\n * ```\n *\n * ### \"disconnected\"\n *\n * The \"disconnected\" event is emitted when the `IFluidContainer` becomes disconnected from the Fluid service.\n *\n * #### Listener signature\n *\n * ```typescript\n * () => void;\n * ```\n *\n * ### \"saved\"\n *\n * The \"saved\" event is emitted when the `IFluidContainer` has local changes acknowledged by the service.\n *\n * #### Listener signature\n *\n * ```typescript\n * () => void\n * ```\n *\n * ### \"dirty\"\n *\n * The \"dirty\" event is emitted when the `IFluidContainer` has local changes that have not yet\n * been acknowledged by the service.\n *\n * #### Listener signature\n *\n * ```typescript\n * () => void\n * ```\n */\nexport interface IFluidContainerEvents extends IEvent {\n (event: \"connected\" | \"dispose\" | \"disconnected\" | \"saved\" | \"dirty\", listener: () => void): void;\n}\n\n/**\n * Provides an entrypoint into the client side of collaborative Fluid data.\n * Provides access to the data as well as status on the collaboration session.\n */\nexport interface IFluidContainer extends IEventProvider<IFluidContainerEvents> {\n /**\n * Provides the current connected state of the container\n */\n readonly connectionState: ConnectionState;\n\n /**\n * A container is considered **dirty** if it has local changes that have not yet been acknowledged by the service.\n * You should always check the `isDirty` flag before closing the container or navigating away from the page.\n * Closing the container while `isDirty === true` may result in the loss of operations that have not yet been\n * acknowledged by the service.\n *\n * A container is considered dirty in the following cases:\n *\n * 1. The container has been created in the detached state, and either it has not been attached yet or it is\n * in the process of being attached (container is in `attaching` state). If container is closed prior to being\n * attached, host may never know if the file was created or not.\n *\n * 2. The container was attached, but it has local changes that have not yet been saved to service endpoint.\n * This occurs as part of normal op flow where pending operation (changes) are awaiting acknowledgement from the\n * service. In some cases this can be due to lack of network connection. If the network connection is down,\n * it needs to be restored for the pending changes to be acknowledged.\n */\n readonly isDirty: boolean;\n\n /**\n * Whether the container is disposed, which permanently disables it.\n */\n readonly disposed: boolean;\n\n /**\n * The collection of data objects and Distributed Data Stores (DDSes) that were specified by the schema.\n * These data objects and DDSes exist for the lifetime of the container.\n */\n readonly initialObjects: LoadableObjectRecord;\n\n /**\n * The current attachment state of the container. Once a container has been attached, it remains attached.\n * When loading an existing container, it will already be attached.\n */\n readonly attachState: AttachState;\n\n /**\n * A newly created container starts detached from the collaborative service.\n * Calling `attach()` uploads the new container to the service and connects to the collaborative service.\n *\n * @remarks This should only be called when the container is in the\n * {@link @fluidframework/container-definitions#AttachState.Detatched} state.\n *\n * This can be determined by observing {@link IFluidContainer.attachState}.\n *\n * @returns A promise which resolves when the attach is complete, with the string identifier of the container.\n */\n attach(): Promise<string>;\n\n /**\n * Attempts to connect the container to the delta stream and process operations.\n * Will throw an error if unsuccessful.\n *\n * @remarks This should only be called when the container is in the\n * {@link @fluidframework/container-definitions#ConnectionState.Disconnected} state.\n *\n * This can be determined by observing {@link IFluidContainer.connectionState}.\n */\n connect(): void;\n\n /**\n * Disconnects the container from the delta stream and stops processing operations.\n *\n * @remarks This should only be called when the container is in the\n * {@link @fluidframework/container-definitions#ConnectionState.Connected} state.\n *\n * This can be determined by observing {@link IFluidContainer.connectionState}.\n */\n disconnect(): void;\n\n /**\n * Create a new data object or Distributed Data Store (DDS) of the specified type.\n *\n * @remarks In order to share the data object or DDS with other\n * collaborators and retrieve it later, store its handle in a collection like a SharedDirectory from your\n * initialObjects.\n *\n * @param objectClass - The class of data object or DDS to create\n */\n create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T>;\n\n /**\n * Dispose of the container instance, permanently disabling it.\n */\n dispose(): void;\n}\n\n/**\n * Base {@link IFluidContainer} implementation.\n *\n * @remarks Note: this implementation is not complete. Consumers who rely on {@link IFluidContainer.attach}\n * will need to utilize or provide a service-specific implementation of this type that implements that method.\n */\nexport class FluidContainer extends TypedEventEmitter<IFluidContainerEvents> implements IFluidContainer {\n private readonly connectedHandler = () => this.emit(\"connected\");\n private readonly disconnectedHandler = () => this.emit(\"disconnected\");\n private readonly disposedHandler = () => this.emit(\"disposed\");\n private readonly savedHandler = () => this.emit(\"saved\");\n private readonly dirtyHandler = () => this.emit(\"dirty\");\n\n public constructor(\n private readonly container: IContainer,\n private readonly rootDataObject: RootDataObject,\n ) {\n super();\n container.on(\"connected\", this.connectedHandler);\n container.on(\"closed\", this.disposedHandler);\n container.on(\"disconnected\", this.disconnectedHandler);\n container.on(\"saved\", this.savedHandler);\n container.on(\"dirty\", this.dirtyHandler);\n }\n\n /**\n * {@inheritDoc IFluidContainer.isDirty}\n */\n public get isDirty(): boolean {\n return this.container.isDirty;\n }\n\n /**\n * {@inheritDoc IFluidContainer.attachState}\n */\n public get attachState(): AttachState {\n return this.container.attachState;\n }\n\n /**\n * {@inheritDoc IFluidContainer.disposed}\n */\n public get disposed() {\n return this.container.closed;\n }\n\n /**\n * {@inheritDoc IFluidContainer.connectionState}\n */\n public get connectionState(): ConnectionState {\n return this.container.connectionState;\n }\n\n /**\n * {@inheritDoc IFluidContainer.initialObjects}\n */\n public get initialObjects() {\n return this.rootDataObject.initialObjects;\n }\n\n /**\n * Incomplete base implementation of {@link IFluidContainer.attach}.\n * @remarks Note: this implementation will unconditionally throw.\n * Consumers who rely on this will need to utilize or provide a service specific implementation of this base type\n * that provides an implementation of this method.\n *\n * The reason is because externally we are presenting a separation between the service and the `FluidContainer`,\n * but internally this separation is not there.\n */\n public async attach(): Promise<string> {\n throw new Error(\"Cannot attach container. Container is not in detached state\");\n }\n\n /**\n * {@inheritDoc IFluidContainer.connect}\n */\n public async connect(): Promise<void> {\n this.container.connect?.();\n }\n\n /**\n * {@inheritDoc IFluidContainer.connect}\n */\n public async disconnect(): Promise<void> {\n this.container.disconnect?.();\n }\n\n /**\n * {@inheritDoc IFluidContainer.create}\n */\n public async create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T> {\n return this.rootDataObject.create(objectClass);\n }\n\n /**\n * {@inheritDoc IFluidContainer.dispose}\n */\n public dispose() {\n this.container.close();\n this.container.off(\"connected\", this.connectedHandler);\n this.container.off(\"closed\", this.disposedHandler);\n this.container.off(\"disconnected\", this.disconnectedHandler);\n this.container.off(\"saved\", this.savedHandler);\n this.container.off(\"dirty\", this.dirtyHandler);\n }\n}\n"]}
|
package/dist/rootDataObject.d.ts
CHANGED
|
@@ -7,19 +7,19 @@ import { IContainerRuntime } from "@fluidframework/container-runtime-definitions
|
|
|
7
7
|
import { IFluidLoadable } from "@fluidframework/core-interfaces";
|
|
8
8
|
import { ContainerSchema, LoadableObjectClass, LoadableObjectClassRecord, LoadableObjectRecord } from "./types";
|
|
9
9
|
/**
|
|
10
|
-
* Input props for {@link RootDataObject.initializingFirstTime}
|
|
10
|
+
* Input props for {@link RootDataObject.initializingFirstTime}
|
|
11
11
|
*/
|
|
12
12
|
export interface RootDataObjectProps {
|
|
13
13
|
/**
|
|
14
14
|
* Initial object structure with which the {@link RootDataObject} will be first-time initialized.
|
|
15
|
-
*
|
|
16
|
-
* @see {@link RootDataObject.initializingFirstTime}
|
|
15
|
+
* See {@link RootDataObject.initializingFirstTime}
|
|
17
16
|
*/
|
|
18
17
|
initialObjects: LoadableObjectClassRecord;
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
21
|
-
* The entry-point/root collaborative object of the
|
|
22
|
-
*
|
|
20
|
+
* The entry-point/root collaborative object of the Fluid Container.
|
|
21
|
+
* This class abstracts the dynamic code required to build a Fluid Container into a static representation
|
|
22
|
+
* for end customers.
|
|
23
23
|
*/
|
|
24
24
|
export declare class RootDataObject extends DataObject<{
|
|
25
25
|
InitialState: RootDataObjectProps;
|
|
@@ -31,40 +31,32 @@ export declare class RootDataObject extends DataObject<{
|
|
|
31
31
|
* The first time this object is initialized, creates each object identified in
|
|
32
32
|
* {@link RootDataObjectProps.initialObjects} and stores them as unique values in the root directory.
|
|
33
33
|
*
|
|
34
|
-
*
|
|
34
|
+
* See {@link @fluidframework/aqueduct#PureDataObject.initializingFirstTime}
|
|
35
35
|
*/
|
|
36
36
|
protected initializingFirstTime(props: RootDataObjectProps): Promise<void>;
|
|
37
37
|
/**
|
|
38
38
|
* Every time an instance is initialized, loads all of the initial objects in the root directory so they can be
|
|
39
39
|
* accessed immediately.
|
|
40
40
|
*
|
|
41
|
-
*
|
|
41
|
+
* See {@link @fluidframework/aqueduct#PureDataObject.hasInitialized}
|
|
42
42
|
*/
|
|
43
43
|
protected hasInitialized(): Promise<void>;
|
|
44
44
|
/**
|
|
45
45
|
* Provides a record of the initial objects defined on creation.
|
|
46
|
-
*
|
|
47
|
-
* @see {@link RootDataObject.initializingFirstTime}
|
|
46
|
+
* See {@link RootDataObject.initializingFirstTime}
|
|
48
47
|
*/
|
|
49
48
|
get initialObjects(): LoadableObjectRecord;
|
|
50
49
|
/**
|
|
51
50
|
* Dynamically creates a new detached collaborative object (DDS/DataObject).
|
|
52
|
-
*
|
|
53
51
|
* @param objectClass - Type of the collaborative object to be created.
|
|
54
|
-
*
|
|
55
|
-
* @typeParam T - The class of the `DataObject` or `SharedObject`.
|
|
56
52
|
*/
|
|
57
53
|
create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T>;
|
|
58
54
|
private createDataObject;
|
|
59
55
|
private createSharedObject;
|
|
60
56
|
}
|
|
61
57
|
/**
|
|
62
|
-
* Container code that provides a single {@link RootDataObject}.
|
|
63
|
-
*
|
|
64
|
-
* @remarks
|
|
65
|
-
*
|
|
66
|
-
* This data object is dynamically customized (registry and initial objects) based on the schema provided.
|
|
67
|
-
* to the container runtime factory.
|
|
58
|
+
* Container code that provides a single {@link RootDataObject}. This data object is
|
|
59
|
+
* dynamically customized (registry and initial objects) based on the schema provided to the container runtime factory.
|
|
68
60
|
*/
|
|
69
61
|
export declare class DOProviderContainerRuntimeFactory extends BaseContainerRuntimeFactory {
|
|
70
62
|
private readonly rootDataObjectFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootDataObject.d.ts","sourceRoot":"","sources":["../src/rootDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACH,2BAA2B,EAC3B,UAAU,EAGb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EACH,eAAe,EAEf,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EAEvB,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC
|
|
1
|
+
{"version":3,"file":"rootDataObject.d.ts","sourceRoot":"","sources":["../src/rootDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACH,2BAA2B,EAC3B,UAAU,EAGb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EACH,eAAe,EAEf,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EAEvB,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;OAGG;IACH,cAAc,EAAE,yBAAyB,CAAC;CAC7C;AAED;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,UAAU,CAAC;IAAE,YAAY,EAAE,mBAAmB,CAAC;CAAE,CAAC;IAClF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAyB;IAC9D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA4B;IAE5D,OAAO,KAAK,iBAAiB,GAM5B;IAED;;;;;OAKG;cACa,qBAAqB,CAAC,KAAK,EAAE,mBAAmB;IAgBhE;;;;;OAKG;cACa,cAAc;IAc9B;;;OAGG;IACH,IAAW,cAAc,IAAI,oBAAoB,CAKhD;IAED;;;OAGG;IACU,MAAM,CAAC,CAAC,SAAS,cAAc,EACxC,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,GACpC,OAAO,CAAC,CAAC,CAAC;YASC,gBAAgB;IAO9B,OAAO,CAAC,kBAAkB;CAO7B;AAID;;;GAGG;AACH,qBAAa,iCAAkC,SAAQ,2BAA2B;IAC9E,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAEnC;IAEH,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA4B;gBAE/C,MAAM,EAAE,eAAe;IAsBnC;;OAEG;cACa,8BAA8B,CAAC,OAAO,EAAE,iBAAiB;CAO5E"}
|
package/dist/rootDataObject.js
CHANGED
|
@@ -10,8 +10,9 @@ const runtime_definitions_1 = require("@fluidframework/runtime-definitions");
|
|
|
10
10
|
const runtime_utils_1 = require("@fluidframework/runtime-utils");
|
|
11
11
|
const utils_1 = require("./utils");
|
|
12
12
|
/**
|
|
13
|
-
* The entry-point/root collaborative object of the
|
|
14
|
-
*
|
|
13
|
+
* The entry-point/root collaborative object of the Fluid Container.
|
|
14
|
+
* This class abstracts the dynamic code required to build a Fluid Container into a static representation
|
|
15
|
+
* for end customers.
|
|
15
16
|
*/
|
|
16
17
|
class RootDataObject extends aqueduct_1.DataObject {
|
|
17
18
|
constructor() {
|
|
@@ -30,7 +31,7 @@ class RootDataObject extends aqueduct_1.DataObject {
|
|
|
30
31
|
* The first time this object is initialized, creates each object identified in
|
|
31
32
|
* {@link RootDataObjectProps.initialObjects} and stores them as unique values in the root directory.
|
|
32
33
|
*
|
|
33
|
-
*
|
|
34
|
+
* See {@link @fluidframework/aqueduct#PureDataObject.initializingFirstTime}
|
|
34
35
|
*/
|
|
35
36
|
async initializingFirstTime(props) {
|
|
36
37
|
this.root.createSubDirectory(this.initialObjectsDirKey);
|
|
@@ -49,7 +50,7 @@ class RootDataObject extends aqueduct_1.DataObject {
|
|
|
49
50
|
* Every time an instance is initialized, loads all of the initial objects in the root directory so they can be
|
|
50
51
|
* accessed immediately.
|
|
51
52
|
*
|
|
52
|
-
*
|
|
53
|
+
* See {@link @fluidframework/aqueduct#PureDataObject.hasInitialized}
|
|
53
54
|
*/
|
|
54
55
|
async hasInitialized() {
|
|
55
56
|
// We will always load the initial objects so they are available to the developer
|
|
@@ -65,8 +66,7 @@ class RootDataObject extends aqueduct_1.DataObject {
|
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
67
68
|
* Provides a record of the initial objects defined on creation.
|
|
68
|
-
*
|
|
69
|
-
* @see {@link RootDataObject.initializingFirstTime}
|
|
69
|
+
* See {@link RootDataObject.initializingFirstTime}
|
|
70
70
|
*/
|
|
71
71
|
get initialObjects() {
|
|
72
72
|
if (Object.keys(this._initialObjects).length === 0) {
|
|
@@ -76,10 +76,7 @@ class RootDataObject extends aqueduct_1.DataObject {
|
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* Dynamically creates a new detached collaborative object (DDS/DataObject).
|
|
79
|
-
*
|
|
80
79
|
* @param objectClass - Type of the collaborative object to be created.
|
|
81
|
-
*
|
|
82
|
-
* @typeParam T - The class of the `DataObject` or `SharedObject`.
|
|
83
80
|
*/
|
|
84
81
|
async create(objectClass) {
|
|
85
82
|
if ((0, utils_1.isDataObjectClass)(objectClass)) {
|
|
@@ -105,12 +102,8 @@ class RootDataObject extends aqueduct_1.DataObject {
|
|
|
105
102
|
exports.RootDataObject = RootDataObject;
|
|
106
103
|
const rootDataStoreId = "rootDOId";
|
|
107
104
|
/**
|
|
108
|
-
* Container code that provides a single {@link RootDataObject}.
|
|
109
|
-
*
|
|
110
|
-
* @remarks
|
|
111
|
-
*
|
|
112
|
-
* This data object is dynamically customized (registry and initial objects) based on the schema provided.
|
|
113
|
-
* to the container runtime factory.
|
|
105
|
+
* Container code that provides a single {@link RootDataObject}. This data object is
|
|
106
|
+
* dynamically customized (registry and initial objects) based on the schema provided to the container runtime factory.
|
|
114
107
|
*/
|
|
115
108
|
class DOProviderContainerRuntimeFactory extends aqueduct_1.BaseContainerRuntimeFactory {
|
|
116
109
|
constructor(schema) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootDataObject.js","sourceRoot":"","sources":["../src/rootDataObject.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uDAKkC;AAGlC,6EAAgE;AAChE,iEAAmE;AASnE,mCAAoG;AAcpG;;;GAGG;AACH,MAAa,cAAe,SAAQ,qBAAkD;IAAtF;;QACqB,yBAAoB,GAAG,qBAAqB,CAAC;QAC7C,oBAAe,GAAyB,EAAE,CAAC;IAgGhE,CAAC;IA9FG,IAAY,iBAAiB;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QACjE,IAAI,GAAG,KAAK,SAAS,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;SACvE;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACO,KAAK,CAAC,qBAAqB,CAAC,KAA0B;QAC5D,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAExD,mDAAmD;QACnD,MAAM,eAAe,GAAoB,EAAE,CAAC;QAC5C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAA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E,EACF,eAAe,CAClB,CAAC;QACN,KAAK,CACD,CAAC,qBAAqB,CAAC,aAAa,CAAC,EACrC,SAAS,EACT,CAAC,IAAA,qCAA0B,EAAC,eAAe,CAAC,CAAC;QAC7C,kGAAkG;QAClG,sEAAsE;QACtE,EAAE,SAAS,EAAE,+BAAS,CAAC,SAAS,EAAE,CACrC,CAAC;QACF,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAChD,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B;QACrE,sEAAsE;QACtE,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAC/C,eAAe,EACf,OAAO,EACP,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;IACjD,CAAC;CACJ;AAvCD,8EAuCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n BaseContainerRuntimeFactory,\n DataObject,\n DataObjectFactory,\n defaultRouteRequestHandler,\n} from \"@fluidframework/aqueduct\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { FlushMode } from \"@fluidframework/runtime-definitions\";\nimport { requestFluidObject } from \"@fluidframework/runtime-utils\";\nimport {\n ContainerSchema,\n DataObjectClass,\n LoadableObjectClass,\n LoadableObjectClassRecord,\n LoadableObjectRecord,\n SharedObjectClass,\n} from \"./types\";\nimport { isDataObjectClass, isSharedObjectClass, parseDataObjectsFromSharedObjects } from \"./utils\";\n\n/**\n * Input props for {@link RootDataObject.initializingFirstTime}.\n */\nexport interface RootDataObjectProps {\n /**\n * Initial object structure with which the {@link RootDataObject} will be first-time initialized.\n *\n * @see {@link RootDataObject.initializingFirstTime}\n */\n initialObjects: LoadableObjectClassRecord;\n}\n\n/**\n * The entry-point/root collaborative object of the {@link IFluidContainer | Fluid Container}.\n * Abstracts the dynamic code required to build a Fluid Container into a static representation for end customers.\n */\nexport class RootDataObject extends DataObject<{ InitialState: RootDataObjectProps; }> {\n private readonly initialObjectsDirKey = \"initial-objects-key\";\n private readonly _initialObjects: LoadableObjectRecord = {};\n\n private get initialObjectsDir() {\n const dir = this.root.getSubDirectory(this.initialObjectsDirKey);\n if (dir === undefined) {\n throw new Error(\"InitialObjects sub-directory was not initialized\");\n }\n return dir;\n }\n\n /**\n * The first time this object is initialized, creates each object identified in\n * {@link RootDataObjectProps.initialObjects} and stores them as unique values in the root directory.\n *\n * @see {@link @fluidframework/aqueduct#PureDataObject.initializingFirstTime}\n */\n protected async initializingFirstTime(props: RootDataObjectProps) {\n this.root.createSubDirectory(this.initialObjectsDirKey);\n\n // Create initial objects provided by the developer\n const initialObjectsP: Promise<void>[] = [];\n Object.entries(props.initialObjects).forEach(([id, objectClass]) => {\n const createObject = async () => {\n const obj = await this.create(objectClass);\n this.initialObjectsDir.set(id, obj.handle);\n };\n initialObjectsP.push(createObject());\n });\n\n await Promise.all(initialObjectsP);\n }\n\n /**\n * Every time an instance is initialized, loads all of the initial objects in the root directory so they can be\n * accessed immediately.\n *\n * @see {@link @fluidframework/aqueduct#PureDataObject.hasInitialized}\n */\n protected async hasInitialized() {\n // We will always load the initial objects so they are available to the developer\n const loadInitialObjectsP: Promise<void>[] = [];\n for (const [key, value] of Array.from(this.initialObjectsDir.entries())) {\n const loadDir = async () => {\n const obj = await value.get();\n Object.assign(this._initialObjects, { [key]: obj });\n };\n loadInitialObjectsP.push(loadDir());\n }\n\n await Promise.all(loadInitialObjectsP);\n }\n\n /**\n * Provides a record of the initial objects defined on creation.\n *\n * @see {@link RootDataObject.initializingFirstTime}\n */\n public get initialObjects(): LoadableObjectRecord {\n if (Object.keys(this._initialObjects).length === 0) {\n throw new Error(\"Initial Objects were not correctly initialized\");\n }\n return this._initialObjects;\n }\n\n /**\n * Dynamically creates a new detached collaborative object (DDS/DataObject).\n *\n * @param objectClass - Type of the collaborative object to be created.\n *\n * @typeParam T - The class of the `DataObject` or `SharedObject`.\n */\n public async create<T extends IFluidLoadable>(\n objectClass: LoadableObjectClass<T>,\n ): Promise<T> {\n if (isDataObjectClass(objectClass)) {\n return this.createDataObject<T>(objectClass);\n } else if (isSharedObjectClass(objectClass)) {\n return this.createSharedObject<T>(objectClass);\n }\n throw new Error(\"Could not create new Fluid object because an unknown object was passed\");\n }\n\n private async createDataObject<T extends IFluidLoadable>(dataObjectClass: DataObjectClass<T>): Promise<T> {\n const factory = dataObjectClass.factory;\n const packagePath = [...this.context.packagePath, factory.type];\n const router = await this.context.containerRuntime.createDataStore(packagePath);\n return requestFluidObject<T>(router, \"/\");\n }\n\n private createSharedObject<T extends IFluidLoadable>(\n sharedObjectClass: SharedObjectClass<T>,\n ): T {\n const factory = sharedObjectClass.getFactory();\n const obj = this.runtime.createChannel(undefined, factory.type);\n return obj as unknown as T;\n }\n}\n\nconst rootDataStoreId = \"rootDOId\";\n\n/**\n * Container code that provides a single {@link RootDataObject}.\n *\n * @remarks\n *\n * This data object is dynamically customized (registry and initial objects) based on the schema provided.\n * to the container runtime factory.\n */\nexport class DOProviderContainerRuntimeFactory extends BaseContainerRuntimeFactory {\n private readonly rootDataObjectFactory: DataObjectFactory<RootDataObject, {\n InitialState: RootDataObjectProps;\n }>;\n\n private readonly initialObjects: LoadableObjectClassRecord;\n\n constructor(schema: ContainerSchema) {\n const [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n const rootDataObjectFactory =\n new DataObjectFactory(\n \"rootDO\",\n RootDataObject,\n sharedObjects,\n {},\n registryEntries,\n );\n super(\n [rootDataObjectFactory.registryEntry],\n undefined,\n [defaultRouteRequestHandler(rootDataStoreId)],\n // temporary workaround to disable message batching until the message batch size issue is resolved\n // resolution progress is tracked by the Feature 465 work item in AzDO\n { flushMode: FlushMode.Immediate },\n );\n this.rootDataObjectFactory = rootDataObjectFactory;\n this.initialObjects = schema.initialObjects;\n }\n\n /**\n * {@inheritDoc @fluidframework/aqueduct#BaseContainerRuntimeFactory.containerInitializingFirstTime}\n */\n protected async containerInitializingFirstTime(runtime: IContainerRuntime) {\n // The first time we create the container we create the RootDataObject\n await this.rootDataObjectFactory.createRootInstance(\n rootDataStoreId,\n runtime,\n { initialObjects: this.initialObjects });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"rootDataObject.js","sourceRoot":"","sources":["../src/rootDataObject.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uDAKkC;AAGlC,6EAAgE;AAChE,iEAAmE;AASnE,mCAAoG;AAapG;;;;GAIG;AACH,MAAa,cAAe,SAAQ,qBAAkD;IAAtF;;QACqB,yBAAoB,GAAG,qBAAqB,CAAC;QAC7C,oBAAe,GAAyB,EAAE,CAAC;IA4FhE,CAAC;IA1FG,IAAY,iBAAiB;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QACjE,IAAI,GAAG,KAAK,SAAS,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;SACvE;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACO,KAAK,CAAC,qBAAqB,CAAC,KAA0B;QAC5D,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAExD,mDAAmD;QACnD,MAAM,eAAe,GAAoB,EAAE,CAAC;QAC5C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,WAAW,CAAC,EAAE,EAAE;YAC/D,MAAM,YAAY,GAAG,KAAK,IAAI,EAAE;gBAC5B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;gBAC3C,IAAI,CAAC,iBAAiB,CAAC,GA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AAE,CACrC,CAAC;QACF,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAChD,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B;QACrE,sEAAsE;QACtE,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAC/C,eAAe,EACf,OAAO,EACP,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;IACjD,CAAC;CACJ;AAvCD,8EAuCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n BaseContainerRuntimeFactory,\n DataObject,\n DataObjectFactory,\n defaultRouteRequestHandler,\n} from \"@fluidframework/aqueduct\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { FlushMode } from \"@fluidframework/runtime-definitions\";\nimport { requestFluidObject } from \"@fluidframework/runtime-utils\";\nimport {\n ContainerSchema,\n DataObjectClass,\n LoadableObjectClass,\n LoadableObjectClassRecord,\n LoadableObjectRecord,\n SharedObjectClass,\n} from \"./types\";\nimport { isDataObjectClass, isSharedObjectClass, parseDataObjectsFromSharedObjects } from \"./utils\";\n\n/**\n * Input props for {@link RootDataObject.initializingFirstTime}\n */\nexport interface RootDataObjectProps {\n /**\n * Initial object structure with which the {@link RootDataObject} will be first-time initialized.\n * See {@link RootDataObject.initializingFirstTime}\n */\n initialObjects: LoadableObjectClassRecord;\n}\n\n/**\n * The entry-point/root collaborative object of the Fluid Container.\n * This class abstracts the dynamic code required to build a Fluid Container into a static representation\n * for end customers.\n */\nexport class RootDataObject extends DataObject<{ InitialState: RootDataObjectProps; }> {\n private readonly initialObjectsDirKey = \"initial-objects-key\";\n private readonly _initialObjects: LoadableObjectRecord = {};\n\n private get initialObjectsDir() {\n const dir = this.root.getSubDirectory(this.initialObjectsDirKey);\n if (dir === undefined) {\n throw new Error(\"InitialObjects sub-directory was not initialized\");\n }\n return dir;\n }\n\n /**\n * The first time this object is initialized, creates each object identified in\n * {@link RootDataObjectProps.initialObjects} and stores them as unique values in the root directory.\n *\n * See {@link @fluidframework/aqueduct#PureDataObject.initializingFirstTime}\n */\n protected async initializingFirstTime(props: RootDataObjectProps) {\n this.root.createSubDirectory(this.initialObjectsDirKey);\n\n // Create initial objects provided by the developer\n const initialObjectsP: Promise<void>[] = [];\n Object.entries(props.initialObjects).forEach(([id, objectClass]) => {\n const createObject = async () => {\n const obj = await this.create(objectClass);\n this.initialObjectsDir.set(id, obj.handle);\n };\n initialObjectsP.push(createObject());\n });\n\n await Promise.all(initialObjectsP);\n }\n\n /**\n * Every time an instance is initialized, loads all of the initial objects in the root directory so they can be\n * accessed immediately.\n *\n * See {@link @fluidframework/aqueduct#PureDataObject.hasInitialized}\n */\n protected async hasInitialized() {\n // We will always load the initial objects so they are available to the developer\n const loadInitialObjectsP: Promise<void>[] = [];\n for (const [key, value] of Array.from(this.initialObjectsDir.entries())) {\n const loadDir = async () => {\n const obj = await value.get();\n Object.assign(this._initialObjects, { [key]: obj });\n };\n loadInitialObjectsP.push(loadDir());\n }\n\n await Promise.all(loadInitialObjectsP);\n }\n\n /**\n * Provides a record of the initial objects defined on creation.\n * See {@link RootDataObject.initializingFirstTime}\n */\n public get initialObjects(): LoadableObjectRecord {\n if (Object.keys(this._initialObjects).length === 0) {\n throw new Error(\"Initial Objects were not correctly initialized\");\n }\n return this._initialObjects;\n }\n\n /**\n * Dynamically creates a new detached collaborative object (DDS/DataObject).\n * @param objectClass - Type of the collaborative object to be created.\n */\n public async create<T extends IFluidLoadable>(\n objectClass: LoadableObjectClass<T>,\n ): Promise<T> {\n if (isDataObjectClass(objectClass)) {\n return this.createDataObject<T>(objectClass);\n } else if (isSharedObjectClass(objectClass)) {\n return this.createSharedObject<T>(objectClass);\n }\n throw new Error(\"Could not create new Fluid object because an unknown object was passed\");\n }\n\n private async createDataObject<T extends IFluidLoadable>(dataObjectClass: DataObjectClass<T>): Promise<T> {\n const factory = dataObjectClass.factory;\n const packagePath = [...this.context.packagePath, factory.type];\n const router = await this.context.containerRuntime.createDataStore(packagePath);\n return requestFluidObject<T>(router, \"/\");\n }\n\n private createSharedObject<T extends IFluidLoadable>(\n sharedObjectClass: SharedObjectClass<T>,\n ): T {\n const factory = sharedObjectClass.getFactory();\n const obj = this.runtime.createChannel(undefined, factory.type);\n return obj as unknown as T;\n }\n}\n\nconst rootDataStoreId = \"rootDOId\";\n\n/**\n * Container code that provides a single {@link RootDataObject}. This data object is\n * dynamically customized (registry and initial objects) based on the schema provided to the container runtime factory.\n */\nexport class DOProviderContainerRuntimeFactory extends BaseContainerRuntimeFactory {\n private readonly rootDataObjectFactory: DataObjectFactory<RootDataObject, {\n InitialState: RootDataObjectProps;\n }>;\n\n private readonly initialObjects: LoadableObjectClassRecord;\n\n constructor(schema: ContainerSchema) {\n const [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n const rootDataObjectFactory =\n new DataObjectFactory(\n \"rootDO\",\n RootDataObject,\n sharedObjects,\n {},\n registryEntries,\n );\n super(\n [rootDataObjectFactory.registryEntry],\n undefined,\n [defaultRouteRequestHandler(rootDataStoreId)],\n // temporary workaround to disable message batching until the message batch size issue is resolved\n // resolution progress is tracked by the Feature 465 work item in AzDO\n { flushMode: FlushMode.Immediate },\n );\n this.rootDataObjectFactory = rootDataObjectFactory;\n this.initialObjects = schema.initialObjects;\n }\n\n /**\n * {@inheritDoc @fluidframework/aqueduct#BaseContainerRuntimeFactory.containerInitializingFirstTime}\n */\n protected async containerInitializingFirstTime(runtime: IContainerRuntime) {\n // The first time we create the container we create the RootDataObject\n await this.rootDataObjectFactory.createRootInstance(\n rootDataStoreId,\n runtime,\n { initialObjects: this.initialObjects });\n }\n}\n"]}
|
|
@@ -7,14 +7,10 @@ import { IAudience, IContainer } from "@fluidframework/container-definitions";
|
|
|
7
7
|
import { IClient } from "@fluidframework/protocol-definitions";
|
|
8
8
|
import { IServiceAudience, IServiceAudienceEvents, IMember } from "./types";
|
|
9
9
|
/**
|
|
10
|
-
* Base class for providing audience information for sessions interacting with
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
*
|
|
10
|
+
* Base class for providing audience information for sessions interacting with FluidContainer
|
|
14
11
|
* This can be extended by different service-specific client packages to additional parameters to
|
|
15
|
-
* the user and client details returned in
|
|
16
|
-
*
|
|
17
|
-
* @typeParam M - A service-specific {@link IMember} implementation.
|
|
12
|
+
* the user and client details returned in IMember
|
|
13
|
+
* @typeParam M - A service-specific member type.
|
|
18
14
|
*/
|
|
19
15
|
export declare abstract class ServiceAudience<M extends IMember = IMember> extends TypedEventEmitter<IServiceAudienceEvents<M>> implements IServiceAudience<M> {
|
|
20
16
|
/**
|
|
@@ -22,25 +18,19 @@ export declare abstract class ServiceAudience<M extends IMember = IMember> exten
|
|
|
22
18
|
*/
|
|
23
19
|
protected readonly container: IContainer;
|
|
24
20
|
/**
|
|
25
|
-
* Audience object which includes all the existing members of the
|
|
21
|
+
* Audience object which includes all the existing members of the container.
|
|
26
22
|
*/
|
|
27
23
|
protected readonly audience: IAudience;
|
|
28
24
|
/**
|
|
29
|
-
* Retain the most recent member list.
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* It also allows us to provide the client details in the event which makes it easier to find that client connection
|
|
39
|
-
* in a map keyed on the `userId` and not `clientId`.
|
|
40
|
-
*
|
|
41
|
-
* This map will always be up-to-date in a `removeMember` event because it is set once at construction and in
|
|
42
|
-
* every `addMember` event. It is mapped `clientId` to `M` to be better work with what the {@link IServiceAudience}
|
|
43
|
-
* events provide.
|
|
25
|
+
* Retain the most recent member list. This is so we have more information about a member
|
|
26
|
+
* leaving the audience in the removeMember event. It allows us to match the behavior of the
|
|
27
|
+
* addMember event where it only fires on a change to the members this class exposes (and would
|
|
28
|
+
* actually produce a change in what getMembers returns). It also allows us to provide the
|
|
29
|
+
* client details in the event which makes it easier to find that client connection in a map
|
|
30
|
+
* keyed on the userId and not clientId.
|
|
31
|
+
* This map will always be up-to-date in a removeMember event because it is set once at
|
|
32
|
+
* construction and in every addMember event.
|
|
33
|
+
* It is mapped clientId to M to be better work with what the IAudience event provides
|
|
44
34
|
*/
|
|
45
35
|
protected lastMembers: Map<string, M>;
|
|
46
36
|
constructor(
|
|
@@ -50,7 +40,6 @@ export declare abstract class ServiceAudience<M extends IMember = IMember> exten
|
|
|
50
40
|
container: IContainer);
|
|
51
41
|
/**
|
|
52
42
|
* Provides ability for inheriting class to modify/extend the audience object.
|
|
53
|
-
*
|
|
54
43
|
* @param audienceMember - Record of a specific audience member.
|
|
55
44
|
*/
|
|
56
45
|
protected abstract createServiceMember(audienceMember: IClient): M;
|
|
@@ -66,7 +55,6 @@ export declare abstract class ServiceAudience<M extends IMember = IMember> exten
|
|
|
66
55
|
/**
|
|
67
56
|
* Provides ability for the inheriting class to include/omit specific members.
|
|
68
57
|
* An example use case is omitting the summarizer client.
|
|
69
|
-
*
|
|
70
58
|
* @param member - Member to be included/omitted.
|
|
71
59
|
*/
|
|
72
60
|
protected shouldIncludeAsMember(member: IClient): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceAudience.d.ts","sourceRoot":"","sources":["../src/serviceAudience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAE5E
|
|
1
|
+
{"version":3,"file":"serviceAudience.d.ts","sourceRoot":"","sources":["../src/serviceAudience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAE5E;;;;;GAKG;AACH,8BAAsB,eAAe,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,CAC/D,SAAQ,iBAAiB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CACnD,YAAW,gBAAgB,CAAC,CAAC,CAAC;IAoB5B;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU;IAtB1C;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAEvC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAa;;IAGhD;;OAEG;IACgB,SAAS,EAAE,UAAU;IA2B1C;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,cAAc,EAAE,OAAO,GAAG,CAAC;IAElE;;OAEG;IACI,UAAU,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAuBnC;;OAEG;IACI,SAAS,IAAI,CAAC,GAAG,SAAS;IAQjC,OAAO,CAAC,SAAS;IAejB;;;;OAIG;IACH,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO;CAI1D"}
|
package/dist/serviceAudience.js
CHANGED
|
@@ -7,14 +7,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.ServiceAudience = void 0;
|
|
8
8
|
const common_utils_1 = require("@fluidframework/common-utils");
|
|
9
9
|
/**
|
|
10
|
-
* Base class for providing audience information for sessions interacting with
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
*
|
|
10
|
+
* Base class for providing audience information for sessions interacting with FluidContainer
|
|
14
11
|
* This can be extended by different service-specific client packages to additional parameters to
|
|
15
|
-
* the user and client details returned in
|
|
16
|
-
*
|
|
17
|
-
* @typeParam M - A service-specific {@link IMember} implementation.
|
|
12
|
+
* the user and client details returned in IMember
|
|
13
|
+
* @typeParam M - A service-specific member type.
|
|
18
14
|
*/
|
|
19
15
|
class ServiceAudience extends common_utils_1.TypedEventEmitter {
|
|
20
16
|
constructor(
|
|
@@ -25,21 +21,15 @@ class ServiceAudience extends common_utils_1.TypedEventEmitter {
|
|
|
25
21
|
super();
|
|
26
22
|
this.container = container;
|
|
27
23
|
/**
|
|
28
|
-
* Retain the most recent member list.
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* It also allows us to provide the client details in the event which makes it easier to find that client connection
|
|
38
|
-
* in a map keyed on the `userId` and not `clientId`.
|
|
39
|
-
*
|
|
40
|
-
* This map will always be up-to-date in a `removeMember` event because it is set once at construction and in
|
|
41
|
-
* every `addMember` event. It is mapped `clientId` to `M` to be better work with what the {@link IServiceAudience}
|
|
42
|
-
* events provide.
|
|
24
|
+
* Retain the most recent member list. This is so we have more information about a member
|
|
25
|
+
* leaving the audience in the removeMember event. It allows us to match the behavior of the
|
|
26
|
+
* addMember event where it only fires on a change to the members this class exposes (and would
|
|
27
|
+
* actually produce a change in what getMembers returns). It also allows us to provide the
|
|
28
|
+
* client details in the event which makes it easier to find that client connection in a map
|
|
29
|
+
* keyed on the userId and not clientId.
|
|
30
|
+
* This map will always be up-to-date in a removeMember event because it is set once at
|
|
31
|
+
* construction and in every addMember event.
|
|
32
|
+
* It is mapped clientId to M to be better work with what the IAudience event provides
|
|
43
33
|
*/
|
|
44
34
|
this.lastMembers = new Map();
|
|
45
35
|
this.audience = container.audience;
|
|
@@ -112,7 +102,6 @@ class ServiceAudience extends common_utils_1.TypedEventEmitter {
|
|
|
112
102
|
/**
|
|
113
103
|
* Provides ability for the inheriting class to include/omit specific members.
|
|
114
104
|
* An example use case is omitting the summarizer client.
|
|
115
|
-
*
|
|
116
105
|
* @param member - Member to be included/omitted.
|
|
117
106
|
*/
|
|
118
107
|
shouldIncludeAsMember(member) {
|