@fluidframework/container-definitions 2.0.0-dev.6.4.0.192049 → 2.0.0-dev.7.2.0.204906
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/CHANGELOG.md +92 -0
- package/api-extractor.json +1 -1
- package/api-report/container-definitions.api.md +538 -0
- package/dist/audience.d.ts +2 -0
- package/dist/audience.d.ts.map +1 -1
- package/dist/audience.js.map +1 -1
- package/dist/browserPackage.d.ts +3 -0
- package/dist/browserPackage.d.ts.map +1 -1
- package/dist/browserPackage.js +1 -0
- package/dist/browserPackage.js.map +1 -1
- package/dist/container-definitions-alpha.d.ts +1455 -0
- package/dist/container-definitions-beta.d.ts +1450 -0
- package/dist/container-definitions-public.d.ts +1450 -0
- package/dist/container-definitions-untrimmed.d.ts +1455 -0
- package/dist/deltas.d.ts +15 -3
- package/dist/deltas.d.ts.map +1 -1
- package/dist/deltas.js.map +1 -1
- package/dist/error.d.ts +9 -2
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +3 -1
- package/dist/error.js.map +1 -1
- package/dist/fluidModule.d.ts +3 -0
- package/dist/fluidModule.d.ts.map +1 -1
- package/dist/fluidModule.js.map +1 -1
- package/dist/fluidPackage.d.ts +16 -0
- package/dist/fluidPackage.d.ts.map +1 -1
- package/dist/fluidPackage.js +8 -0
- package/dist/fluidPackage.js.map +1 -1
- package/dist/loader.d.ts +46 -21
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +2 -1
- package/dist/loader.js.map +1 -1
- package/dist/runtime.d.ts +16 -7
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +5 -1
- package/dist/runtime.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/audience.d.ts +2 -0
- package/lib/audience.d.ts.map +1 -1
- package/lib/audience.js.map +1 -1
- package/lib/browserPackage.d.ts +3 -0
- package/lib/browserPackage.d.ts.map +1 -1
- package/lib/browserPackage.js +1 -0
- package/lib/browserPackage.js.map +1 -1
- package/lib/deltas.d.ts +15 -3
- package/lib/deltas.d.ts.map +1 -1
- package/lib/deltas.js.map +1 -1
- package/lib/error.d.ts +9 -2
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +2 -0
- package/lib/error.js.map +1 -1
- package/lib/fluidModule.d.ts +3 -0
- package/lib/fluidModule.d.ts.map +1 -1
- package/lib/fluidModule.js.map +1 -1
- package/lib/fluidPackage.d.ts +16 -0
- package/lib/fluidPackage.d.ts.map +1 -1
- package/lib/fluidPackage.js +8 -0
- package/lib/fluidPackage.js.map +1 -1
- package/lib/loader.d.ts +46 -21
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js +1 -0
- package/lib/loader.js.map +1 -1
- package/lib/runtime.d.ts +16 -7
- package/lib/runtime.d.ts.map +1 -1
- package/lib/runtime.js +4 -0
- package/lib/runtime.js.map +1 -1
- package/package.json +16 -17
- package/src/audience.ts +4 -0
- package/src/browserPackage.ts +3 -0
- package/src/deltas.ts +23 -2
- package/src/error.ts +9 -1
- package/src/fluidModule.ts +3 -0
- package/src/fluidPackage.ts +16 -0
- package/src/loader.ts +55 -19
- package/src/runtime.ts +16 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
# @fluidframework/container-definitions
|
|
2
2
|
|
|
3
|
+
## 2.0.0-internal.7.1.0
|
|
4
|
+
|
|
5
|
+
Dependency updates only.
|
|
6
|
+
|
|
7
|
+
## 2.0.0-internal.7.0.0
|
|
8
|
+
|
|
9
|
+
### Major Changes
|
|
10
|
+
|
|
11
|
+
- odsp-driver: Load container in readonly mode when driver throws DriverErrorType.outOfStorage [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
12
|
+
|
|
13
|
+
Handle DriverErrorType.outOfStorage error from driver and load the container in readonly mode. Currently there is no
|
|
14
|
+
handling and when the join session throws this error, the container will get closed. With this we use NoDeltaStream
|
|
15
|
+
object as connection and load the container in read mode, so that it loads properly. We also notify the that the
|
|
16
|
+
container is "readonly" through the event on delta manager so that apps can listen to this and show any UX etc. The app
|
|
17
|
+
can listen to the event like this:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
container.deltaManager.on(
|
|
21
|
+
"readonly",
|
|
22
|
+
(readonly?: boolean, readonlyConnectionReason?: { text: string; error?: IErrorBase }) => {
|
|
23
|
+
// error?.errorType will be equal to DriverErrorType.outOfStorage in this case
|
|
24
|
+
// App logic
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
30
|
+
|
|
31
|
+
This included the following changes from the protocol-definitions release:
|
|
32
|
+
|
|
33
|
+
- Updating signal interfaces for some planned improvements. The intention is split the interface between signals
|
|
34
|
+
submitted by clients to the server and the resulting signals sent from the server to clients.
|
|
35
|
+
- A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
|
|
36
|
+
been added, which will be the typing for signals sent from the client to the server. Both extend a new
|
|
37
|
+
ISignalMessageBase interface that contains common members.
|
|
38
|
+
- The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
|
|
39
|
+
|
|
40
|
+
- container-definitions: IContainer's and IDataStore's IFluidRouter capabilities are deprecated [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
41
|
+
|
|
42
|
+
`IFluidRouter` and `request({ url: "/" })` on `IContainer` and `IDataStore` are deprecated and will be removed in a future major release. Please migrate all usage to the appropriate `getEntryPoint()` or `entryPoint` APIs.
|
|
43
|
+
|
|
44
|
+
See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
|
|
45
|
+
|
|
46
|
+
- Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
47
|
+
|
|
48
|
+
Dependencies on the following Fluid server package have been updated to version 2.0.1:
|
|
49
|
+
|
|
50
|
+
- @fluidframework/gitresources: 2.0.1
|
|
51
|
+
- @fluidframework/server-kafka-orderer: 2.0.1
|
|
52
|
+
- @fluidframework/server-lambdas: 2.0.1
|
|
53
|
+
- @fluidframework/server-lambdas-driver: 2.0.1
|
|
54
|
+
- @fluidframework/server-local-server: 2.0.1
|
|
55
|
+
- @fluidframework/server-memory-orderer: 2.0.1
|
|
56
|
+
- @fluidframework/protocol-base: 2.0.1
|
|
57
|
+
- @fluidframework/server-routerlicious: 2.0.1
|
|
58
|
+
- @fluidframework/server-routerlicious-base: 2.0.1
|
|
59
|
+
- @fluidframework/server-services: 2.0.1
|
|
60
|
+
- @fluidframework/server-services-client: 2.0.1
|
|
61
|
+
- @fluidframework/server-services-core: 2.0.1
|
|
62
|
+
- @fluidframework/server-services-ordering-kafkanode: 2.0.1
|
|
63
|
+
- @fluidframework/server-services-ordering-rdkafka: 2.0.1
|
|
64
|
+
- @fluidframework/server-services-ordering-zookeeper: 2.0.1
|
|
65
|
+
- @fluidframework/server-services-shared: 2.0.1
|
|
66
|
+
- @fluidframework/server-services-telemetry: 2.0.1
|
|
67
|
+
- @fluidframework/server-services-utils: 2.0.1
|
|
68
|
+
- @fluidframework/server-test-utils: 2.0.1
|
|
69
|
+
- tinylicious: 2.0.1
|
|
70
|
+
|
|
71
|
+
- test-utils: provideEntryPoint is required [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
72
|
+
|
|
73
|
+
The optional `provideEntryPoint` method has become required on a number of constructors. A value will need to be provided to the following classes:
|
|
74
|
+
|
|
75
|
+
- `BaseContainerRuntimeFactory`
|
|
76
|
+
- `RuntimeFactory`
|
|
77
|
+
- `ContainerRuntime` (constructor and `loadRuntime`)
|
|
78
|
+
- `FluidDataStoreRuntime`
|
|
79
|
+
|
|
80
|
+
See [testContainerRuntimeFactoryWithDefaultDataStore.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/test/test-utils/src/testContainerRuntimeFactoryWithDefaultDataStore.ts) for an example implemtation of `provideEntryPoint` for ContainerRuntime.
|
|
81
|
+
See [pureDataObjectFactory.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/framework/aqueduct/src/data-object-factories/pureDataObjectFactory.ts#L83) for an example implementation of `provideEntryPoint` for DataStoreRuntime.
|
|
82
|
+
|
|
83
|
+
Subsequently, various `entryPoint` and `getEntryPoint()` endpoints have become required. Please see [containerRuntime.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/containerRuntime.ts) for example implementations of these APIs.
|
|
84
|
+
|
|
85
|
+
For more details, see [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md)
|
|
86
|
+
|
|
87
|
+
- Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
88
|
+
|
|
89
|
+
The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
|
|
90
|
+
|
|
91
|
+
## 2.0.0-internal.6.4.0
|
|
92
|
+
|
|
93
|
+
Dependency updates only.
|
|
94
|
+
|
|
3
95
|
## 2.0.0-internal.6.3.0
|
|
4
96
|
|
|
5
97
|
Dependency updates only.
|
package/api-extractor.json
CHANGED
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
## API Report File for "@fluidframework/container-definitions"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { EventEmitter } from 'events';
|
|
8
|
+
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
9
|
+
import { IAnyDriverError } from '@fluidframework/driver-definitions';
|
|
10
|
+
import { IClient } from '@fluidframework/protocol-definitions';
|
|
11
|
+
import { IClientConfiguration } from '@fluidframework/protocol-definitions';
|
|
12
|
+
import { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
13
|
+
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
14
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
15
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
16
|
+
import { IErrorBase } from '@fluidframework/core-interfaces';
|
|
17
|
+
import { IErrorEvent } from '@fluidframework/core-interfaces';
|
|
18
|
+
import { IEvent } from '@fluidframework/core-interfaces';
|
|
19
|
+
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
20
|
+
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
21
|
+
import { IGenericError } from '@fluidframework/core-interfaces';
|
|
22
|
+
import { IQuorumClients } from '@fluidframework/protocol-definitions';
|
|
23
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
24
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
25
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
26
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
27
|
+
import { ISequencedProposal } from '@fluidframework/protocol-definitions';
|
|
28
|
+
import { ISignalMessage } from '@fluidframework/protocol-definitions';
|
|
29
|
+
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
30
|
+
import { ISummaryContent } from '@fluidframework/protocol-definitions';
|
|
31
|
+
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
32
|
+
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
33
|
+
import { IThrottlingWarning } from '@fluidframework/core-interfaces';
|
|
34
|
+
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
35
|
+
import { IUsageError } from '@fluidframework/core-interfaces';
|
|
36
|
+
import { IVersion } from '@fluidframework/protocol-definitions';
|
|
37
|
+
import { MessageType } from '@fluidframework/protocol-definitions';
|
|
38
|
+
|
|
39
|
+
// @public
|
|
40
|
+
export enum AttachState {
|
|
41
|
+
Attached = "Attached",
|
|
42
|
+
Attaching = "Attaching",
|
|
43
|
+
Detached = "Detached"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// @public
|
|
47
|
+
export namespace ConnectionState {
|
|
48
|
+
export type CatchingUp = 1;
|
|
49
|
+
export type Connected = 2;
|
|
50
|
+
export type Disconnected = 0;
|
|
51
|
+
export type EstablishingConnection = 3;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// @public
|
|
55
|
+
export type ConnectionState = ConnectionState.Disconnected | ConnectionState.EstablishingConnection | ConnectionState.CatchingUp | ConnectionState.Connected;
|
|
56
|
+
|
|
57
|
+
// @public @deprecated
|
|
58
|
+
export enum ContainerErrorType {
|
|
59
|
+
clientSessionExpiredError = "clientSessionExpiredError",
|
|
60
|
+
dataCorruptionError = "dataCorruptionError",
|
|
61
|
+
dataProcessingError = "dataProcessingError",
|
|
62
|
+
genericError = "genericError",
|
|
63
|
+
throttlingError = "throttlingError",
|
|
64
|
+
usageError = "usageError"
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// @public
|
|
68
|
+
export const ContainerErrorTypes: {
|
|
69
|
+
readonly clientSessionExpiredError: "clientSessionExpiredError";
|
|
70
|
+
readonly genericError: "genericError";
|
|
71
|
+
readonly throttlingError: "throttlingError";
|
|
72
|
+
readonly dataCorruptionError: "dataCorruptionError";
|
|
73
|
+
readonly dataProcessingError: "dataProcessingError";
|
|
74
|
+
readonly usageError: "usageError";
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// @public (undocumented)
|
|
78
|
+
export type ContainerErrorTypes = (typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];
|
|
79
|
+
|
|
80
|
+
// @public
|
|
81
|
+
export interface ContainerWarning extends IErrorBase {
|
|
82
|
+
logged?: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// @public
|
|
86
|
+
export interface IAudience extends EventEmitter {
|
|
87
|
+
getMember(clientId: string): IClient | undefined;
|
|
88
|
+
getMembers(): Map<string, IClient>;
|
|
89
|
+
on(event: "addMember" | "removeMember", listener: (clientId: string, client: IClient) => void): this;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// @public
|
|
93
|
+
export interface IAudienceOwner extends IAudience {
|
|
94
|
+
addMember(clientId: string, details: IClient): void;
|
|
95
|
+
removeMember(clientId: string): boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// @public
|
|
99
|
+
export interface IBatchMessage {
|
|
100
|
+
// (undocumented)
|
|
101
|
+
compression?: string;
|
|
102
|
+
// (undocumented)
|
|
103
|
+
contents?: string;
|
|
104
|
+
// (undocumented)
|
|
105
|
+
metadata: Record<string, unknown> | undefined;
|
|
106
|
+
// (undocumented)
|
|
107
|
+
referenceSequenceNumber?: number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// @public
|
|
111
|
+
export interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComparer> {
|
|
112
|
+
load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// @public
|
|
116
|
+
export interface IConnectionDetails {
|
|
117
|
+
checkpointSequenceNumber: number | undefined;
|
|
118
|
+
// (undocumented)
|
|
119
|
+
claims: ITokenClaims;
|
|
120
|
+
// (undocumented)
|
|
121
|
+
clientId: string;
|
|
122
|
+
// (undocumented)
|
|
123
|
+
serviceConfiguration: IClientConfiguration;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// @public
|
|
127
|
+
export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRouter {
|
|
128
|
+
attach(request: IRequest, attachProps?: {
|
|
129
|
+
deltaConnection?: "none" | "delayed";
|
|
130
|
+
}): Promise<void>;
|
|
131
|
+
readonly attachState: AttachState;
|
|
132
|
+
readonly audience: IAudience;
|
|
133
|
+
readonly clientId?: string | undefined;
|
|
134
|
+
close(error?: ICriticalContainerError): void;
|
|
135
|
+
readonly closed: boolean;
|
|
136
|
+
connect(): void;
|
|
137
|
+
readonly connectionState: ConnectionState;
|
|
138
|
+
deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
139
|
+
disconnect(): void;
|
|
140
|
+
dispose(error?: ICriticalContainerError): void;
|
|
141
|
+
readonly disposed?: boolean;
|
|
142
|
+
// @alpha
|
|
143
|
+
forceReadonly?(readonly: boolean): any;
|
|
144
|
+
getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
|
|
145
|
+
getEntryPoint(): Promise<FluidObject | undefined>;
|
|
146
|
+
getLoadedCodeDetails(): IFluidCodeDetails | undefined;
|
|
147
|
+
getQuorum(): IQuorumClients;
|
|
148
|
+
getSpecifiedCodeDetails(): IFluidCodeDetails | undefined;
|
|
149
|
+
// @deprecated (undocumented)
|
|
150
|
+
readonly IFluidRouter: IFluidRouter;
|
|
151
|
+
readonly isDirty: boolean;
|
|
152
|
+
proposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>;
|
|
153
|
+
readonly readOnlyInfo: ReadOnlyInfo;
|
|
154
|
+
// @deprecated (undocumented)
|
|
155
|
+
request(request: {
|
|
156
|
+
url: "/";
|
|
157
|
+
headers?: undefined;
|
|
158
|
+
}): Promise<IResponse>;
|
|
159
|
+
// @deprecated
|
|
160
|
+
request(request: IRequest): Promise<IResponse>;
|
|
161
|
+
resolvedUrl: IResolvedUrl | undefined;
|
|
162
|
+
serialize(): string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// @public
|
|
166
|
+
export interface IContainerContext {
|
|
167
|
+
readonly attachState: AttachState;
|
|
168
|
+
// (undocumented)
|
|
169
|
+
readonly audience: IAudience | undefined;
|
|
170
|
+
// (undocumented)
|
|
171
|
+
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
172
|
+
// (undocumented)
|
|
173
|
+
readonly clientDetails: IClientDetails;
|
|
174
|
+
// (undocumented)
|
|
175
|
+
readonly clientId: string | undefined;
|
|
176
|
+
// (undocumented)
|
|
177
|
+
readonly closeFn: (error?: ICriticalContainerError) => void;
|
|
178
|
+
// (undocumented)
|
|
179
|
+
readonly connected: boolean;
|
|
180
|
+
// (undocumented)
|
|
181
|
+
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
182
|
+
// (undocumented)
|
|
183
|
+
readonly disposeFn?: (error?: ICriticalContainerError) => void;
|
|
184
|
+
getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;
|
|
185
|
+
// (undocumented)
|
|
186
|
+
getLoadedFromVersion(): IVersion | undefined;
|
|
187
|
+
// @deprecated (undocumented)
|
|
188
|
+
getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;
|
|
189
|
+
// @deprecated
|
|
190
|
+
readonly id: string;
|
|
191
|
+
// (undocumented)
|
|
192
|
+
readonly loader: ILoader;
|
|
193
|
+
// (undocumented)
|
|
194
|
+
readonly options: ILoaderOptions;
|
|
195
|
+
// (undocumented)
|
|
196
|
+
pendingLocalState?: unknown;
|
|
197
|
+
// (undocumented)
|
|
198
|
+
readonly quorum: IQuorumClients;
|
|
199
|
+
readonly scope: FluidObject;
|
|
200
|
+
// (undocumented)
|
|
201
|
+
readonly storage: IDocumentStorageService;
|
|
202
|
+
// (undocumented)
|
|
203
|
+
readonly submitBatchFn: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number;
|
|
204
|
+
// @deprecated (undocumented)
|
|
205
|
+
readonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;
|
|
206
|
+
// (undocumented)
|
|
207
|
+
readonly submitSignalFn: (contents: any) => void;
|
|
208
|
+
// (undocumented)
|
|
209
|
+
readonly submitSummaryFn: (summaryOp: ISummaryContent, referenceSequenceNumber?: number) => number;
|
|
210
|
+
// (undocumented)
|
|
211
|
+
readonly supportedFeatures?: ReadonlyMap<string, unknown>;
|
|
212
|
+
// (undocumented)
|
|
213
|
+
readonly taggedLogger: ITelemetryBaseLogger;
|
|
214
|
+
// (undocumented)
|
|
215
|
+
updateDirtyContainerState(dirty: boolean): void;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// @public
|
|
219
|
+
export interface IContainerEvents extends IEvent {
|
|
220
|
+
(event: "readonly", listener: (readonly: boolean) => void): void;
|
|
221
|
+
(event: "connected", listener: (clientId: string) => void): any;
|
|
222
|
+
(event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void): any;
|
|
223
|
+
(event: "disconnected", listener: () => void): any;
|
|
224
|
+
(event: "attaching", listener: () => void): any;
|
|
225
|
+
(event: "attached", listener: () => void): any;
|
|
226
|
+
(event: "closed", listener: (error?: ICriticalContainerError) => void): any;
|
|
227
|
+
(event: "disposed", listener: (error?: ICriticalContainerError) => void): any;
|
|
228
|
+
(event: "warning", listener: (error: ContainerWarning) => void): any;
|
|
229
|
+
(event: "op", listener: (message: ISequencedDocumentMessage) => void): any;
|
|
230
|
+
(event: "dirty", listener: (dirty: boolean) => void): any;
|
|
231
|
+
(event: "saved", listener: (dirty: boolean) => void): any;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// @public (undocumented)
|
|
235
|
+
export interface IContainerLoadMode {
|
|
236
|
+
// (undocumented)
|
|
237
|
+
deltaConnection?: "none" | "delayed" | undefined;
|
|
238
|
+
// (undocumented)
|
|
239
|
+
opsBeforeReturn?: undefined | "sequenceNumber" | "cached" | "all";
|
|
240
|
+
pauseAfterLoad?: boolean;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// @public
|
|
244
|
+
export type ICriticalContainerError = IErrorBase;
|
|
245
|
+
|
|
246
|
+
// @public
|
|
247
|
+
export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {
|
|
248
|
+
readonly active: boolean;
|
|
249
|
+
readonly clientDetails: IClientDetails;
|
|
250
|
+
readonly hasCheckpointSequenceNumber: boolean;
|
|
251
|
+
readonly inbound: IDeltaQueue<T>;
|
|
252
|
+
readonly inboundSignal: IDeltaQueue<ISignalMessage>;
|
|
253
|
+
readonly initialSequenceNumber: number;
|
|
254
|
+
readonly lastKnownSeqNumber: number;
|
|
255
|
+
readonly lastMessage: ISequencedDocumentMessage | undefined;
|
|
256
|
+
readonly lastSequenceNumber: number;
|
|
257
|
+
readonly maxMessageSize: number;
|
|
258
|
+
readonly minimumSequenceNumber: number;
|
|
259
|
+
readonly outbound: IDeltaQueue<U[]>;
|
|
260
|
+
// (undocumented)
|
|
261
|
+
readonly readOnlyInfo: ReadOnlyInfo;
|
|
262
|
+
readonly serviceConfiguration: IClientConfiguration | undefined;
|
|
263
|
+
submitSignal(content: any): void;
|
|
264
|
+
readonly version: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// @public
|
|
268
|
+
export interface IDeltaManagerEvents extends IEvent {
|
|
269
|
+
// @deprecated (undocumented)
|
|
270
|
+
(event: "prepareSend", listener: (messageBuffer: any[]) => void): any;
|
|
271
|
+
// @deprecated (undocumented)
|
|
272
|
+
(event: "submitOp", listener: (message: IDocumentMessage) => void): any;
|
|
273
|
+
(event: "op", listener: (message: ISequencedDocumentMessage, processingTime: number) => void): any;
|
|
274
|
+
(event: "pong", listener: (latency: number) => void): any;
|
|
275
|
+
(event: "connect", listener: (details: IConnectionDetails, opsBehind?: number) => void): any;
|
|
276
|
+
(event: "disconnect", listener: (reason: string, error?: IAnyDriverError) => void): any;
|
|
277
|
+
(event: "readonly", listener: (readonly: boolean, readonlyConnectionReason?: {
|
|
278
|
+
reason: string;
|
|
279
|
+
error?: IErrorBase;
|
|
280
|
+
}) => void): any;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// @public
|
|
284
|
+
export interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {
|
|
285
|
+
idle: boolean;
|
|
286
|
+
length: number;
|
|
287
|
+
pause(): Promise<void>;
|
|
288
|
+
paused: boolean;
|
|
289
|
+
peek(): T | undefined;
|
|
290
|
+
resume(): void;
|
|
291
|
+
toArray(): T[];
|
|
292
|
+
waitTillProcessingDone(): Promise<{
|
|
293
|
+
count: number;
|
|
294
|
+
duration: number;
|
|
295
|
+
}>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// @public
|
|
299
|
+
export interface IDeltaQueueEvents<T> extends IErrorEvent {
|
|
300
|
+
(event: "push", listener: (task: T) => void): any;
|
|
301
|
+
(event: "op", listener: (task: T) => void): any;
|
|
302
|
+
(event: "idle", listener: (count: number, duration: number) => void): any;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// @public
|
|
306
|
+
export interface IDeltaSender {
|
|
307
|
+
flush(): void;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export { IErrorBase }
|
|
311
|
+
|
|
312
|
+
// @public
|
|
313
|
+
export interface IFluidBrowserPackage extends IFluidPackage {
|
|
314
|
+
// (undocumented)
|
|
315
|
+
fluid: {
|
|
316
|
+
browser: IFluidBrowserPackageEnvironment;
|
|
317
|
+
[environment: string]: IFluidPackageEnvironment;
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// @public
|
|
322
|
+
export interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment {
|
|
323
|
+
umd: {
|
|
324
|
+
files: string[];
|
|
325
|
+
library: string;
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// @public
|
|
330
|
+
export interface IFluidCodeDetails {
|
|
331
|
+
readonly config?: IFluidCodeDetailsConfig;
|
|
332
|
+
readonly package: string | Readonly<IFluidPackage>;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// @public (undocumented)
|
|
336
|
+
export const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
|
|
337
|
+
|
|
338
|
+
// @public
|
|
339
|
+
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
|
|
340
|
+
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
|
|
341
|
+
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// @public
|
|
345
|
+
export interface IFluidCodeDetailsConfig {
|
|
346
|
+
// (undocumented)
|
|
347
|
+
readonly [key: string]: string;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// @public
|
|
351
|
+
export interface IFluidCodeResolver {
|
|
352
|
+
resolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// @public (undocumented)
|
|
356
|
+
export interface IFluidModule {
|
|
357
|
+
// (undocumented)
|
|
358
|
+
fluidExport: FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// @public
|
|
362
|
+
export interface IFluidModuleWithDetails {
|
|
363
|
+
details: IFluidCodeDetails;
|
|
364
|
+
module: IFluidModule;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// @public
|
|
368
|
+
export interface IFluidPackage {
|
|
369
|
+
[key: string]: unknown;
|
|
370
|
+
fluid: {
|
|
371
|
+
[environment: string]: undefined | IFluidPackageEnvironment;
|
|
372
|
+
};
|
|
373
|
+
name: string;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// @public
|
|
377
|
+
export interface IFluidPackageEnvironment {
|
|
378
|
+
[target: string]: undefined | {
|
|
379
|
+
files: string[];
|
|
380
|
+
[key: string]: unknown;
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export { IGenericError }
|
|
385
|
+
|
|
386
|
+
// @public
|
|
387
|
+
export interface IHostLoader extends ILoader {
|
|
388
|
+
createDetachedContainer(codeDetails: IFluidCodeDetails, createDetachedProps?: {
|
|
389
|
+
canReconnect?: boolean;
|
|
390
|
+
clientDetailsOverride?: IClientDetails;
|
|
391
|
+
}): Promise<IContainer>;
|
|
392
|
+
rehydrateDetachedContainerFromSnapshot(snapshot: string, createDetachedProps?: {
|
|
393
|
+
canReconnect?: boolean;
|
|
394
|
+
clientDetailsOverride?: IClientDetails;
|
|
395
|
+
}): Promise<IContainer>;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// @public
|
|
399
|
+
export interface ILoader extends Partial<IProvideLoader> {
|
|
400
|
+
// @deprecated (undocumented)
|
|
401
|
+
readonly IFluidRouter: IFluidRouter;
|
|
402
|
+
// @deprecated (undocumented)
|
|
403
|
+
request(request: IRequest): Promise<IResponse>;
|
|
404
|
+
resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// @public
|
|
408
|
+
export interface ILoaderHeader {
|
|
409
|
+
// @deprecated (undocumented)
|
|
410
|
+
[LoaderHeader.cache]: boolean;
|
|
411
|
+
// (undocumented)
|
|
412
|
+
[LoaderHeader.clientDetails]: IClientDetails;
|
|
413
|
+
// (undocumented)
|
|
414
|
+
[LoaderHeader.reconnect]: boolean;
|
|
415
|
+
[LoaderHeader.sequenceNumber]: number;
|
|
416
|
+
// (undocumented)
|
|
417
|
+
[LoaderHeader.loadMode]: IContainerLoadMode;
|
|
418
|
+
// (undocumented)
|
|
419
|
+
[LoaderHeader.version]: string | undefined;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// @public (undocumented)
|
|
423
|
+
export type ILoaderOptions = {
|
|
424
|
+
[key in string | number]: any;
|
|
425
|
+
} & {
|
|
426
|
+
cache?: boolean;
|
|
427
|
+
provideScopeLoader?: boolean;
|
|
428
|
+
maxClientLeaveWaitTime?: number;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
// @public @deprecated (undocumented)
|
|
432
|
+
export interface IPendingLocalState {
|
|
433
|
+
// (undocumented)
|
|
434
|
+
pendingRuntimeState: unknown;
|
|
435
|
+
// (undocumented)
|
|
436
|
+
url: string;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// @public (undocumented)
|
|
440
|
+
export interface IProvideFluidCodeDetailsComparer {
|
|
441
|
+
// (undocumented)
|
|
442
|
+
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// @public (undocumented)
|
|
446
|
+
export interface IProvideLoader {
|
|
447
|
+
// (undocumented)
|
|
448
|
+
readonly ILoader: ILoader;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// @public (undocumented)
|
|
452
|
+
export interface IProvideRuntimeFactory {
|
|
453
|
+
// (undocumented)
|
|
454
|
+
readonly IRuntimeFactory: IRuntimeFactory;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// @public
|
|
458
|
+
export interface IResolvedFluidCodeDetails extends IFluidCodeDetails {
|
|
459
|
+
readonly resolvedPackage: Readonly<IFluidPackage>;
|
|
460
|
+
readonly resolvedPackageCacheId: string | undefined;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
// @public
|
|
464
|
+
export interface IRuntime extends IDisposable {
|
|
465
|
+
createSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;
|
|
466
|
+
getEntryPoint(): Promise<FluidObject | undefined>;
|
|
467
|
+
getPendingLocalState(props?: {
|
|
468
|
+
notifyImminentClosure?: boolean;
|
|
469
|
+
}): unknown;
|
|
470
|
+
// @deprecated
|
|
471
|
+
notifyAttaching(snapshot: ISnapshotTreeWithBlobContents): void;
|
|
472
|
+
notifyOpReplay?(message: ISequencedDocumentMessage): Promise<void>;
|
|
473
|
+
process(message: ISequencedDocumentMessage, local: boolean): any;
|
|
474
|
+
processSignal(message: any, local: boolean): any;
|
|
475
|
+
// @deprecated
|
|
476
|
+
request(request: IRequest): Promise<IResponse>;
|
|
477
|
+
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
|
|
478
|
+
setConnectionState(connected: boolean, clientId?: string): any;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
// @public (undocumented)
|
|
482
|
+
export const IRuntimeFactory: keyof IProvideRuntimeFactory;
|
|
483
|
+
|
|
484
|
+
// @public
|
|
485
|
+
export interface IRuntimeFactory extends IProvideRuntimeFactory {
|
|
486
|
+
instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// @public
|
|
490
|
+
export const isFluidBrowserPackage: (maybePkg: unknown) => maybePkg is Readonly<IFluidBrowserPackage>;
|
|
491
|
+
|
|
492
|
+
// @public
|
|
493
|
+
export const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
|
|
494
|
+
|
|
495
|
+
// @public
|
|
496
|
+
export const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
|
|
497
|
+
|
|
498
|
+
// @public
|
|
499
|
+
export interface ISnapshotTreeWithBlobContents extends ISnapshotTree {
|
|
500
|
+
// (undocumented)
|
|
501
|
+
blobsContents: {
|
|
502
|
+
[path: string]: ArrayBufferLike;
|
|
503
|
+
};
|
|
504
|
+
// (undocumented)
|
|
505
|
+
trees: {
|
|
506
|
+
[path: string]: ISnapshotTreeWithBlobContents;
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export { IThrottlingWarning }
|
|
511
|
+
|
|
512
|
+
export { IUsageError }
|
|
513
|
+
|
|
514
|
+
// @public
|
|
515
|
+
export enum LoaderHeader {
|
|
516
|
+
// @deprecated (undocumented)
|
|
517
|
+
cache = "fluid-cache",
|
|
518
|
+
// (undocumented)
|
|
519
|
+
clientDetails = "fluid-client-details",
|
|
520
|
+
loadMode = "loadMode",
|
|
521
|
+
// (undocumented)
|
|
522
|
+
reconnect = "fluid-reconnect",
|
|
523
|
+
sequenceNumber = "fluid-sequence-number",
|
|
524
|
+
version = "version"
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
// @public (undocumented)
|
|
528
|
+
export type ReadOnlyInfo = {
|
|
529
|
+
readonly readonly: false | undefined;
|
|
530
|
+
} | {
|
|
531
|
+
readonly readonly: true;
|
|
532
|
+
readonly forced: boolean;
|
|
533
|
+
readonly permissions: boolean | undefined;
|
|
534
|
+
readonly storageOnly: boolean;
|
|
535
|
+
readonly storageOnlyReason?: string;
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
```
|
package/dist/audience.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { EventEmitter } from "events";
|
|
|
6
6
|
import { IClient } from "@fluidframework/protocol-definitions";
|
|
7
7
|
/**
|
|
8
8
|
* Manages the state and the members for {@link IAudience}
|
|
9
|
+
* @public
|
|
9
10
|
*/
|
|
10
11
|
export interface IAudienceOwner extends IAudience {
|
|
11
12
|
/**
|
|
@@ -23,6 +24,7 @@ export interface IAudienceOwner extends IAudience {
|
|
|
23
24
|
*
|
|
24
25
|
* See {@link https://nodejs.org/api/events.html#class-eventemitter | here} for an overview of the `EventEmitter`
|
|
25
26
|
* class.
|
|
27
|
+
* @public
|
|
26
28
|
*/
|
|
27
29
|
export interface IAudience extends EventEmitter {
|
|
28
30
|
/**
|
package/dist/audience.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audience.d.ts","sourceRoot":"","sources":["../src/audience.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"audience.d.ts","sourceRoot":"","sources":["../src/audience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,SAAS;IAChD;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAEpD;;;OAGG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CACxC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC9C;;OAEG;IACH,EAAE,CACD,KAAK,EAAE,WAAW,GAAG,cAAc,EACnC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,GACnD,IAAI,CAAC;IAER;;OAEG;IACH,UAAU,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACjD"}
|
package/dist/audience.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audience.js","sourceRoot":"","sources":["../src/audience.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { EventEmitter } from \"events\";\nimport { IClient } from \"@fluidframework/protocol-definitions\";\n\n/**\n * Manages the state and the members for {@link IAudience}\n */\nexport interface IAudienceOwner extends IAudience {\n\t/**\n\t * Adds a new client to the audience\n\t */\n\taddMember(clientId: string, details: IClient): void;\n\n\t/**\n\t * Removes a client from the audience. Only emits an event if a client is actually removed\n\t * @returns if a client was removed from the audience\n\t */\n\tremoveMember(clientId: string): boolean;\n}\n\n/**\n * Audience represents all clients connected to the op stream, both read-only and read/write.\n *\n * See {@link https://nodejs.org/api/events.html#class-eventemitter | here} for an overview of the `EventEmitter`\n * class.\n */\nexport interface IAudience extends EventEmitter {\n\t/**\n\t * See {@link https://nodejs.dev/learn/the-nodejs-event-emitter | here} for an overview of `EventEmitter.on`.\n\t */\n\ton(\n\t\tevent: \"addMember\" | \"removeMember\",\n\t\tlistener: (clientId: string, client: IClient) => void,\n\t): this;\n\n\t/**\n\t * List all clients connected to the op stream, keyed off their clientId\n\t */\n\tgetMembers(): Map<string, IClient>;\n\n\t/**\n\t * Get details about the connected client with the specified clientId,\n\t * or undefined if the specified client isn't connected\n\t */\n\tgetMember(clientId: string): IClient | undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"audience.js","sourceRoot":"","sources":["../src/audience.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// False positive: this is an import from the `events` package, not from Node.\n// eslint-disable-next-line unicorn/prefer-node-protocol\nimport { EventEmitter } from \"events\";\nimport { IClient } from \"@fluidframework/protocol-definitions\";\n\n/**\n * Manages the state and the members for {@link IAudience}\n * @public\n */\nexport interface IAudienceOwner extends IAudience {\n\t/**\n\t * Adds a new client to the audience\n\t */\n\taddMember(clientId: string, details: IClient): void;\n\n\t/**\n\t * Removes a client from the audience. Only emits an event if a client is actually removed\n\t * @returns if a client was removed from the audience\n\t */\n\tremoveMember(clientId: string): boolean;\n}\n\n/**\n * Audience represents all clients connected to the op stream, both read-only and read/write.\n *\n * See {@link https://nodejs.org/api/events.html#class-eventemitter | here} for an overview of the `EventEmitter`\n * class.\n * @public\n */\nexport interface IAudience extends EventEmitter {\n\t/**\n\t * See {@link https://nodejs.dev/learn/the-nodejs-event-emitter | here} for an overview of `EventEmitter.on`.\n\t */\n\ton(\n\t\tevent: \"addMember\" | \"removeMember\",\n\t\tlistener: (clientId: string, client: IClient) => void,\n\t): this;\n\n\t/**\n\t * List all clients connected to the op stream, keyed off their clientId\n\t */\n\tgetMembers(): Map<string, IClient>;\n\n\t/**\n\t * Get details about the connected client with the specified clientId,\n\t * or undefined if the specified client isn't connected\n\t */\n\tgetMember(clientId: string): IClient | undefined;\n}\n"]}
|