@fluidframework/datastore 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/CHANGELOG.md +12 -0
- package/dist/dataStoreRuntime.d.ts +33 -3
- package/dist/dataStoreRuntime.d.ts.map +1 -1
- package/dist/dataStoreRuntime.js +27 -18
- package/dist/dataStoreRuntime.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/dataStoreRuntime.d.ts +33 -3
- package/lib/dataStoreRuntime.d.ts.map +1 -1
- package/lib/dataStoreRuntime.js +28 -19
- package/lib/dataStoreRuntime.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +19 -26
- package/src/dataStoreRuntime.ts +42 -27
- package/src/index.ts +1 -0
- package/src/packageVersion.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @fluidframework/datastore
|
|
2
2
|
|
|
3
|
+
## 2.71.0
|
|
4
|
+
|
|
5
|
+
Dependency updates only.
|
|
6
|
+
|
|
7
|
+
## 2.70.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- Remove submitMessage from FluidDataStoreRuntime and MockFluidDataStoreRuntime ([#25755](https://github.com/microsoft/FluidFramework/pull/25755)) [88860f348b](https://github.com/microsoft/FluidFramework/commit/88860f348b0d67f94952d4e2ae227fa0b1f9f942)
|
|
12
|
+
|
|
13
|
+
As needed, access `submitMessage` via `IFluidDataStoreContext`/`IFluidParentContext`. See https://github.com/microsoft/FluidFramework/issues/24406 for details.
|
|
14
|
+
|
|
3
15
|
## 2.63.0
|
|
4
16
|
|
|
5
17
|
Dependency updates only.
|
|
@@ -11,7 +11,7 @@ import type { IChannel, IChannelFactory, IFluidDataStoreRuntime, IFluidDataStore
|
|
|
11
11
|
import { type IClientDetails, type IQuorumClients } from "@fluidframework/driver-definitions";
|
|
12
12
|
import type { IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
13
13
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
14
|
-
import { type ISummaryTreeWithStats, type ITelemetryContext, type IGarbageCollectionData, type IFluidDataStoreChannel, type IFluidDataStoreContext, VisibilityState, type IInboundSignalMessage, type IRuntimeMessageCollection, type IFluidDataStorePolicies, type MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
|
|
14
|
+
import { type ISummaryTreeWithStats, type ITelemetryContext, type IGarbageCollectionData, type IAttachMessage, type IEnvelope, type IFluidDataStoreChannel, type IFluidDataStoreContext, VisibilityState, type IInboundSignalMessage, type IRuntimeMessageCollection, type IFluidDataStorePolicies, type MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
|
|
15
15
|
import { type ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
16
16
|
/**
|
|
17
17
|
* @legacy @beta
|
|
@@ -20,6 +20,20 @@ export declare enum DataStoreMessageType {
|
|
|
20
20
|
Attach = "attach",
|
|
21
21
|
ChannelOp = "op"
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Outgoing {@link FluidDataStoreRuntime} message structures.
|
|
25
|
+
* @internal
|
|
26
|
+
*
|
|
27
|
+
* @privateRemarks
|
|
28
|
+
* The types here are required to satisfy {@link @fluidframework/runtime-definitions#FluidDataStoreMessage} interface.
|
|
29
|
+
*/
|
|
30
|
+
export type LocalFluidDataStoreRuntimeMessage = {
|
|
31
|
+
type: DataStoreMessageType.ChannelOp;
|
|
32
|
+
content: IEnvelope;
|
|
33
|
+
} | {
|
|
34
|
+
type: DataStoreMessageType.Attach;
|
|
35
|
+
content: IAttachMessage;
|
|
36
|
+
};
|
|
23
37
|
/**
|
|
24
38
|
* @legacy @beta
|
|
25
39
|
*/
|
|
@@ -110,11 +124,11 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
|
|
|
110
124
|
*/
|
|
111
125
|
constructor(dataStoreContext: IFluidDataStoreContext, sharedObjectRegistry: ISharedObjectRegistry, existing: boolean, provideEntryPoint: (runtime: IFluidDataStoreRuntime) => Promise<FluidObject>, policies?: Partial<IFluidDataStorePolicies>);
|
|
112
126
|
/**
|
|
113
|
-
* Implementation of
|
|
127
|
+
* Implementation of IFluidDataStoreRuntimeAlpha.inStagingMode
|
|
114
128
|
*/
|
|
115
129
|
private get inStagingMode();
|
|
116
130
|
/**
|
|
117
|
-
* Implementation of
|
|
131
|
+
* Implementation of IFluidDataStoreRuntimeAlpha.isDirty
|
|
118
132
|
*/
|
|
119
133
|
private get isDirty();
|
|
120
134
|
get deltaManager(): IDeltaManagerErased;
|
|
@@ -275,12 +289,28 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
|
|
|
275
289
|
* This typically happens when we reconnect and there are unacked messages.
|
|
276
290
|
* @param content - The content of the original message.
|
|
277
291
|
* @param localOpMetadata - The local metadata associated with the original message.
|
|
292
|
+
*
|
|
293
|
+
* @privateRemarks
|
|
294
|
+
* `type` parameter's type of `DataStoreMessageType` is a covariance exception
|
|
295
|
+
* over `string` that `IFluidDataStoreChannel` specifies. So long as local
|
|
296
|
+
* submissions conform to this type all is well. (`unreachableCase` might be
|
|
297
|
+
* reachable over time without better typing in this area if a mistake is made.)
|
|
298
|
+
* See {@link @fluidframework/runtime-definitions#FluidDataStoreMessage} comment
|
|
299
|
+
* for opportunity to resolve this.
|
|
278
300
|
*/
|
|
279
301
|
reSubmit(type: DataStoreMessageType, content: any, localOpMetadata: unknown, squash?: boolean): void;
|
|
280
302
|
/**
|
|
281
303
|
* Revert a local op.
|
|
282
304
|
* @param content - The content of the original message.
|
|
283
305
|
* @param localOpMetadata - The local metadata associated with the original message.
|
|
306
|
+
*
|
|
307
|
+
* @privateRemarks
|
|
308
|
+
* `type` parameter's type of `DataStoreMessageType` is a covariance exception
|
|
309
|
+
* over `string` that `IFluidDataStoreChannel` specifies. So long as local
|
|
310
|
+
* submissions conform to this type all is well. (`unreachableCase` might be
|
|
311
|
+
* reachable over time without better typing in this area if a mistake is made.)
|
|
312
|
+
* See {@link @fluidframework/runtime-definitions#FluidDataStoreMessage} comment
|
|
313
|
+
* for opportunity to resolve this.
|
|
284
314
|
*/
|
|
285
315
|
rollback?(type: DataStoreMessageType, content: any, localOpMetadata: unknown): void;
|
|
286
316
|
applyStashedOp(content: any): Promise<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAA4B,MAAM,8BAA8B,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EACX,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACX,mBAAmB,EACnB,oBAAoB,EACpB,MAAM,0CAA0C,CAAC;AAQlD,OAAO,KAAK,EACX,QAAQ,EACR,eAAe,EACf,sBAAsB,EACtB,4BAA4B,EAC5B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAA4B,MAA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wBM,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IA4C3D;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,cAAc;IAkBtB,OAAO,CAAC,eAAe;IAMvB;;;;OAIG;IACH,OAAO,CAAC,+BAA+B;IAyBhC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,QAAQ,GAAG,IAAI;CA+CtF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,mBACf,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB,KAAK,QAAQ,SAAS,CAAC,SACnF,4BAA4B,KAChC,4BAS+B,CAAC;AAEnC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,YACtB,CACR,OAAO,EAAE,qBAAqB,KAC1B,QAAQ;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,SACvD,4BAA4B,KAChC,4BAyC+B,CAAC"}
|
package/dist/dataStoreRuntime.js
CHANGED
|
@@ -147,6 +147,7 @@ class FluidDataStoreRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
147
147
|
namespace: "FluidDataStoreRuntime",
|
|
148
148
|
properties: {
|
|
149
149
|
all: { dataStoreId: (0, uuid_1.v4)(), dataStoreVersion: packageVersion_js_1.pkgVersion },
|
|
150
|
+
error: { inStagingMode: () => this.inStagingMode, isDirty: () => this.isDirty },
|
|
150
151
|
},
|
|
151
152
|
});
|
|
152
153
|
// Validate that the Runtime is compatible with this DataStore.
|
|
@@ -230,26 +231,17 @@ class FluidDataStoreRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
230
231
|
// By default, a data store can log maximum 10 local changes telemetry in summarizer.
|
|
231
232
|
this.localChangesTelemetryCount =
|
|
232
233
|
this.mc.config.getNumber("Fluid.Telemetry.LocalChangesTelemetryCount") ?? 10;
|
|
233
|
-
// Reference these properties to avoid unused private member errors.
|
|
234
|
-
// They're accessed via IFluidDataStoreRuntimeExperimental interface.
|
|
235
|
-
// eslint-disable-next-line no-void
|
|
236
|
-
void [this.inStagingMode, this.isDirty];
|
|
237
234
|
this.minVersionForCollab = this.dataStoreContext.minVersionForCollab;
|
|
238
235
|
}
|
|
239
236
|
/**
|
|
240
|
-
* Implementation of
|
|
237
|
+
* Implementation of IFluidDataStoreRuntimeAlpha.inStagingMode
|
|
241
238
|
*/
|
|
242
|
-
// eslint-disable-next-line import/no-deprecated
|
|
243
239
|
get inStagingMode() {
|
|
244
|
-
return (
|
|
245
|
-
// eslint-disable-next-line import/no-deprecated
|
|
246
|
-
this.dataStoreContext.containerRuntime
|
|
247
|
-
?.inStagingMode);
|
|
240
|
+
return (0, internal_3.asLegacyAlpha)(this.dataStoreContext.containerRuntime)?.inStagingMode;
|
|
248
241
|
}
|
|
249
242
|
/**
|
|
250
|
-
* Implementation of
|
|
243
|
+
* Implementation of IFluidDataStoreRuntimeAlpha.isDirty
|
|
251
244
|
*/
|
|
252
|
-
// eslint-disable-next-line import/no-deprecated
|
|
253
245
|
get isDirty() {
|
|
254
246
|
return this.pendingOpCount.value > 0;
|
|
255
247
|
}
|
|
@@ -818,17 +810,17 @@ class FluidDataStoreRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
818
810
|
type: channel.attributes.type,
|
|
819
811
|
};
|
|
820
812
|
this.pendingAttach.add(channel.id);
|
|
821
|
-
this.submit(DataStoreMessageType.Attach, message);
|
|
813
|
+
this.submit({ type: DataStoreMessageType.Attach, content: message });
|
|
822
814
|
const context = this.contexts.get(channel.id);
|
|
823
815
|
context.makeVisible();
|
|
824
816
|
}
|
|
825
817
|
submitChannelOp(address, contents, localOpMetadata) {
|
|
826
818
|
const envelope = { address, contents };
|
|
827
|
-
this.submit(DataStoreMessageType.ChannelOp, envelope, localOpMetadata);
|
|
828
|
-
}
|
|
829
|
-
submit(type, content, localOpMetadata = undefined) {
|
|
830
819
|
this.verifyNotClosed();
|
|
831
|
-
this.
|
|
820
|
+
this.submit({ type: DataStoreMessageType.ChannelOp, content: envelope }, localOpMetadata);
|
|
821
|
+
}
|
|
822
|
+
submit(message, localOpMetadata = undefined) {
|
|
823
|
+
this.dataStoreContext.submitMessage(message.type, message.content, localOpMetadata);
|
|
832
824
|
++this.pendingOpCount.value;
|
|
833
825
|
}
|
|
834
826
|
/**
|
|
@@ -837,6 +829,14 @@ class FluidDataStoreRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
837
829
|
* This typically happens when we reconnect and there are unacked messages.
|
|
838
830
|
* @param content - The content of the original message.
|
|
839
831
|
* @param localOpMetadata - The local metadata associated with the original message.
|
|
832
|
+
*
|
|
833
|
+
* @privateRemarks
|
|
834
|
+
* `type` parameter's type of `DataStoreMessageType` is a covariance exception
|
|
835
|
+
* over `string` that `IFluidDataStoreChannel` specifies. So long as local
|
|
836
|
+
* submissions conform to this type all is well. (`unreachableCase` might be
|
|
837
|
+
* reachable over time without better typing in this area if a mistake is made.)
|
|
838
|
+
* See {@link @fluidframework/runtime-definitions#FluidDataStoreMessage} comment
|
|
839
|
+
* for opportunity to resolve this.
|
|
840
840
|
*/
|
|
841
841
|
reSubmit(type,
|
|
842
842
|
// TODO: use something other than `any` here (breaking change)
|
|
@@ -857,7 +857,8 @@ class FluidDataStoreRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
857
857
|
}
|
|
858
858
|
case DataStoreMessageType.Attach: {
|
|
859
859
|
// For Attach messages, just submit them again.
|
|
860
|
-
|
|
860
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- `content` needs typed better than `any`
|
|
861
|
+
this.submit({ type, content }, localOpMetadata);
|
|
861
862
|
break;
|
|
862
863
|
}
|
|
863
864
|
default: {
|
|
@@ -869,6 +870,14 @@ class FluidDataStoreRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
869
870
|
* Revert a local op.
|
|
870
871
|
* @param content - The content of the original message.
|
|
871
872
|
* @param localOpMetadata - The local metadata associated with the original message.
|
|
873
|
+
*
|
|
874
|
+
* @privateRemarks
|
|
875
|
+
* `type` parameter's type of `DataStoreMessageType` is a covariance exception
|
|
876
|
+
* over `string` that `IFluidDataStoreChannel` specifies. So long as local
|
|
877
|
+
* submissions conform to this type all is well. (`unreachableCase` might be
|
|
878
|
+
* reachable over time without better typing in this area if a mistake is made.)
|
|
879
|
+
* See {@link @fluidframework/runtime-definitions#FluidDataStoreMessage} comment
|
|
880
|
+
* for opportunity to resolve this.
|
|
872
881
|
*/
|
|
873
882
|
rollback(type,
|
|
874
883
|
// TODO: use something other than `any` here (breaking change)
|