@fluidframework/legacy-dds 2.70.0-361092 → 2.70.0-361788
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/array/sharedArray.d.ts +5 -10
- package/dist/array/sharedArray.d.ts.map +1 -1
- package/dist/array/sharedArray.js +11 -10
- package/dist/array/sharedArray.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/signal/sharedSignal.d.ts +5 -10
- package/dist/signal/sharedSignal.d.ts.map +1 -1
- package/dist/signal/sharedSignal.js +11 -10
- package/dist/signal/sharedSignal.js.map +1 -1
- package/lib/array/sharedArray.d.ts +5 -10
- package/lib/array/sharedArray.d.ts.map +1 -1
- package/lib/array/sharedArray.js +11 -10
- package/lib/array/sharedArray.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/signal/sharedSignal.d.ts +5 -10
- package/lib/signal/sharedSignal.d.ts.map +1 -1
- package/lib/signal/sharedSignal.js +11 -10
- package/lib/signal/sharedSignal.js.map +1 -1
- package/package.json +15 -15
- package/src/array/sharedArray.ts +21 -17
- package/src/packageVersion.ts +1 -1
- package/src/signal/sharedSignal.ts +20 -17
|
@@ -12,11 +12,13 @@ import type {
|
|
|
12
12
|
IChannelFactory,
|
|
13
13
|
} from "@fluidframework/datastore-definitions/internal";
|
|
14
14
|
import { FileMode, MessageType, TreeEntry } from "@fluidframework/driver-definitions/internal";
|
|
15
|
+
import type { ITree } from "@fluidframework/driver-definitions/internal";
|
|
15
16
|
import type {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
ISummaryTreeWithStats,
|
|
18
|
+
IRuntimeMessageCollection,
|
|
19
|
+
IRuntimeMessagesContent,
|
|
20
|
+
ISequencedMessageEnvelope,
|
|
21
|
+
} from "@fluidframework/runtime-definitions/internal";
|
|
20
22
|
import { convertToSummaryTreeWithStats } from "@fluidframework/runtime-utils/internal";
|
|
21
23
|
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal";
|
|
22
24
|
import { SharedObject } from "@fluidframework/shared-object-base/internal";
|
|
@@ -119,7 +121,7 @@ export class SharedSignalClass<T extends SerializableTypeForSharedSignal = any>
|
|
|
119
121
|
* Load share signal from snapshot
|
|
120
122
|
*
|
|
121
123
|
* @param _storage - the storage to get the snapshot from
|
|
122
|
-
* @returns
|
|
124
|
+
* @returns promise that resolved when the load is completed
|
|
123
125
|
*/
|
|
124
126
|
protected async loadCore(_storage: IChannelStorageService): Promise<void> {}
|
|
125
127
|
|
|
@@ -131,20 +133,22 @@ export class SharedSignalClass<T extends SerializableTypeForSharedSignal = any>
|
|
|
131
133
|
protected onDisconnect(): void {}
|
|
132
134
|
|
|
133
135
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* @param message - the message to prepare
|
|
137
|
-
* @param local - whether the message was sent by the local client
|
|
138
|
-
* @param _localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
139
|
-
* For messages from a remote client, this will be undefined.
|
|
136
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.processMessagesCore}
|
|
140
137
|
*/
|
|
141
|
-
protected
|
|
142
|
-
|
|
138
|
+
protected processMessagesCore(messagesCollection: IRuntimeMessageCollection): void {
|
|
139
|
+
const { envelope, local, messagesContent } = messagesCollection;
|
|
140
|
+
for (const messageContent of messagesContent) {
|
|
141
|
+
this.processMessage(envelope, messageContent, local);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
private processMessage(
|
|
146
|
+
messageEnvelope: ISequencedMessageEnvelope,
|
|
147
|
+
messageContent: IRuntimeMessagesContent,
|
|
143
148
|
local: boolean,
|
|
144
|
-
_localOpMetadata: unknown,
|
|
145
149
|
): void {
|
|
146
|
-
if ((
|
|
147
|
-
const op =
|
|
150
|
+
if ((messageEnvelope.type as MessageType) === MessageType.Operation && !local) {
|
|
151
|
+
const op = messageContent.contents as ISignalOperation<T>;
|
|
148
152
|
|
|
149
153
|
switch (op.type) {
|
|
150
154
|
case "signal": {
|
|
@@ -158,7 +162,6 @@ export class SharedSignalClass<T extends SerializableTypeForSharedSignal = any>
|
|
|
158
162
|
}
|
|
159
163
|
}
|
|
160
164
|
}
|
|
161
|
-
|
|
162
165
|
private notifyCore(op: ISignalOperation<T>, isLocal: boolean): void {
|
|
163
166
|
this.emit("notify", op.metadata, isLocal);
|
|
164
167
|
}
|