@fluidframework/container-definitions 2.0.2 → 2.1.0-276326
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/api-extractor/api-extractor.legacy.json +4 -0
- package/api-report/container-definitions.beta.api.md +0 -35
- package/api-report/{container-definitions.alpha.api.md → container-definitions.legacy.alpha.api.md} +2 -35
- package/api-report/container-definitions.public.api.md +0 -35
- package/dist/audience.d.ts +1 -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/deltas.d.ts +7 -0
- package/dist/deltas.d.ts.map +1 -1
- package/dist/deltas.js.map +1 -1
- package/dist/error.d.ts +3 -0
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +1 -0
- package/dist/error.js.map +1 -1
- package/dist/fluidModule.d.ts +1 -0
- package/dist/fluidModule.d.ts.map +1 -1
- package/dist/fluidModule.js.map +1 -1
- package/dist/fluidPackage.d.ts +8 -0
- package/dist/fluidPackage.d.ts.map +1 -1
- package/dist/fluidPackage.js +2 -0
- package/dist/fluidPackage.js.map +1 -1
- package/dist/index.d.ts +1 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +1 -1
- package/dist/loader.d.ts +11 -0
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +1 -0
- package/dist/loader.js.map +1 -1
- package/dist/runtime.d.ts +7 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +1 -0
- package/dist/runtime.js.map +1 -1
- package/lib/audience.d.ts +1 -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 +7 -0
- package/lib/deltas.d.ts.map +1 -1
- package/lib/deltas.js.map +1 -1
- package/lib/error.d.ts +3 -0
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +1 -0
- package/lib/error.js.map +1 -1
- package/lib/fluidModule.d.ts +1 -0
- package/lib/fluidModule.d.ts.map +1 -1
- package/lib/fluidModule.js.map +1 -1
- package/lib/fluidPackage.d.ts +8 -0
- package/lib/fluidPackage.d.ts.map +1 -1
- package/lib/fluidPackage.js +2 -0
- package/lib/fluidPackage.js.map +1 -1
- package/lib/index.d.ts +1 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +1 -1
- package/lib/loader.d.ts +11 -0
- 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 +7 -0
- package/lib/runtime.d.ts.map +1 -1
- package/lib/runtime.js +1 -0
- package/lib/runtime.js.map +1 -1
- package/package.json +24 -11
- package/src/audience.ts +1 -0
- package/src/browserPackage.ts +3 -0
- package/src/deltas.ts +7 -0
- package/src/error.ts +3 -0
- package/src/fluidModule.ts +1 -0
- package/src/fluidPackage.ts +8 -0
- package/src/index.ts +0 -8
- package/src/loader.ts +11 -0
- package/src/runtime.ts +7 -0
|
@@ -4,37 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
-
import type { FluidObject } from '@fluidframework/core-interfaces';
|
|
8
|
-
import type { IAnyDriverError } from '@fluidframework/driver-definitions/internal';
|
|
9
|
-
import type { IClient } from '@fluidframework/driver-definitions';
|
|
10
|
-
import type { IClientConfiguration } from '@fluidframework/driver-definitions/internal';
|
|
11
|
-
import type { IClientDetails } from '@fluidframework/driver-definitions';
|
|
12
|
-
import type { IDisposable } from '@fluidframework/core-interfaces';
|
|
13
|
-
import type { IDocumentMessage } from '@fluidframework/driver-definitions/internal';
|
|
14
|
-
import type { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
15
|
-
import { IErrorBase } from '@fluidframework/core-interfaces/internal';
|
|
16
|
-
import type { IErrorBase as IErrorBase_2 } from '@fluidframework/core-interfaces';
|
|
17
|
-
import type { IErrorEvent } from '@fluidframework/core-interfaces';
|
|
18
|
-
import type { IEvent } from '@fluidframework/core-interfaces';
|
|
19
|
-
import type { IEventProvider } from '@fluidframework/core-interfaces';
|
|
20
|
-
import { IGenericError } from '@fluidframework/core-interfaces/internal';
|
|
21
|
-
import type { IQuorumClients } from '@fluidframework/driver-definitions';
|
|
22
|
-
import type { IRequest } from '@fluidframework/core-interfaces';
|
|
23
|
-
import type { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
24
|
-
import type { ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
|
|
25
|
-
import type { ISequencedProposal } from '@fluidframework/driver-definitions/internal';
|
|
26
|
-
import type { ISignalMessage } from '@fluidframework/driver-definitions/internal';
|
|
27
|
-
import type { ISnapshot } from '@fluidframework/driver-definitions/internal';
|
|
28
|
-
import type { ISnapshotTree } from '@fluidframework/driver-definitions/internal';
|
|
29
|
-
import type { ISummaryContent } from '@fluidframework/driver-definitions/internal';
|
|
30
|
-
import type { ISummaryTree } from '@fluidframework/driver-definitions';
|
|
31
|
-
import type { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
32
|
-
import { IThrottlingWarning } from '@fluidframework/core-interfaces/internal';
|
|
33
|
-
import type { ITokenClaims } from '@fluidframework/driver-definitions/internal';
|
|
34
|
-
import { IUsageError } from '@fluidframework/core-interfaces/internal';
|
|
35
|
-
import type { IVersion } from '@fluidframework/driver-definitions/internal';
|
|
36
|
-
import type { MessageType } from '@fluidframework/driver-definitions/internal';
|
|
37
|
-
|
|
38
7
|
// @public
|
|
39
8
|
export enum AttachState {
|
|
40
9
|
Attached = "Attached",
|
|
@@ -71,8 +40,6 @@ export type ICriticalContainerError = IErrorBase_2;
|
|
|
71
40
|
|
|
72
41
|
export { IErrorBase }
|
|
73
42
|
|
|
74
|
-
export { IGenericError }
|
|
75
|
-
|
|
76
43
|
// @public
|
|
77
44
|
export interface ISelf {
|
|
78
45
|
readonly client?: IClient;
|
|
@@ -81,6 +48,4 @@ export interface ISelf {
|
|
|
81
48
|
|
|
82
49
|
export { IThrottlingWarning }
|
|
83
50
|
|
|
84
|
-
export { IUsageError }
|
|
85
|
-
|
|
86
51
|
```
|
package/api-report/{container-definitions.alpha.api.md → container-definitions.legacy.alpha.api.md}
RENAMED
|
@@ -4,37 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
-
import type { FluidObject } from '@fluidframework/core-interfaces';
|
|
8
|
-
import type { IAnyDriverError } from '@fluidframework/driver-definitions/internal';
|
|
9
|
-
import type { IClient } from '@fluidframework/driver-definitions';
|
|
10
|
-
import type { IClientConfiguration } from '@fluidframework/driver-definitions/internal';
|
|
11
|
-
import type { IClientDetails } from '@fluidframework/driver-definitions';
|
|
12
|
-
import type { IDisposable } from '@fluidframework/core-interfaces';
|
|
13
|
-
import type { IDocumentMessage } from '@fluidframework/driver-definitions/internal';
|
|
14
|
-
import type { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
15
|
-
import { IErrorBase } from '@fluidframework/core-interfaces/internal';
|
|
16
|
-
import type { IErrorBase as IErrorBase_2 } from '@fluidframework/core-interfaces';
|
|
17
|
-
import type { IErrorEvent } from '@fluidframework/core-interfaces';
|
|
18
|
-
import type { IEvent } from '@fluidframework/core-interfaces';
|
|
19
|
-
import type { IEventProvider } from '@fluidframework/core-interfaces';
|
|
20
|
-
import { IGenericError } from '@fluidframework/core-interfaces/internal';
|
|
21
|
-
import type { IQuorumClients } from '@fluidframework/driver-definitions';
|
|
22
|
-
import type { IRequest } from '@fluidframework/core-interfaces';
|
|
23
|
-
import type { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
24
|
-
import type { ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
|
|
25
|
-
import type { ISequencedProposal } from '@fluidframework/driver-definitions/internal';
|
|
26
|
-
import type { ISignalMessage } from '@fluidframework/driver-definitions/internal';
|
|
27
|
-
import type { ISnapshot } from '@fluidframework/driver-definitions/internal';
|
|
28
|
-
import type { ISnapshotTree } from '@fluidframework/driver-definitions/internal';
|
|
29
|
-
import type { ISummaryContent } from '@fluidframework/driver-definitions/internal';
|
|
30
|
-
import type { ISummaryTree } from '@fluidframework/driver-definitions';
|
|
31
|
-
import type { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
32
|
-
import { IThrottlingWarning } from '@fluidframework/core-interfaces/internal';
|
|
33
|
-
import type { ITokenClaims } from '@fluidframework/driver-definitions/internal';
|
|
34
|
-
import { IUsageError } from '@fluidframework/core-interfaces/internal';
|
|
35
|
-
import type { IVersion } from '@fluidframework/driver-definitions/internal';
|
|
36
|
-
import type { MessageType } from '@fluidframework/driver-definitions/internal';
|
|
37
|
-
|
|
38
7
|
// @public
|
|
39
8
|
export enum AttachState {
|
|
40
9
|
Attached = "Attached",
|
|
@@ -361,8 +330,6 @@ export interface IFluidPackageEnvironment {
|
|
|
361
330
|
};
|
|
362
331
|
}
|
|
363
332
|
|
|
364
|
-
export { IGenericError }
|
|
365
|
-
|
|
366
333
|
// @alpha
|
|
367
334
|
export interface IGetPendingLocalStateProps {
|
|
368
335
|
readonly notifyImminentClosure: boolean;
|
|
@@ -461,8 +428,6 @@ export interface ISnapshotTreeWithBlobContents extends ISnapshotTree {
|
|
|
461
428
|
|
|
462
429
|
export { IThrottlingWarning }
|
|
463
430
|
|
|
464
|
-
export { IUsageError }
|
|
465
|
-
|
|
466
431
|
// @alpha
|
|
467
432
|
export enum LoaderHeader {
|
|
468
433
|
// @deprecated (undocumented)
|
|
@@ -487,4 +452,6 @@ export type ReadOnlyInfo = {
|
|
|
487
452
|
readonly storageOnlyReason?: string;
|
|
488
453
|
};
|
|
489
454
|
|
|
455
|
+
// (No @packageDocumentation comment for this package)
|
|
456
|
+
|
|
490
457
|
```
|
|
@@ -4,37 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
-
import type { FluidObject } from '@fluidframework/core-interfaces';
|
|
8
|
-
import type { IAnyDriverError } from '@fluidframework/driver-definitions/internal';
|
|
9
|
-
import type { IClient } from '@fluidframework/driver-definitions';
|
|
10
|
-
import type { IClientConfiguration } from '@fluidframework/driver-definitions/internal';
|
|
11
|
-
import type { IClientDetails } from '@fluidframework/driver-definitions';
|
|
12
|
-
import type { IDisposable } from '@fluidframework/core-interfaces';
|
|
13
|
-
import type { IDocumentMessage } from '@fluidframework/driver-definitions/internal';
|
|
14
|
-
import type { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
15
|
-
import { IErrorBase } from '@fluidframework/core-interfaces/internal';
|
|
16
|
-
import type { IErrorBase as IErrorBase_2 } from '@fluidframework/core-interfaces';
|
|
17
|
-
import type { IErrorEvent } from '@fluidframework/core-interfaces';
|
|
18
|
-
import type { IEvent } from '@fluidframework/core-interfaces';
|
|
19
|
-
import type { IEventProvider } from '@fluidframework/core-interfaces';
|
|
20
|
-
import { IGenericError } from '@fluidframework/core-interfaces/internal';
|
|
21
|
-
import type { IQuorumClients } from '@fluidframework/driver-definitions';
|
|
22
|
-
import type { IRequest } from '@fluidframework/core-interfaces';
|
|
23
|
-
import type { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
24
|
-
import type { ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
|
|
25
|
-
import type { ISequencedProposal } from '@fluidframework/driver-definitions/internal';
|
|
26
|
-
import type { ISignalMessage } from '@fluidframework/driver-definitions/internal';
|
|
27
|
-
import type { ISnapshot } from '@fluidframework/driver-definitions/internal';
|
|
28
|
-
import type { ISnapshotTree } from '@fluidframework/driver-definitions/internal';
|
|
29
|
-
import type { ISummaryContent } from '@fluidframework/driver-definitions/internal';
|
|
30
|
-
import type { ISummaryTree } from '@fluidframework/driver-definitions';
|
|
31
|
-
import type { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
32
|
-
import { IThrottlingWarning } from '@fluidframework/core-interfaces/internal';
|
|
33
|
-
import type { ITokenClaims } from '@fluidframework/driver-definitions/internal';
|
|
34
|
-
import { IUsageError } from '@fluidframework/core-interfaces/internal';
|
|
35
|
-
import type { IVersion } from '@fluidframework/driver-definitions/internal';
|
|
36
|
-
import type { MessageType } from '@fluidframework/driver-definitions/internal';
|
|
37
|
-
|
|
38
7
|
// @public
|
|
39
8
|
export enum AttachState {
|
|
40
9
|
Attached = "Attached",
|
|
@@ -71,8 +40,6 @@ export type ICriticalContainerError = IErrorBase_2;
|
|
|
71
40
|
|
|
72
41
|
export { IErrorBase }
|
|
73
42
|
|
|
74
|
-
export { IGenericError }
|
|
75
|
-
|
|
76
43
|
// @public
|
|
77
44
|
export interface ISelf {
|
|
78
45
|
readonly client?: IClient;
|
|
@@ -81,6 +48,4 @@ export interface ISelf {
|
|
|
81
48
|
|
|
82
49
|
export { IThrottlingWarning }
|
|
83
50
|
|
|
84
|
-
export { IUsageError }
|
|
85
|
-
|
|
86
51
|
```
|
package/dist/audience.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { IEvent, IEventProvider } from "@fluidframework/core-interfaces";
|
|
|
6
6
|
import type { IClient } from "@fluidframework/driver-definitions";
|
|
7
7
|
/**
|
|
8
8
|
* Manages the state and the members for {@link IAudience}
|
|
9
|
+
* @legacy
|
|
9
10
|
* @alpha
|
|
10
11
|
*/
|
|
11
12
|
export interface IAudienceOwner extends IAudience {
|
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;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAClE
|
|
1
|
+
{"version":3,"file":"audience.d.ts","sourceRoot":"","sources":["../src/audience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAClE;;;;GAIG;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;IAExC;;;OAGG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,MAAM;IAC9C;;;OAGG;IACH,CACC,KAAK,EAAE,WAAW,GAAG,cAAc,EACnC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,GACnD,IAAI,CAAC;IACR;;;;;;OAMG;IACH,CACC,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,SAAS,EAAE,QAAQ,EAAE,KAAK,KAAK,IAAI,GAC9D,IAAI,CAAC;CACR;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK;IACrB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;OASG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,eAAe,CAAC;IACjE;;;;;;;;;;OAUG;IACH,UAAU,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,OAAO,IAAI,KAAK,GAAG,SAAS,CAAC;CAC7B"}
|
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 type { IEvent, IEventProvider } from \"@fluidframework/core-interfaces\";\nimport type { IClient } from \"@fluidframework/driver-definitions\";\n/**\n * Manages the state and the members for {@link IAudience}\n * @alpha\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\t/**\n\t * Notifies Audience that current clientId has changed.\n\t * See {@link IAudience.getSelf} and {@link IAudienceEvents}'s \"selfChanged\" event for more details.\n\t */\n\tsetCurrentClientId(clientId: string): void;\n}\n\n/**\n * Interface describing Audience events\n * @public\n */\nexport interface IAudienceEvents extends IEvent {\n\t/**\n\t * \"addMember\" event is raised when a new user joins collaborative session.\n\t * \"removeMember\" event is raised when a user leaves collaborative session.\n\t */\n\t(\n\t\tevent: \"addMember\" | \"removeMember\",\n\t\tlistener: (clientId: string, client: IClient) => void,\n\t): void;\n\t/**\n\t * Notifies that client established new connection and caught-up on ops.\n\t * @param oldValue - represents old connection. Please note that oldValue.client in almost all cases will be undefined,\n\t * due to specifics how Audience refreshes on reconnect. In the future we could improve it and always provide client information.\n\t * @param newValue - represents newly established connection. While {@link IAudience.getSelf} is experimental, it's not guaranteed that\n\t * newValue.client is present. Same is true if you are consuming audience from container runtime layer and running against old version of loader.\n\t */\n\t(\n\t\tevent: \"selfChanged\",\n\t\tlistener: (oldValue: ISelf | undefined, newValue: ISelf) => void,\n\t): void;\n}\n\n/**\n * Return type of {@link IAudience.getSelf}. Please see remarks for {@link IAudience.getSelf} to learn more details on promises.\n * @public\n */\nexport interface ISelf {\n\t/**\n\t * clientId of current or previous connection (if client is in disconnected or reconnecting / catching up state)\n\t * It changes only when client has reconnected, caught up with latest ops.\n\t */\n\treadonly clientId: string;\n\n\t/**\n\t * Information about current client (including user identity, connection properties), supplied by ordering service when\n\t * client connected to it and received {@link ISelf.clientId}.\n\t * If present (not undefined), it's same value as calling IAudience.getMember(clientId).\n\t * This property could be undefined even if there is non-undefined clientId.\n\t * This could happen in the following cases:\n\t * 1) Container was loaded from stash, by providing IPendingContainerState state to Container.load().\n\t * 2) Container is in the process of establishing new connection. Information about old connection is already reset\n\t * (old clientId is no longer in list of members), but clientId has not yet changed to a new value.\n\t */\n\treadonly client?: IClient;\n}\n\n/**\n * Represents all clients connected to the op stream, both read-only and read/write.\n *\n * @remarks Access to the Audience when a container is disconnected is a tricky subject.\n * See the remarks on specific methods for more details.\n *\n * @public\n */\nexport interface IAudience extends IEventProvider<IAudienceEvents> {\n\t/**\n\t * List all clients connected to the op stream, keyed off their clientId.\n\t *\n\t * @remarks When the container is disconnected, there are no guarantees about the correctness of what this method returns.\n\t * The default implementation in Fluid Framework continues to return the list of members as it last saw it before the\n\t * container disconnected, but this could change in the future. Other implementations could decide to return an empty\n\t * list, or a list that only includes the local client.\n\t *\n\t * Note that the clientId that a disconnected container might see for itself is an old one. A disconnected container\n\t * does not technically have a clientId tied to an active connection to the service.\n\t */\n\tgetMembers(): Map<string, IClient>;\n\n\t/**\n\t * Get details about the connected client with the specified clientId, or undefined if the specified client isn't connected.\n\t *\n\t * @remarks When the container is disconnected, there are no guarantees about the correctness of what this method returns.\n\t * The default implementation in Fluid Framework continues to return members that were part of the audience when the\n\t * container disconnected, but this could change in the future. Other implementations could decide to always return\n\t * undefined, or only return an IClient when the local client is requested.\n\t *\n\t * Note that the clientId that a disconnected container might see for itself is an old one. A disconnected container\n\t * does not technically have a clientId tied to an active connection to the service.\n\t */\n\tgetMember(clientId: string): IClient | undefined;\n\n\t/**\n\t * Returns information about client's connection. Please see {@link ISelf} member descriptions for more details.\n\t * undefined if this client has never connected to the ordering service.\n\t * Please see {@link ISelf.clientId} for more details on when values returned by this function change over time.\n\t *\n\t * @experimental\n\t *\n\t * @remarks\n\t * This API is experimental.\n\t *\n\t * Reconnection process will have these phases:\n\t * 1. Establishing connection phase:\n\t * - new connection clientId is added to member's list. That said, self.clientId still reflects old information.\n\t * - The old client's information is removed from members' list. getMember(self.clientId) will return undefined.\n\t * 2. Catch-up phase. Client catches up on latest ops and becomes current.\n\t * 3. \"connect\" phase - the following happens synchronously:\n\t * - getSelf() information changes to reflect new connection\n\t * - \"selfChanged\" event on this object fires\n\t * - Various API surfaces may expose \"connected\" event. This event fires at the same time as self changes. That said, \"connected\" event will not fire at ContainerRuntime layer if container is read-only.\n\t *\n\t * That said, at the moment this is an experimental API. It depends on some experimental settings that might change in the future.\n\t * Events described in phase #3 may not happen at the same time if kill-bit feature gates are engaged due to a bug discovered in new logic\n\t * that delivers this functionality. Once it's proven (at scale) that everything works well, experimental tag will be removed.\n\t * Also application that deploy loader & container runtime bundles independently will see new (synchronized) behavior only when loader changes are deployed.\n\t * Newer runtimes will continue to observe old (non-synchronized) behavior when paired with older loader code.\n\t *\n\t * When promises in phase #3 are broken (due to conditions described above), consumers could experience current clientId being changed\n\t * (and \"selfChanged\" event fired) while\n\t * 1. Such clientId is not present in Audience\n\t * 2. Client is not fully caught up\n\t */\n\tgetSelf(): ISelf | 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\nimport type { IEvent, IEventProvider } from \"@fluidframework/core-interfaces\";\nimport type { IClient } from \"@fluidframework/driver-definitions\";\n/**\n * Manages the state and the members for {@link IAudience}\n * @legacy\n * @alpha\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\t/**\n\t * Notifies Audience that current clientId has changed.\n\t * See {@link IAudience.getSelf} and {@link IAudienceEvents}'s \"selfChanged\" event for more details.\n\t */\n\tsetCurrentClientId(clientId: string): void;\n}\n\n/**\n * Interface describing Audience events\n * @public\n */\nexport interface IAudienceEvents extends IEvent {\n\t/**\n\t * \"addMember\" event is raised when a new user joins collaborative session.\n\t * \"removeMember\" event is raised when a user leaves collaborative session.\n\t */\n\t(\n\t\tevent: \"addMember\" | \"removeMember\",\n\t\tlistener: (clientId: string, client: IClient) => void,\n\t): void;\n\t/**\n\t * Notifies that client established new connection and caught-up on ops.\n\t * @param oldValue - represents old connection. Please note that oldValue.client in almost all cases will be undefined,\n\t * due to specifics how Audience refreshes on reconnect. In the future we could improve it and always provide client information.\n\t * @param newValue - represents newly established connection. While {@link IAudience.getSelf} is experimental, it's not guaranteed that\n\t * newValue.client is present. Same is true if you are consuming audience from container runtime layer and running against old version of loader.\n\t */\n\t(\n\t\tevent: \"selfChanged\",\n\t\tlistener: (oldValue: ISelf | undefined, newValue: ISelf) => void,\n\t): void;\n}\n\n/**\n * Return type of {@link IAudience.getSelf}. Please see remarks for {@link IAudience.getSelf} to learn more details on promises.\n * @public\n */\nexport interface ISelf {\n\t/**\n\t * clientId of current or previous connection (if client is in disconnected or reconnecting / catching up state)\n\t * It changes only when client has reconnected, caught up with latest ops.\n\t */\n\treadonly clientId: string;\n\n\t/**\n\t * Information about current client (including user identity, connection properties), supplied by ordering service when\n\t * client connected to it and received {@link ISelf.clientId}.\n\t * If present (not undefined), it's same value as calling IAudience.getMember(clientId).\n\t * This property could be undefined even if there is non-undefined clientId.\n\t * This could happen in the following cases:\n\t * 1) Container was loaded from stash, by providing IPendingContainerState state to Container.load().\n\t * 2) Container is in the process of establishing new connection. Information about old connection is already reset\n\t * (old clientId is no longer in list of members), but clientId has not yet changed to a new value.\n\t */\n\treadonly client?: IClient;\n}\n\n/**\n * Represents all clients connected to the op stream, both read-only and read/write.\n *\n * @remarks Access to the Audience when a container is disconnected is a tricky subject.\n * See the remarks on specific methods for more details.\n *\n * @public\n */\nexport interface IAudience extends IEventProvider<IAudienceEvents> {\n\t/**\n\t * List all clients connected to the op stream, keyed off their clientId.\n\t *\n\t * @remarks When the container is disconnected, there are no guarantees about the correctness of what this method returns.\n\t * The default implementation in Fluid Framework continues to return the list of members as it last saw it before the\n\t * container disconnected, but this could change in the future. Other implementations could decide to return an empty\n\t * list, or a list that only includes the local client.\n\t *\n\t * Note that the clientId that a disconnected container might see for itself is an old one. A disconnected container\n\t * does not technically have a clientId tied to an active connection to the service.\n\t */\n\tgetMembers(): Map<string, IClient>;\n\n\t/**\n\t * Get details about the connected client with the specified clientId, or undefined if the specified client isn't connected.\n\t *\n\t * @remarks When the container is disconnected, there are no guarantees about the correctness of what this method returns.\n\t * The default implementation in Fluid Framework continues to return members that were part of the audience when the\n\t * container disconnected, but this could change in the future. Other implementations could decide to always return\n\t * undefined, or only return an IClient when the local client is requested.\n\t *\n\t * Note that the clientId that a disconnected container might see for itself is an old one. A disconnected container\n\t * does not technically have a clientId tied to an active connection to the service.\n\t */\n\tgetMember(clientId: string): IClient | undefined;\n\n\t/**\n\t * Returns information about client's connection. Please see {@link ISelf} member descriptions for more details.\n\t * undefined if this client has never connected to the ordering service.\n\t * Please see {@link ISelf.clientId} for more details on when values returned by this function change over time.\n\t *\n\t * @experimental\n\t *\n\t * @remarks\n\t * This API is experimental.\n\t *\n\t * Reconnection process will have these phases:\n\t * 1. Establishing connection phase:\n\t * - new connection clientId is added to member's list. That said, self.clientId still reflects old information.\n\t * - The old client's information is removed from members' list. getMember(self.clientId) will return undefined.\n\t * 2. Catch-up phase. Client catches up on latest ops and becomes current.\n\t * 3. \"connect\" phase - the following happens synchronously:\n\t * - getSelf() information changes to reflect new connection\n\t * - \"selfChanged\" event on this object fires\n\t * - Various API surfaces may expose \"connected\" event. This event fires at the same time as self changes. That said, \"connected\" event will not fire at ContainerRuntime layer if container is read-only.\n\t *\n\t * That said, at the moment this is an experimental API. It depends on some experimental settings that might change in the future.\n\t * Events described in phase #3 may not happen at the same time if kill-bit feature gates are engaged due to a bug discovered in new logic\n\t * that delivers this functionality. Once it's proven (at scale) that everything works well, experimental tag will be removed.\n\t * Also application that deploy loader & container runtime bundles independently will see new (synchronized) behavior only when loader changes are deployed.\n\t * Newer runtimes will continue to observe old (non-synchronized) behavior when paired with older loader code.\n\t *\n\t * When promises in phase #3 are broken (due to conditions described above), consumers could experience current clientId being changed\n\t * (and \"selfChanged\" event fired) while\n\t * 1. Such clientId is not present in Audience\n\t * 2. Client is not fully caught up\n\t */\n\tgetSelf(): ISelf | undefined;\n}\n"]}
|
package/dist/browserPackage.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { IFluidPackage, IFluidPackageEnvironment } from "./fluidPackage.js";
|
|
6
6
|
/**
|
|
7
7
|
* A specific Fluid package environment for browsers
|
|
8
|
+
* @legacy
|
|
8
9
|
* @alpha
|
|
9
10
|
*/
|
|
10
11
|
export interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment {
|
|
@@ -27,6 +28,7 @@ export interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironmen
|
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
30
|
* A Fluid package for specification for browser environments
|
|
31
|
+
* @legacy
|
|
30
32
|
* @alpha
|
|
31
33
|
*/
|
|
32
34
|
export interface IFluidBrowserPackage extends IFluidPackage {
|
|
@@ -47,6 +49,7 @@ export interface IFluidBrowserPackage extends IFluidPackage {
|
|
|
47
49
|
/**
|
|
48
50
|
* Determines if any object is an IFluidBrowserPackage
|
|
49
51
|
* @param maybePkg - The object to check for compatibility with IFluidBrowserPackage
|
|
52
|
+
* @legacy
|
|
50
53
|
* @alpha
|
|
51
54
|
*/
|
|
52
55
|
export declare const isFluidBrowserPackage: (maybePkg: unknown) => maybePkg is Readonly<IFluidBrowserPackage>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserPackage.d.ts","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAGjF
|
|
1
|
+
{"version":3,"file":"browserPackage.d.ts","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAGjF;;;;GAIG;AACH,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;IAChF;;;OAGG;IACH,GAAG,EAAE;QACJ;;;WAGG;QACH,KAAK,EAAE,MAAM,EAAE,CAAC;QAEhB;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IAC1D;;OAEG;IACH,KAAK,EAAE;QACN;;WAEG;QACH,OAAO,EAAE,+BAA+B,CAAC;QACzC;;WAEG;QACH,CAAC,WAAW,EAAE,MAAM,GAAG,wBAAwB,CAAC;KAChD,CAAC;CACF;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,aACvB,OAAO,+CAIkC,CAAC"}
|
package/dist/browserPackage.js
CHANGED
|
@@ -9,6 +9,7 @@ const fluidPackage_js_1 = require("./fluidPackage.js");
|
|
|
9
9
|
/**
|
|
10
10
|
* Determines if any object is an IFluidBrowserPackage
|
|
11
11
|
* @param maybePkg - The object to check for compatibility with IFluidBrowserPackage
|
|
12
|
+
* @legacy
|
|
12
13
|
* @alpha
|
|
13
14
|
*/
|
|
14
15
|
const isFluidBrowserPackage = (maybePkg) => (0, fluidPackage_js_1.isFluidPackage)(maybePkg) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserPackage.js","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uDAAmD;
|
|
1
|
+
{"version":3,"file":"browserPackage.js","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uDAAmD;AAgDnD;;;;;GAKG;AACI,MAAM,qBAAqB,GAAG,CACpC,QAAiB,EAC4B,EAAE,CAC/C,IAAA,gCAAc,EAAC,QAAQ,CAAC;IACxB,OAAO,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,KAAK,QAAQ;IAC1D,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AALxC,QAAA,qBAAqB,yBAKmB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidPackage, IFluidPackageEnvironment } from \"./fluidPackage.js\";\nimport { isFluidPackage } from \"./fluidPackage.js\";\n\n/**\n * A specific Fluid package environment for browsers\n * @legacy\n * @alpha\n */\nexport interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment {\n\t/**\n\t * The Universal Module Definition (umd) target specifics the scripts necessary for\n\t * loading a packages in a browser environment and finding its entry point.\n\t */\n\tumd: {\n\t\t/**\n\t\t * The bundled js files for loading this package.\n\t\t * These files will be loaded and executed in order.\n\t\t */\n\t\tfiles: string[];\n\n\t\t/**\n\t\t * The global name that the script entry points will be exposed.\n\t\t * This entry point should be an {@link @fluidframework/container-definitions#IFluidModule}.\n\t\t */\n\t\tlibrary: string;\n\t};\n}\n\n/**\n * A Fluid package for specification for browser environments\n * @legacy\n * @alpha\n */\nexport interface IFluidBrowserPackage extends IFluidPackage {\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidPackage.fluid}\n\t */\n\tfluid: {\n\t\t/**\n\t\t * The browser specific package information for this package\n\t\t */\n\t\tbrowser: IFluidBrowserPackageEnvironment;\n\t\t/**\n\t\t * {@inheritDoc @fluidframework/core-interfaces#IFluidPackage.fluid.environment}\n\t\t */\n\t\t[environment: string]: IFluidPackageEnvironment;\n\t};\n}\n\n/**\n * Determines if any object is an IFluidBrowserPackage\n * @param maybePkg - The object to check for compatibility with IFluidBrowserPackage\n * @legacy\n * @alpha\n */\nexport const isFluidBrowserPackage = (\n\tmaybePkg: unknown,\n): maybePkg is Readonly<IFluidBrowserPackage> =>\n\tisFluidPackage(maybePkg) &&\n\ttypeof maybePkg?.fluid?.browser?.umd?.library === \"string\" &&\n\tArray.isArray(maybePkg?.fluid?.browser?.umd?.files);\n"]}
|
package/dist/deltas.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { IClientDetails } from "@fluidframework/driver-definitions";
|
|
|
7
7
|
import type { IAnyDriverError, IClientConfiguration, IDocumentMessage, ITokenClaims, ISequencedDocumentMessage, ISignalMessage } from "@fluidframework/driver-definitions/internal";
|
|
8
8
|
/**
|
|
9
9
|
* Contract representing the result of a newly established connection to the server for syncing deltas.
|
|
10
|
+
* @legacy
|
|
10
11
|
* @alpha
|
|
11
12
|
*/
|
|
12
13
|
export interface IConnectionDetails {
|
|
@@ -33,6 +34,7 @@ export interface IConnectionDetails {
|
|
|
33
34
|
/**
|
|
34
35
|
* Contract supporting delivery of outbound messages to the server
|
|
35
36
|
* @sealed
|
|
37
|
+
* @legacy
|
|
36
38
|
* @alpha
|
|
37
39
|
*/
|
|
38
40
|
export interface IDeltaSender {
|
|
@@ -44,6 +46,7 @@ export interface IDeltaSender {
|
|
|
44
46
|
/**
|
|
45
47
|
* Events emitted by {@link IDeltaManager}.
|
|
46
48
|
* @sealed
|
|
49
|
+
* @legacy
|
|
47
50
|
* @alpha
|
|
48
51
|
*/
|
|
49
52
|
export interface IDeltaManagerEvents extends IEvent {
|
|
@@ -114,6 +117,7 @@ export interface IDeltaManagerEvents extends IEvent {
|
|
|
114
117
|
/**
|
|
115
118
|
* Manages the transmission of ops between the runtime and storage.
|
|
116
119
|
* @sealed
|
|
120
|
+
* @legacy
|
|
117
121
|
* @alpha
|
|
118
122
|
*/
|
|
119
123
|
export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {
|
|
@@ -187,6 +191,7 @@ export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>
|
|
|
187
191
|
/**
|
|
188
192
|
* Events emitted by {@link IDeltaQueue}.
|
|
189
193
|
* @sealed
|
|
194
|
+
* @legacy
|
|
190
195
|
* @alpha
|
|
191
196
|
*/
|
|
192
197
|
export interface IDeltaQueueEvents<T> extends IErrorEvent {
|
|
@@ -228,6 +233,7 @@ export interface IDeltaQueueEvents<T> extends IErrorEvent {
|
|
|
228
233
|
/**
|
|
229
234
|
* Queue of ops to be sent to or processed from storage
|
|
230
235
|
* @sealed
|
|
236
|
+
* @legacy
|
|
231
237
|
* @alpha
|
|
232
238
|
*/
|
|
233
239
|
export interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {
|
|
@@ -272,6 +278,7 @@ export interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, ID
|
|
|
272
278
|
}>;
|
|
273
279
|
}
|
|
274
280
|
/**
|
|
281
|
+
* @legacy
|
|
275
282
|
* @alpha
|
|
276
283
|
*/
|
|
277
284
|
export type ReadOnlyInfo = {
|
package/dist/deltas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deltas.d.ts","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,MAAM,EACN,cAAc,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EACX,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,yBAAyB,EACzB,cAAc,EACd,MAAM,6CAA6C,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"deltas.d.ts","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":"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"}
|
package/dist/deltas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.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 type {\n\tIDisposable,\n\tIErrorBase,\n\tIErrorEvent,\n\tIEvent,\n\tIEventProvider,\n} from \"@fluidframework/core-interfaces\";\nimport type { IClientDetails } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIAnyDriverError,\n\tIClientConfiguration,\n\tIDocumentMessage,\n\tITokenClaims,\n\tISequencedDocumentMessage,\n\tISignalMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Contract representing the result of a newly established connection to the server for syncing deltas.\n * @alpha\n */\nexport interface IConnectionDetails {\n\t/**\n\t * The client's unique identifier assigned by the service.\n\t *\n\t * @remarks It is not stable across reconnections.\n\t */\n\tclientId: string;\n\n\tclaims: ITokenClaims;\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection.\n\t *\n\t * @remarks\n\t *\n\t * It may lag behind the actual last sequence number (quite a bit, if the container is very active),\n\t * but it's the best information the client has to figure out how far behind it is, at least\n\t * for \"read\" connections. \"write\" connections may use the client's own \"join\" op to obtain similar\n\t * information which is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber: number | undefined;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n * @sealed\n * @alpha\n */\nexport interface IDeltaSender {\n\t/**\n\t * Flush all pending messages through the outbound queue\n\t */\n\tflush(): void;\n}\n\n/**\n * Events emitted by {@link IDeltaManager}.\n * @sealed\n * @alpha\n */\nexport interface IDeltaManagerEvents extends IEvent {\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaManager}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t *\n\t * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.\n\t */\n\t(\n\t\tevent: \"op\",\n\t\tlistener: (message: ISequencedDocumentMessage, processingTime: number) => void,\n\t);\n\n\t/**\n\t * Emitted periodically with latest information on network roundtrip latency\n\t */\n\t(event: \"pong\", listener: (latency: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.\n\t *\n\t * @remarks\n\t * This occurs once we've received the connect_document_success message from the server,\n\t * and happens prior to the client's join message (if there is a join message).\n\t *\n\t * Listener parameters:\n\t *\n\t * - `details`: Connection metadata.\n\t *\n\t * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.\n\t * Will not be specified if an estimate cannot be determined.\n\t */\n\t(event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `reason`: Describes the reason for which the delta manager was disconnected.\n\t * - `error` : error if any for the disconnect.\n\t */\n\t(event: \"disconnect\", listener: (reason: string, error?: IAnyDriverError) => void);\n\n\t/**\n\t * Emitted when read/write permissions change.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the delta manager is now read-only.\n\t */\n\t(\n\t\tevent: \"readonly\",\n\t\tlistener: (\n\t\t\treadonly: boolean,\n\t\t\treadonlyConnectionReason?: { reason: string; error?: IErrorBase },\n\t\t) => void,\n\t);\n}\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n * @sealed\n * @alpha\n */\nexport interface IDeltaManager<T, U>\n\textends IEventProvider<IDeltaManagerEvents>,\n\t\tIDeltaSender {\n\t/**\n\t * The queue of inbound delta messages\n\t * @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime\n\t * may break if this is used directly. For example summarization and op processing.\n\t */\n\treadonly inbound: IDeltaQueue<T>;\n\n\t/**\n\t * The queue of outbound delta messages\n\t * @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime\n\t * may break if this is used directly. For example op submission\n\t */\n\treadonly outbound: IDeltaQueue<U[]>;\n\n\t/**\n\t * The queue of inbound delta signals\n\t */\n\treadonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\t/**\n\t * The current minimum sequence number\n\t */\n\treadonly minimumSequenceNumber: number;\n\n\t/**\n\t * The last sequence number processed by the delta manager\n\t */\n\treadonly lastSequenceNumber: number;\n\n\t/**\n\t * The last message processed by the delta manager\n\t */\n\treadonly lastMessage: ISequencedDocumentMessage | undefined;\n\n\t/**\n\t * The latest sequence number the delta manager is aware of\n\t */\n\treadonly lastKnownSeqNumber: number;\n\n\t/**\n\t * The initial sequence number set when attaching the op handler\n\t */\n\treadonly initialSequenceNumber: number;\n\n\t/**\n\t * Tells if current connection has checkpoint information.\n\t * I.e. we know how far behind the client was at the time of establishing connection\n\t */\n\treadonly hasCheckpointSequenceNumber: boolean;\n\n\t/**\n\t * Details of client\n\t */\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Protocol version being used to communicate with the service\n\t */\n\treadonly version: string;\n\n\t/**\n\t * Max message size allowed to the delta manager\n\t */\n\treadonly maxMessageSize: number;\n\n\t/**\n\t * Service configuration provided by the service.\n\t */\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\n\t/**\n\t * Flag to indicate whether the client can write or not.\n\t */\n\treadonly active: boolean;\n\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Submit a signal to the service to be broadcast to other connected clients, but not persisted\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(content: any, targetClientId?: string): void;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n * @sealed\n * @alpha\n */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n\t/**\n\t * Emitted when a task is enqueued.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `task`: The task being enqueued.\n\t */\n\t(event: \"push\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted immediately after processing an enqueued task and removing it from the queue.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaQueue}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `task`: The task that was processed.\n\t */\n\t(event: \"op\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted when the queue of tasks to process is emptied.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `count`: The number of events (`T`) processed before becoming idle.\n\t *\n\t * - `duration`: The amount of time it took to process elements (in milliseconds).\n\t *\n\t * @see {@link IDeltaQueue.idle}\n\t */\n\t(event: \"idle\", listener: (count: number, duration: number) => void);\n}\n\n/**\n * Queue of ops to be sent to or processed from storage\n * @sealed\n * @alpha\n */\nexport interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {\n\t/**\n\t * Flag indicating whether or not the queue was paused\n\t */\n\tpaused: boolean;\n\n\t/**\n\t * The number of messages remaining in the queue\n\t */\n\tlength: number;\n\n\t/**\n\t * Flag indicating whether or not the queue is idle.\n\t * I.e. there are no remaining messages to processes.\n\t */\n\tidle: boolean;\n\n\t/**\n\t * Pauses processing on the queue.\n\t *\n\t * @returns A promise which resolves when processing has been paused.\n\t */\n\tpause(): Promise<void>;\n\n\t/**\n\t * Resumes processing on the queue\n\t */\n\tresume(): void;\n\n\t/**\n\t * Peeks at the next message in the queue\n\t */\n\tpeek(): T | undefined;\n\n\t/**\n\t * Returns all the items in the queue as an array. Does not remove them from the queue.\n\t */\n\ttoArray(): T[];\n\n\t/**\n\t * returns number of ops processed and time it took to process these ops.\n\t * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)\n\t */\n\twaitTillProcessingDone(): Promise<{ count: number; duration: number }>;\n}\n\n/**\n * @alpha\n */\nexport type ReadOnlyInfo =\n\t| {\n\t\t\treadonly readonly: false | undefined;\n\t }\n\t| {\n\t\t\treadonly readonly: true;\n\n\t\t\t/**\n\t\t\t * Read-only because `forceReadOnly()` was called.\n\t\t\t */\n\t\t\treadonly forced: boolean;\n\n\t\t\t/**\n\t\t\t * Read-only because client does not have write permissions for document.\n\t\t\t */\n\t\t\treadonly permissions: boolean | undefined;\n\n\t\t\t/**\n\t\t\t * Read-only with no delta stream connection.\n\t\t\t */\n\t\t\treadonly storageOnly: boolean;\n\n\t\t\t/**\n\t\t\t * Extra info on why connection to delta stream is not possible.\n\t\t\t *\n\t\t\t * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.\n\t\t\t */\n\t\t\treadonly storageOnlyReason?: string;\n\t };\n"]}
|
|
1
|
+
{"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.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 type {\n\tIDisposable,\n\tIErrorBase,\n\tIErrorEvent,\n\tIEvent,\n\tIEventProvider,\n} from \"@fluidframework/core-interfaces\";\nimport type { IClientDetails } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIAnyDriverError,\n\tIClientConfiguration,\n\tIDocumentMessage,\n\tITokenClaims,\n\tISequencedDocumentMessage,\n\tISignalMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Contract representing the result of a newly established connection to the server for syncing deltas.\n * @legacy\n * @alpha\n */\nexport interface IConnectionDetails {\n\t/**\n\t * The client's unique identifier assigned by the service.\n\t *\n\t * @remarks It is not stable across reconnections.\n\t */\n\tclientId: string;\n\n\tclaims: ITokenClaims;\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection.\n\t *\n\t * @remarks\n\t *\n\t * It may lag behind the actual last sequence number (quite a bit, if the container is very active),\n\t * but it's the best information the client has to figure out how far behind it is, at least\n\t * for \"read\" connections. \"write\" connections may use the client's own \"join\" op to obtain similar\n\t * information which is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber: number | undefined;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaSender {\n\t/**\n\t * Flush all pending messages through the outbound queue\n\t */\n\tflush(): void;\n}\n\n/**\n * Events emitted by {@link IDeltaManager}.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaManagerEvents extends IEvent {\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaManager}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t *\n\t * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.\n\t */\n\t(\n\t\tevent: \"op\",\n\t\tlistener: (message: ISequencedDocumentMessage, processingTime: number) => void,\n\t);\n\n\t/**\n\t * Emitted periodically with latest information on network roundtrip latency\n\t */\n\t(event: \"pong\", listener: (latency: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.\n\t *\n\t * @remarks\n\t * This occurs once we've received the connect_document_success message from the server,\n\t * and happens prior to the client's join message (if there is a join message).\n\t *\n\t * Listener parameters:\n\t *\n\t * - `details`: Connection metadata.\n\t *\n\t * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.\n\t * Will not be specified if an estimate cannot be determined.\n\t */\n\t(event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `reason`: Describes the reason for which the delta manager was disconnected.\n\t * - `error` : error if any for the disconnect.\n\t */\n\t(event: \"disconnect\", listener: (reason: string, error?: IAnyDriverError) => void);\n\n\t/**\n\t * Emitted when read/write permissions change.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the delta manager is now read-only.\n\t */\n\t(\n\t\tevent: \"readonly\",\n\t\tlistener: (\n\t\t\treadonly: boolean,\n\t\t\treadonlyConnectionReason?: { reason: string; error?: IErrorBase },\n\t\t) => void,\n\t);\n}\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaManager<T, U>\n\textends IEventProvider<IDeltaManagerEvents>,\n\t\tIDeltaSender {\n\t/**\n\t * The queue of inbound delta messages\n\t * @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime\n\t * may break if this is used directly. For example summarization and op processing.\n\t */\n\treadonly inbound: IDeltaQueue<T>;\n\n\t/**\n\t * The queue of outbound delta messages\n\t * @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime\n\t * may break if this is used directly. For example op submission\n\t */\n\treadonly outbound: IDeltaQueue<U[]>;\n\n\t/**\n\t * The queue of inbound delta signals\n\t */\n\treadonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\t/**\n\t * The current minimum sequence number\n\t */\n\treadonly minimumSequenceNumber: number;\n\n\t/**\n\t * The last sequence number processed by the delta manager\n\t */\n\treadonly lastSequenceNumber: number;\n\n\t/**\n\t * The last message processed by the delta manager\n\t */\n\treadonly lastMessage: ISequencedDocumentMessage | undefined;\n\n\t/**\n\t * The latest sequence number the delta manager is aware of\n\t */\n\treadonly lastKnownSeqNumber: number;\n\n\t/**\n\t * The initial sequence number set when attaching the op handler\n\t */\n\treadonly initialSequenceNumber: number;\n\n\t/**\n\t * Tells if current connection has checkpoint information.\n\t * I.e. we know how far behind the client was at the time of establishing connection\n\t */\n\treadonly hasCheckpointSequenceNumber: boolean;\n\n\t/**\n\t * Details of client\n\t */\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Protocol version being used to communicate with the service\n\t */\n\treadonly version: string;\n\n\t/**\n\t * Max message size allowed to the delta manager\n\t */\n\treadonly maxMessageSize: number;\n\n\t/**\n\t * Service configuration provided by the service.\n\t */\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\n\t/**\n\t * Flag to indicate whether the client can write or not.\n\t */\n\treadonly active: boolean;\n\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Submit a signal to the service to be broadcast to other connected clients, but not persisted\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(content: any, targetClientId?: string): void;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n\t/**\n\t * Emitted when a task is enqueued.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `task`: The task being enqueued.\n\t */\n\t(event: \"push\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted immediately after processing an enqueued task and removing it from the queue.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaQueue}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `task`: The task that was processed.\n\t */\n\t(event: \"op\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted when the queue of tasks to process is emptied.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `count`: The number of events (`T`) processed before becoming idle.\n\t *\n\t * - `duration`: The amount of time it took to process elements (in milliseconds).\n\t *\n\t * @see {@link IDeltaQueue.idle}\n\t */\n\t(event: \"idle\", listener: (count: number, duration: number) => void);\n}\n\n/**\n * Queue of ops to be sent to or processed from storage\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {\n\t/**\n\t * Flag indicating whether or not the queue was paused\n\t */\n\tpaused: boolean;\n\n\t/**\n\t * The number of messages remaining in the queue\n\t */\n\tlength: number;\n\n\t/**\n\t * Flag indicating whether or not the queue is idle.\n\t * I.e. there are no remaining messages to processes.\n\t */\n\tidle: boolean;\n\n\t/**\n\t * Pauses processing on the queue.\n\t *\n\t * @returns A promise which resolves when processing has been paused.\n\t */\n\tpause(): Promise<void>;\n\n\t/**\n\t * Resumes processing on the queue\n\t */\n\tresume(): void;\n\n\t/**\n\t * Peeks at the next message in the queue\n\t */\n\tpeek(): T | undefined;\n\n\t/**\n\t * Returns all the items in the queue as an array. Does not remove them from the queue.\n\t */\n\ttoArray(): T[];\n\n\t/**\n\t * returns number of ops processed and time it took to process these ops.\n\t * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)\n\t */\n\twaitTillProcessingDone(): Promise<{ count: number; duration: number }>;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport type ReadOnlyInfo =\n\t| {\n\t\t\treadonly readonly: false | undefined;\n\t }\n\t| {\n\t\t\treadonly readonly: true;\n\n\t\t\t/**\n\t\t\t * Read-only because `forceReadOnly()` was called.\n\t\t\t */\n\t\t\treadonly forced: boolean;\n\n\t\t\t/**\n\t\t\t * Read-only because client does not have write permissions for document.\n\t\t\t */\n\t\t\treadonly permissions: boolean | undefined;\n\n\t\t\t/**\n\t\t\t * Read-only with no delta stream connection.\n\t\t\t */\n\t\t\treadonly storageOnly: boolean;\n\n\t\t\t/**\n\t\t\t * Extra info on why connection to delta stream is not possible.\n\t\t\t *\n\t\t\t * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.\n\t\t\t */\n\t\t\treadonly storageOnlyReason?: string;\n\t };\n"]}
|
package/dist/error.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { IErrorBase } from "@fluidframework/core-interfaces";
|
|
6
6
|
/**
|
|
7
7
|
* Different error types the ClientSession may report out to the Host.
|
|
8
|
+
* @legacy
|
|
8
9
|
* @alpha
|
|
9
10
|
*/
|
|
10
11
|
export declare const ContainerErrorTypes: {
|
|
@@ -21,6 +22,7 @@ export declare const ContainerErrorTypes: {
|
|
|
21
22
|
};
|
|
22
23
|
/**
|
|
23
24
|
* {@inheritDoc (ContainerErrorTypes:variable)}
|
|
25
|
+
* @legacy
|
|
24
26
|
* @alpha
|
|
25
27
|
*/
|
|
26
28
|
export type ContainerErrorTypes = (typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];
|
|
@@ -59,6 +61,7 @@ export declare enum ContainerErrorType {
|
|
|
59
61
|
}
|
|
60
62
|
/**
|
|
61
63
|
* Represents warnings raised on container.
|
|
64
|
+
* @legacy
|
|
62
65
|
* @alpha
|
|
63
66
|
*/
|
|
64
67
|
export interface ContainerWarning extends IErrorBase {
|
package/dist/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGlE
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGlE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAE/B;;;OAGG;;;;;;;CAEM,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC9B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;GAKG;AACH,oBAAY,kBAAkB;IAC7B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,UAAU,eAAe;IAEzB;;;OAGG;IACH,yBAAyB,8BAA8B;CACvD;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IACnD;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC"}
|
package/dist/error.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.ContainerErrorType = exports.ContainerErrorTypes = void 0;
|
|
|
8
8
|
const internal_1 = require("@fluidframework/core-interfaces/internal");
|
|
9
9
|
/**
|
|
10
10
|
* Different error types the ClientSession may report out to the Host.
|
|
11
|
+
* @legacy
|
|
11
12
|
* @alpha
|
|
12
13
|
*/
|
|
13
14
|
exports.ContainerErrorTypes = {
|
package/dist/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uEAA2E;AAE3E
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uEAA2E;AAE3E;;;;GAIG;AACU,QAAA,mBAAmB,GAAG;IAClC,GAAG,0BAAe;IAClB;;;OAGG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC;AAUX;;;;;GAKG;AACH,IAAY,kBA+BX;AA/BD,WAAY,kBAAkB;IAC7B;;OAEG;IACH,mDAA6B,CAAA;IAE7B;;OAEG;IACH,yDAAmC,CAAA;IAEnC;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACH,+CAAyB,CAAA;IAEzB;;;OAGG;IACH,6EAAuD,CAAA;AACxD,CAAC,EA/BW,kBAAkB,kCAAlB,kBAAkB,QA+B7B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IErrorBase } from \"@fluidframework/core-interfaces\";\nimport { FluidErrorTypes } from \"@fluidframework/core-interfaces/internal\";\n\n/**\n * Different error types the ClientSession may report out to the Host.\n * @legacy\n * @alpha\n */\nexport const ContainerErrorTypes = {\n\t...FluidErrorTypes,\n\t/**\n\t * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and\n\t * aids in safely deleting unused objects.\n\t */\n\tclientSessionExpiredError: \"clientSessionExpiredError\",\n} as const;\n\n/**\n * {@inheritDoc (ContainerErrorTypes:variable)}\n * @legacy\n * @alpha\n */\nexport type ContainerErrorTypes =\n\t(typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];\n\n/**\n * Different error types the Container may report out to the Host.\n *\n * @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.\n * @internal\n */\nexport enum ContainerErrorType {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError = \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError = \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError = \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError = \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError = \"usageError\",\n\n\t/**\n\t * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and\n\t * aids in safely deleting unused objects.\n\t */\n\tclientSessionExpiredError = \"clientSessionExpiredError\",\n}\n\n/**\n * Represents warnings raised on container.\n * @legacy\n * @alpha\n */\nexport interface ContainerWarning extends IErrorBase {\n\t/**\n\t * Whether this error has already been logged. Used to avoid logging errors twice.\n\t *\n\t * @defaultValue `false`\n\t */\n\tlogged?: boolean;\n}\n\n/**\n * Represents errors raised on container.\n *\n * @remarks\n *\n * The following are commonly thrown error types, but `errorType` could be any string.\n *\n * - {@link @fluidframework/core-interfaces#FluidErrorTypes}\n *\n * - {@link @fluidframework/driver-definitions#(DriverErrorTypes:variable)}\n *\n * @public\n */\nexport type ICriticalContainerError = IErrorBase;\n"]}
|
package/dist/fluidModule.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { FluidObject } from "@fluidframework/core-interfaces";
|
|
|
6
6
|
import type { IProvideFluidCodeDetailsComparer } from "./fluidPackage.js";
|
|
7
7
|
import type { IRuntimeFactory } from "./runtime.js";
|
|
8
8
|
/**
|
|
9
|
+
* @legacy
|
|
9
10
|
* @alpha
|
|
10
11
|
*/
|
|
11
12
|
export interface IFluidModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidModule.d.ts","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"fluidModule.d.ts","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B,WAAW,EAAE,WAAW,CAAC,eAAe,GAAG,gCAAgC,CAAC,CAAC;CAC7E"}
|
package/dist/fluidModule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidModule.js","sourceRoot":"","sources":["../src/fluidModule.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 type { FluidObject } from \"@fluidframework/core-interfaces\";\n\nimport type { IProvideFluidCodeDetailsComparer } from \"./fluidPackage.js\";\nimport type { IRuntimeFactory } from \"./runtime.js\";\n\n/**\n * @alpha\n */\nexport interface IFluidModule {\n\tfluidExport: FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"fluidModule.js","sourceRoot":"","sources":["../src/fluidModule.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 type { FluidObject } from \"@fluidframework/core-interfaces\";\n\nimport type { IProvideFluidCodeDetailsComparer } from \"./fluidPackage.js\";\nimport type { IRuntimeFactory } from \"./runtime.js\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IFluidModule {\n\tfluidExport: FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;\n}\n"]}
|
package/dist/fluidPackage.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Specifies an environment on Fluid property of a IFluidPackage.
|
|
7
|
+
* @legacy
|
|
7
8
|
* @alpha
|
|
8
9
|
*/
|
|
9
10
|
export interface IFluidPackageEnvironment {
|
|
@@ -31,6 +32,7 @@ export interface IFluidPackageEnvironment {
|
|
|
31
32
|
* While compatible with the npm package format it is not necessary that that package is an
|
|
32
33
|
* npm package:
|
|
33
34
|
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
|
|
35
|
+
* @legacy
|
|
34
36
|
* @alpha
|
|
35
37
|
*/
|
|
36
38
|
export interface IFluidPackage {
|
|
@@ -58,11 +60,13 @@ export interface IFluidPackage {
|
|
|
58
60
|
/**
|
|
59
61
|
* Check if the package.json defines a Fluid package
|
|
60
62
|
* @param pkg - the package json data to check if it is a Fluid package.
|
|
63
|
+
* @legacy
|
|
61
64
|
* @alpha
|
|
62
65
|
*/
|
|
63
66
|
export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
|
|
64
67
|
/**
|
|
65
68
|
* Package manager configuration. Provides a key value mapping of config values
|
|
69
|
+
* @legacy
|
|
66
70
|
* @alpha
|
|
67
71
|
*/
|
|
68
72
|
export interface IFluidCodeDetailsConfig {
|
|
@@ -70,6 +74,7 @@ export interface IFluidCodeDetailsConfig {
|
|
|
70
74
|
}
|
|
71
75
|
/**
|
|
72
76
|
* Data structure used to describe the code to load on the Fluid document
|
|
77
|
+
* @legacy
|
|
73
78
|
* @alpha
|
|
74
79
|
*/
|
|
75
80
|
export interface IFluidCodeDetails {
|
|
@@ -92,10 +97,12 @@ export interface IFluidCodeDetails {
|
|
|
92
97
|
*/
|
|
93
98
|
export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
|
|
94
99
|
/**
|
|
100
|
+
* @legacy
|
|
95
101
|
* @alpha
|
|
96
102
|
*/
|
|
97
103
|
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
|
|
98
104
|
/**
|
|
105
|
+
* @legacy
|
|
99
106
|
* @alpha
|
|
100
107
|
*/
|
|
101
108
|
export interface IProvideFluidCodeDetailsComparer {
|
|
@@ -103,6 +110,7 @@ export interface IProvideFluidCodeDetailsComparer {
|
|
|
103
110
|
}
|
|
104
111
|
/**
|
|
105
112
|
* Provides capability to compare Fluid code details.
|
|
113
|
+
* @legacy
|
|
106
114
|
* @alpha
|
|
107
115
|
*/
|
|
108
116
|
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,CAAC,MAAM,EAAE,MAAM,GACZ,SAAS,GACT;QACA;;;;WAIG;QACH,KAAK,EAAE,MAAM,EAAE,CAAC;QAEhB;;;;WAIG;QACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB,CAAC;CACL;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE;QACN;;;WAGG;QACH,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,wBAAwB,CAAC;KAC5D,CAAC;IACF;;;;OAIG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,QAAS,OAAO,mCAGgB,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEnD;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,YACrB,OAAO,2CAShB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,gCAClB,CAAC;AAE7B;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAChD,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;CAC9D;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,gCAAgC;IAClF;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzF;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACjF"}
|
package/dist/fluidPackage.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.IFluidCodeDetailsComparer = exports.isFluidCodeDetails = exports.isFluid
|
|
|
8
8
|
/**
|
|
9
9
|
* Check if the package.json defines a Fluid package
|
|
10
10
|
* @param pkg - the package json data to check if it is a Fluid package.
|
|
11
|
+
* @legacy
|
|
11
12
|
* @alpha
|
|
12
13
|
*/
|
|
13
14
|
const isFluidPackage = (pkg) => typeof pkg === "object" &&
|
|
@@ -27,6 +28,7 @@ const isFluidCodeDetails = (details) => {
|
|
|
27
28
|
};
|
|
28
29
|
exports.isFluidCodeDetails = isFluidCodeDetails;
|
|
29
30
|
/**
|
|
31
|
+
* @legacy
|
|
30
32
|
* @alpha
|
|
31
33
|
*/
|
|
32
34
|
exports.IFluidCodeDetailsComparer = "IFluidCodeDetailsComparer";
|
package/dist/fluidPackage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8DH;;;;;GAKG;AACI,MAAM,cAAc,GAAG,CAAC,GAAY,EAAkC,EAAE,CAC9E,OAAO,GAAG,KAAK,QAAQ;IACvB,OAAQ,GAA8B,EAAE,IAAI,KAAK,QAAQ;IACzD,OAAQ,GAA8B,EAAE,KAAK,KAAK,QAAQ,CAAC;AAH/C,QAAA,cAAc,kBAGiC;AAgC5D;;;GAGG;AACI,MAAM,kBAAkB,GAAG,CACjC,OAAgB,EACyB,EAAE;IAC3C,MAAM,gBAAgB,GAAG,OAAiD,CAAC;IAC3E,OAAO,CACN,OAAO,gBAAgB,KAAK,QAAQ;QACpC,CAAC,OAAO,gBAAgB,EAAE,OAAO,KAAK,QAAQ;YAC7C,IAAA,sBAAc,EAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC,gBAAgB,EAAE,MAAM,KAAK,SAAS,IAAI,OAAO,gBAAgB,EAAE,MAAM,KAAK,QAAQ,CAAC,CACxF,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,kBAAkB,sBAU7B;AAEF;;;GAGG;AACU,QAAA,yBAAyB,GACrC,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Specifies an environment on Fluid property of a IFluidPackage.\n * @legacy\n * @alpha\n */\nexport interface IFluidPackageEnvironment {\n\t/**\n\t * The name of the target. For a browser environment, this could be umd for scripts\n\t * or css for styles.\n\t */\n\t[target: string]:\n\t\t| undefined\n\t\t| {\n\t\t\t\t/**\n\t\t\t\t * List of files for the target. These can be relative or absolute.\n\t\t\t\t * The code loader should resolve relative paths, and validate all\n\t\t\t\t * full urls.\n\t\t\t\t */\n\t\t\t\tfiles: string[];\n\n\t\t\t\t/**\n\t\t\t\t * General access for extended fields as specific usages will\n\t\t\t\t * likely have additional infornamation like a definition\n\t\t\t\t * of Library, the entrypoint for umd packages.\n\t\t\t\t */\n\t\t\t\t[key: string]: unknown;\n\t\t };\n}\n\n/**\n * Fluid-specific properties expected on a package to be loaded by the code loader.\n * While compatible with the npm package format it is not necessary that that package is an\n * npm package:\n * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}\n * @legacy\n * @alpha\n */\nexport interface IFluidPackage {\n\t/**\n\t * The name of the package that this code represnets\n\t */\n\tname: string;\n\t/**\n\t * This object represents the Fluid specific properties of the package\n\t */\n\tfluid: {\n\t\t/**\n\t\t * The name of the of the environment. This should be something like browser, or node\n\t\t * and contain the necessary targets for loading this code in that environment.\n\t\t */\n\t\t[environment: string]: undefined | IFluidPackageEnvironment;\n\t};\n\t/**\n\t * General access for extended fields as specific usages will\n\t * likely have additional infornamation like a definition of\n\t * compatible versions, or deployment information like rings or rollouts.\n\t */\n\t[key: string]: unknown;\n}\n\n/**\n * Check if the package.json defines a Fluid package\n * @param pkg - the package json data to check if it is a Fluid package.\n * @legacy\n * @alpha\n */\nexport const isFluidPackage = (pkg: unknown): pkg is Readonly<IFluidPackage> =>\n\ttypeof pkg === \"object\" &&\n\ttypeof (pkg as Partial<IFluidPackage>)?.name === \"string\" &&\n\ttypeof (pkg as Partial<IFluidPackage>)?.fluid === \"object\";\n\n/**\n * Package manager configuration. Provides a key value mapping of config values\n * @legacy\n * @alpha\n */\nexport interface IFluidCodeDetailsConfig {\n\treadonly [key: string]: string;\n}\n\n/**\n * Data structure used to describe the code to load on the Fluid document\n * @legacy\n * @alpha\n */\nexport interface IFluidCodeDetails {\n\t/**\n\t * The code package to be used on the Fluid document. This is either the package name which will be loaded\n\t * from a package manager. Or the expanded Fluid package.\n\t */\n\treadonly package: string | Readonly<IFluidPackage>;\n\n\t/**\n\t * Configuration details. This includes links to the package manager and base CDNs.\n\t *\n\t * @remarks This is strictly consumer-defined data.\n\t * Its contents and semantics (including whether or not this data is present) are completely up to the consumer.\n\t */\n\treadonly config?: IFluidCodeDetailsConfig;\n}\n\n/**\n * Determines if any object is an IFluidCodeDetails\n * @internal\n */\nexport const isFluidCodeDetails = (\n\tdetails: unknown,\n): details is Readonly<IFluidCodeDetails> => {\n\tconst maybeCodeDetails = details as Partial<IFluidCodeDetails> | undefined;\n\treturn (\n\t\ttypeof maybeCodeDetails === \"object\" &&\n\t\t(typeof maybeCodeDetails?.package === \"string\" ||\n\t\t\tisFluidPackage(maybeCodeDetails?.package)) &&\n\t\t(maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === \"object\")\n\t);\n};\n\n/**\n * @legacy\n * @alpha\n */\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer =\n\t\"IFluidCodeDetailsComparer\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideFluidCodeDetailsComparer {\n\treadonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;\n}\n\n/**\n * Provides capability to compare Fluid code details.\n * @legacy\n * @alpha\n */\nexport interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {\n\t/**\n\t * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.\n\t *\n\t * Similar semantics to:\n\t * {@link https://github.com/npm/node-semver#usage}\n\t */\n\tsatisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;\n\n\t/**\n\t * Return a number representing the ascending sort order of the `a` and `b` code details:\n\t *\n\t * - `< 0` if `a < b`.\n\t *\n\t * - `= 0` if `a === b`.\n\t *\n\t * - `> 0` if `a > b`.\n\t *\n\t * - `undefined` if `a` is not comparable to `b`.\n\t *\n\t * Similar semantics to:\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}\n\t */\n\tcompare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;\n}\n"]}
|