@fluidframework/presence 2.70.0-361788 → 2.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/getPresence.d.ts +7 -0
- package/dist/getPresence.d.ts.map +1 -1
- package/dist/getPresence.js +66 -3
- package/dist/getPresence.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.alpha.d.ts +86 -0
- package/dist/package.json +4 -0
- package/dist/packageVersion.d.ts +9 -0
- package/dist/packageVersion.d.ts.map +1 -0
- package/dist/packageVersion.js +12 -0
- package/dist/packageVersion.js.map +1 -0
- package/dist/presenceDatastoreManager.d.ts +71 -4
- package/dist/presenceDatastoreManager.d.ts.map +1 -1
- package/dist/presenceDatastoreManager.js +365 -71
- package/dist/presenceDatastoreManager.js.map +1 -1
- package/dist/presenceManager.d.ts.map +1 -1
- package/dist/presenceManager.js +4 -3
- package/dist/presenceManager.js.map +1 -1
- package/dist/protocol.d.ts +9 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/lib/getPresence.d.ts +7 -0
- package/lib/getPresence.d.ts.map +1 -1
- package/lib/getPresence.js +65 -3
- package/lib/getPresence.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.alpha.d.ts +86 -0
- package/lib/packageVersion.d.ts +9 -0
- package/lib/packageVersion.d.ts.map +1 -0
- package/lib/packageVersion.js +9 -0
- package/lib/packageVersion.js.map +1 -0
- package/lib/presenceDatastoreManager.d.ts +71 -4
- package/lib/presenceDatastoreManager.d.ts.map +1 -1
- package/lib/presenceDatastoreManager.js +364 -70
- package/lib/presenceDatastoreManager.js.map +1 -1
- package/lib/presenceManager.d.ts.map +1 -1
- package/lib/presenceManager.js +4 -3
- package/lib/presenceManager.js.map +1 -1
- package/lib/protocol.d.ts +9 -0
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js.map +1 -1
- package/package.json +39 -23
- package/lib/tsdoc-metadata.json +0 -11
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
+
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Package for client presence within a connected session.
|
|
13
|
+
*
|
|
14
|
+
* See {@link https://github.com/microsoft/FluidFramework/tree/main/packages/framework/presence#readme | README.md } for an overview of the package.
|
|
15
|
+
*
|
|
16
|
+
* @packageDocumentation
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
// #region @beta APIs
|
|
21
|
+
Accessor,
|
|
22
|
+
Attendee,
|
|
23
|
+
AttendeeId,
|
|
24
|
+
AttendeeStatus,
|
|
25
|
+
AttendeesEvents,
|
|
26
|
+
BroadcastControlSettings,
|
|
27
|
+
BroadcastControls,
|
|
28
|
+
ClientConnectionId,
|
|
29
|
+
InternalTypes,
|
|
30
|
+
Latest,
|
|
31
|
+
LatestArguments,
|
|
32
|
+
LatestArgumentsRaw,
|
|
33
|
+
LatestClientData,
|
|
34
|
+
LatestData,
|
|
35
|
+
LatestEvents,
|
|
36
|
+
LatestFactory,
|
|
37
|
+
LatestMap,
|
|
38
|
+
LatestMapArguments,
|
|
39
|
+
LatestMapArgumentsRaw,
|
|
40
|
+
LatestMapClientData,
|
|
41
|
+
LatestMapEvents,
|
|
42
|
+
LatestMapFactory,
|
|
43
|
+
LatestMapItemRemovedClientData,
|
|
44
|
+
LatestMapItemUpdatedClientData,
|
|
45
|
+
LatestMapRaw,
|
|
46
|
+
LatestMapRawEvents,
|
|
47
|
+
LatestMetadata,
|
|
48
|
+
LatestRaw,
|
|
49
|
+
LatestRawEvents,
|
|
50
|
+
Presence,
|
|
51
|
+
PresenceEvents,
|
|
52
|
+
ProxiedValueAccessor,
|
|
53
|
+
RawValueAccessor,
|
|
54
|
+
StateFactory,
|
|
55
|
+
StateMap,
|
|
56
|
+
StateSchemaValidator,
|
|
57
|
+
StatesWorkspace,
|
|
58
|
+
StatesWorkspaceEntries,
|
|
59
|
+
StatesWorkspaceEntry,
|
|
60
|
+
StatesWorkspaceSchema,
|
|
61
|
+
ValueAccessor,
|
|
62
|
+
WorkspaceAddress,
|
|
63
|
+
getPresence,
|
|
64
|
+
// #endregion
|
|
65
|
+
|
|
66
|
+
// #region @alpha APIs
|
|
67
|
+
ExperimentalPresenceDO,
|
|
68
|
+
ExperimentalPresenceManager,
|
|
69
|
+
InternalUtilityTypes,
|
|
70
|
+
NotificationEmitter,
|
|
71
|
+
NotificationListenable,
|
|
72
|
+
NotificationSubscriptions,
|
|
73
|
+
Notifications,
|
|
74
|
+
NotificationsManager,
|
|
75
|
+
NotificationsManagerEvents,
|
|
76
|
+
NotificationsWorkspace,
|
|
77
|
+
NotificationsWorkspaceSchema,
|
|
78
|
+
PresenceWithNotifications,
|
|
79
|
+
getPresenceAlpha,
|
|
80
|
+
getPresenceViaDataObject,
|
|
81
|
+
// #endregion
|
|
82
|
+
|
|
83
|
+
// #region @legacyAlpha APIs
|
|
84
|
+
getPresenceFromDataStoreContext
|
|
85
|
+
// #endregion
|
|
86
|
+
} from "./index.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
|
+
*/
|
|
7
|
+
export declare const pkgName = "@fluidframework/presence";
|
|
8
|
+
export declare const pkgVersion = "2.71.0";
|
|
9
|
+
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,6BAA6B,CAAC;AAClD,eAAO,MAAM,UAAU,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
|
+
*/
|
|
7
|
+
export const pkgName = "@fluidframework/presence";
|
|
8
|
+
export const pkgVersion = "2.71.0";
|
|
9
|
+
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAClD,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/presence\";\nexport const pkgVersion = \"2.71.0\";\n"]}
|
|
@@ -30,10 +30,32 @@ export declare function isValueDirectory<T>(obj: ValidatableValueDirectory<T> |
|
|
|
30
30
|
*/
|
|
31
31
|
export interface PresenceDatastoreManager {
|
|
32
32
|
joinSession(clientId: ClientConnectionId): void;
|
|
33
|
+
onDisconnected(): void;
|
|
33
34
|
getWorkspace<TSchema extends StatesWorkspaceSchema>(internalWorkspaceAddress: `s:${WorkspaceAddress}`, requestedContent: TSchema, controls?: BroadcastControlSettings): StatesWorkspace<TSchema>;
|
|
34
35
|
getWorkspace<TSchema extends NotificationsWorkspaceSchema>(internalWorkspaceAddress: `n:${WorkspaceAddress}`, requestedContent: TSchema): NotificationsWorkspace<TSchema>;
|
|
35
36
|
processSignal(message: InboundExtensionMessage<SignalMessages>, local: boolean, optional: boolean): void;
|
|
36
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Delays used for broadcasting join responses to clients.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Exported for test coordination.
|
|
43
|
+
* These could be made customizable in the future to accommodate different
|
|
44
|
+
* session configurations.
|
|
45
|
+
*/
|
|
46
|
+
export declare const broadcastJoinResponseDelaysMs: {
|
|
47
|
+
/**
|
|
48
|
+
* The delay in milliseconds before a join response is sent to any client.
|
|
49
|
+
* This is used to accumulate other join response requests and reduce
|
|
50
|
+
* network traffic.
|
|
51
|
+
*/
|
|
52
|
+
readonly namedResponder: 200;
|
|
53
|
+
/**
|
|
54
|
+
* The additional delay in milliseconds a backup responder waits before sending
|
|
55
|
+
* a join response to allow others to respond first.
|
|
56
|
+
*/
|
|
57
|
+
readonly backupResponderIncrement: 40;
|
|
58
|
+
};
|
|
37
59
|
/**
|
|
38
60
|
* Manages singleton datastore for all Presence.
|
|
39
61
|
*/
|
|
@@ -46,15 +68,55 @@ export declare class PresenceDatastoreManagerImpl implements PresenceDatastoreMa
|
|
|
46
68
|
private readonly datastore;
|
|
47
69
|
private averageLatency;
|
|
48
70
|
private returnedMessages;
|
|
49
|
-
private
|
|
50
|
-
private readonly timer;
|
|
71
|
+
private readonly sendMessageTimer;
|
|
51
72
|
private readonly workspaces;
|
|
52
73
|
private readonly targetedSignalSupport;
|
|
74
|
+
/**
|
|
75
|
+
* When defined, this client is not recognized in the session.
|
|
76
|
+
* Call when no longer caring about that condition. That way listeners are
|
|
77
|
+
* cleaned up.
|
|
78
|
+
*/
|
|
79
|
+
private stopWaitingForSelfInAudience;
|
|
80
|
+
/**
|
|
81
|
+
* Tracks whether this client has complete snapshot level knowledge and
|
|
82
|
+
* how that determination was reached.
|
|
83
|
+
* - "alone": no other audience members detected at join
|
|
84
|
+
* - "join response": another client has responded to our join request
|
|
85
|
+
* - "full requests": all others have requested response from us
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* Only applies when not using targeted join responses.
|
|
89
|
+
*
|
|
90
|
+
* Without a complete snapshot, we cannot fully onboard any other clients.
|
|
91
|
+
* One exception to this is if this client is the only participant in the
|
|
92
|
+
* session. In such a case, there is no one to respond to the join request.
|
|
93
|
+
* Another exception is multiple clients attempting to join at the same
|
|
94
|
+
* time and thus expecting that someone has full knowledge, yet none have
|
|
95
|
+
* received a complete update to think they are qualified to respond.
|
|
96
|
+
* Generically if the number of outstanding requestors meets or exceeds the
|
|
97
|
+
* count of other audience members, then we can consider the snapshot
|
|
98
|
+
* complete (as all will have provided their own complete information in
|
|
99
|
+
* their join responses).
|
|
100
|
+
*/
|
|
101
|
+
private reasonForCompleteSnapshot?;
|
|
102
|
+
/**
|
|
103
|
+
* Map of outstanding broadcast (join response) requests.
|
|
104
|
+
*/
|
|
105
|
+
private readonly broadcastRequests;
|
|
106
|
+
/**
|
|
107
|
+
* Timer for managing broadcast (join response) request timing.
|
|
108
|
+
*/
|
|
109
|
+
private readonly broadcastRequestsTimer;
|
|
53
110
|
constructor(attendeeId: AttendeeId, runtime: IEphemeralRuntime, logger: ITelemetryLoggerExt | undefined, events: IEmitter<PresenceEvents>, presence: Presence, systemWorkspaceDatastore: SystemWorkspaceDatastore, systemWorkspace: AnyWorkspaceEntry<StatesWorkspaceSchema>);
|
|
54
|
-
|
|
111
|
+
private getAudienceInformation;
|
|
112
|
+
joinSession(selfClientId: ClientConnectionId, alternateProvider?: ClientConnectionId | undefined): void;
|
|
113
|
+
private listenForSelfInAudience;
|
|
114
|
+
private stopWaitingAndJoin;
|
|
115
|
+
onDisconnected(): void;
|
|
55
116
|
getWorkspace<TSchema extends StatesWorkspaceSchema>(internalWorkspaceAddress: InternalWorkspaceAddress, requestedContent: TSchema, controls?: BroadcastControlSettings): AnyWorkspace<TSchema>;
|
|
56
117
|
/**
|
|
57
|
-
* The combined contents of all queued updates. Will be
|
|
118
|
+
* The combined contents of all queued updates. Will be `"sendAll"` when a
|
|
119
|
+
* full broadcast is pending or `undefined` when no messages are queued.
|
|
58
120
|
*/
|
|
59
121
|
private queuedData;
|
|
60
122
|
/**
|
|
@@ -77,6 +139,11 @@ export declare class PresenceDatastoreManagerImpl implements PresenceDatastoreMa
|
|
|
77
139
|
private stripValidationFromValueData;
|
|
78
140
|
private broadcastAllKnownState;
|
|
79
141
|
processSignal(message: InboundExtensionMessage<SignalMessages>, local: boolean, optional: boolean): void;
|
|
142
|
+
/**
|
|
143
|
+
* Broadcasts a join response (complete datastore update message)
|
|
144
|
+
* if there is an outstanding join response request.
|
|
145
|
+
*/
|
|
146
|
+
private readonly sendJoinResponseIfStillNeeded;
|
|
80
147
|
/**
|
|
81
148
|
* Handles responding to another client joining the session.
|
|
82
149
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presenceDatastoreManager.d.ts","sourceRoot":"","sources":["../src/presenceDatastoreManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"presenceDatastoreManager.d.ts","sourceRoot":"","sources":["../src/presenceDatastoreManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACtG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAEzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAA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