@fluidframework/container-runtime 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/.eslintrc.cjs +5 -1
- package/CHANGELOG.md +14 -0
- package/container-runtime.test-files.tar +0 -0
- package/dist/channelCollection.d.ts +66 -17
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +118 -84
- package/dist/channelCollection.js.map +1 -1
- package/dist/containerRuntime.d.ts +19 -11
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +146 -52
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +3 -1
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +8 -9
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +6 -5
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +7 -4
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/messageTypes.d.ts +17 -4
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.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/dist/runtimeLayerCompatState.d.ts +2 -2
- package/dist/runtimeLayerCompatState.d.ts.map +1 -1
- package/dist/runtimeLayerCompatState.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +3 -1
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/channelCollection.d.ts +66 -17
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +115 -82
- package/lib/channelCollection.js.map +1 -1
- package/lib/containerRuntime.d.ts +19 -11
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +148 -53
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +3 -1
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +3 -4
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +6 -5
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +8 -5
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/messageTypes.d.ts +17 -4
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.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/lib/runtimeLayerCompatState.d.ts +2 -2
- package/lib/runtimeLayerCompatState.d.ts.map +1 -1
- package/lib/runtimeLayerCompatState.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +3 -1
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/package.json +22 -30
- package/src/channelCollection.ts +255 -109
- package/src/containerRuntime.ts +262 -92
- package/src/dataStore.ts +12 -10
- package/src/dataStoreContext.ts +45 -39
- package/src/index.ts +8 -3
- package/src/messageTypes.ts +17 -2
- package/src/packageVersion.ts +1 -1
- package/src/runtimeLayerCompatState.ts +1 -1
- package/src/summary/summarizerNode/summarizerNode.ts +1 -0
package/src/dataStoreContext.ts
CHANGED
|
@@ -41,34 +41,37 @@ import {
|
|
|
41
41
|
readAndParse,
|
|
42
42
|
} from "@fluidframework/driver-utils/internal";
|
|
43
43
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
44
|
-
import {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
44
|
+
import type {
|
|
45
|
+
FluidDataStoreMessage,
|
|
46
|
+
ISummaryTreeWithStats,
|
|
47
|
+
ITelemetryContext,
|
|
48
|
+
IGarbageCollectionData,
|
|
49
|
+
CreateChildSummarizerNodeFn,
|
|
50
|
+
CreateChildSummarizerNodeParam,
|
|
51
|
+
FluidDataStoreContextInternal,
|
|
52
|
+
FluidDataStoreRegistryEntry,
|
|
53
|
+
IContainerRuntimeBase,
|
|
54
|
+
IDataStore,
|
|
55
|
+
IFluidDataStoreChannel,
|
|
56
|
+
IFluidDataStoreContextDetached,
|
|
57
|
+
IFluidDataStoreRegistry,
|
|
58
|
+
IGarbageCollectionDetailsBase,
|
|
59
|
+
IProvideFluidDataStoreFactory,
|
|
60
|
+
ISummarizeInternalResult,
|
|
61
|
+
ISummarizeResult,
|
|
62
|
+
ISummarizerNodeWithGC,
|
|
63
|
+
SummarizeInternalFn,
|
|
64
|
+
IInboundSignalMessage,
|
|
65
|
+
IPendingMessagesState,
|
|
66
|
+
IRuntimeMessageCollection,
|
|
67
|
+
IFluidDataStoreFactory,
|
|
68
|
+
PackagePath,
|
|
69
|
+
IRuntimeStorageService,
|
|
70
|
+
MinimumVersionForCollab,
|
|
71
|
+
ContainerExtensionId,
|
|
72
|
+
ContainerExtensionExpectations,
|
|
71
73
|
} from "@fluidframework/runtime-definitions/internal";
|
|
74
|
+
import { channelsTreeName } from "@fluidframework/runtime-definitions/internal";
|
|
72
75
|
import {
|
|
73
76
|
addBlobToSummary,
|
|
74
77
|
isSnapshotFetchRequiredForLoadingGroupId,
|
|
@@ -133,7 +136,7 @@ export interface ISnapshotDetails {
|
|
|
133
136
|
* This interface is used for context's parent - ChannelCollection.
|
|
134
137
|
* It should not be exposed to any other users of context.
|
|
135
138
|
*/
|
|
136
|
-
export interface
|
|
139
|
+
export interface IFluidDataStoreContextPrivate extends FluidDataStoreContextInternal {
|
|
137
140
|
getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
138
141
|
|
|
139
142
|
getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData;
|
|
@@ -248,11 +251,7 @@ class ContextDeltaManagerProxy extends BaseDeltaManagerProxy {
|
|
|
248
251
|
*/
|
|
249
252
|
export abstract class FluidDataStoreContext
|
|
250
253
|
extends TypedEventEmitter<IFluidDataStoreContextEvents>
|
|
251
|
-
implements
|
|
252
|
-
IFluidDataStoreContextInternal,
|
|
253
|
-
IFluidDataStoreContext,
|
|
254
|
-
IDisposable,
|
|
255
|
-
IProvideLayerCompatDetails
|
|
254
|
+
implements IFluidDataStoreContextPrivate, IDisposable, IProvideLayerCompatDetails
|
|
256
255
|
{
|
|
257
256
|
public get packagePath(): PackagePath {
|
|
258
257
|
assert(this.pkg !== undefined, 0x139 /* "Undefined package path" */);
|
|
@@ -1095,23 +1094,22 @@ export abstract class FluidDataStoreContext
|
|
|
1095
1094
|
}
|
|
1096
1095
|
|
|
1097
1096
|
public reSubmit(
|
|
1098
|
-
|
|
1099
|
-
contents: unknown,
|
|
1097
|
+
message: FluidDataStoreMessage,
|
|
1100
1098
|
localOpMetadata: unknown,
|
|
1101
|
-
squash
|
|
1099
|
+
squash?: boolean,
|
|
1102
1100
|
): void {
|
|
1103
1101
|
assert(!!this.channel, 0x14b /* "Channel must exist when resubmitting ops" */);
|
|
1104
|
-
this.channel.reSubmit(type,
|
|
1102
|
+
this.channel.reSubmit(message.type, message.content, localOpMetadata, squash);
|
|
1105
1103
|
}
|
|
1106
1104
|
|
|
1107
|
-
public rollback(
|
|
1105
|
+
public rollback(message: FluidDataStoreMessage, localOpMetadata: unknown): void {
|
|
1108
1106
|
if (!this.channel) {
|
|
1109
1107
|
throw new Error("Channel must exist when rolling back ops");
|
|
1110
1108
|
}
|
|
1111
1109
|
if (!this.channel.rollback) {
|
|
1112
1110
|
throw new Error("Channel doesn't support rollback");
|
|
1113
1111
|
}
|
|
1114
|
-
this.channel.rollback(type,
|
|
1112
|
+
this.channel.rollback(message.type, message.content, localOpMetadata);
|
|
1115
1113
|
}
|
|
1116
1114
|
|
|
1117
1115
|
public async applyStashedOp(contents: unknown): Promise<unknown> {
|
|
@@ -1222,6 +1220,14 @@ export abstract class FluidDataStoreContext
|
|
|
1222
1220
|
): Promise<IFluidHandleInternal<ArrayBufferLike>> {
|
|
1223
1221
|
return this.parentContext.uploadBlob(blob, signal);
|
|
1224
1222
|
}
|
|
1223
|
+
|
|
1224
|
+
public getExtension<TInterface, TUseContext extends unknown[] = []>(
|
|
1225
|
+
id: ContainerExtensionId,
|
|
1226
|
+
requirements: ContainerExtensionExpectations,
|
|
1227
|
+
...context: TUseContext
|
|
1228
|
+
): TInterface {
|
|
1229
|
+
return this.parentContext.getExtension(id, requirements, ...context);
|
|
1230
|
+
}
|
|
1225
1231
|
}
|
|
1226
1232
|
|
|
1227
1233
|
/**
|
package/src/index.ts
CHANGED
|
@@ -20,11 +20,16 @@ export {
|
|
|
20
20
|
} from "./containerRuntime.js";
|
|
21
21
|
export type { ICompressionRuntimeOptions } from "./compressionDefinitions.js";
|
|
22
22
|
export { CompressionAlgorithms, disabledCompressionConfig } from "./compressionDefinitions.js";
|
|
23
|
-
export {
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
export type {
|
|
24
|
+
ContainerRuntimeAliasMessage,
|
|
25
|
+
ContainerRuntimeDataStoreOpMessage,
|
|
26
|
+
OutboundContainerRuntimeAttachMessage,
|
|
27
|
+
TypedContainerRuntimeMessage,
|
|
28
|
+
UnknownContainerRuntimeMessage,
|
|
26
29
|
} from "./messageTypes.js";
|
|
30
|
+
export { ContainerMessageType } from "./messageTypes.js";
|
|
27
31
|
export type { IBlobManagerLoadInfo } from "./blobManager/index.js";
|
|
32
|
+
export type { IDataStoreAliasMessage } from "./dataStore.js";
|
|
28
33
|
export { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
|
|
29
34
|
export {
|
|
30
35
|
detectOutboundReferences,
|
package/src/messageTypes.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import type { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
7
7
|
import type { IdCreationRange } from "@fluidframework/id-compressor/internal";
|
|
8
8
|
import type {
|
|
9
|
+
FluidDataStoreMessage,
|
|
9
10
|
IAttachMessage,
|
|
10
11
|
IEnvelope,
|
|
11
12
|
InboundAttachMessage,
|
|
@@ -66,8 +67,10 @@ export enum ContainerMessageType {
|
|
|
66
67
|
*
|
|
67
68
|
* IMPORTANT: when creating one to be serialized, set the properties in the order they appear here.
|
|
68
69
|
* This way stringified values can be compared.
|
|
70
|
+
*
|
|
71
|
+
* @internal
|
|
69
72
|
*/
|
|
70
|
-
interface TypedContainerRuntimeMessage<TType extends ContainerMessageType, TContents> {
|
|
73
|
+
export interface TypedContainerRuntimeMessage<TType extends ContainerMessageType, TContents> {
|
|
71
74
|
/**
|
|
72
75
|
* Type of the op, within the ContainerRuntime's domain
|
|
73
76
|
*/
|
|
@@ -78,14 +81,22 @@ interface TypedContainerRuntimeMessage<TType extends ContainerMessageType, TCont
|
|
|
78
81
|
contents: TContents;
|
|
79
82
|
}
|
|
80
83
|
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
* @privateRemarks exported per ContainerRuntime export for testing purposes
|
|
87
|
+
*/
|
|
81
88
|
export type ContainerRuntimeDataStoreOpMessage = TypedContainerRuntimeMessage<
|
|
82
89
|
ContainerMessageType.FluidDataStoreOp,
|
|
83
|
-
IEnvelope
|
|
90
|
+
IEnvelope<FluidDataStoreMessage>
|
|
84
91
|
>;
|
|
85
92
|
export type InboundContainerRuntimeAttachMessage = TypedContainerRuntimeMessage<
|
|
86
93
|
ContainerMessageType.Attach,
|
|
87
94
|
InboundAttachMessage
|
|
88
95
|
>;
|
|
96
|
+
/**
|
|
97
|
+
* @internal
|
|
98
|
+
* @privateRemarks exported per ContainerRuntime export for testing purposes
|
|
99
|
+
*/
|
|
89
100
|
export type OutboundContainerRuntimeAttachMessage = TypedContainerRuntimeMessage<
|
|
90
101
|
ContainerMessageType.Attach,
|
|
91
102
|
IAttachMessage
|
|
@@ -102,6 +113,10 @@ export type ContainerRuntimeRejoinMessage = TypedContainerRuntimeMessage<
|
|
|
102
113
|
ContainerMessageType.Rejoin,
|
|
103
114
|
undefined
|
|
104
115
|
>;
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
* @privateRemarks exported per ContainerRuntime export for testing purposes
|
|
119
|
+
*/
|
|
105
120
|
export type ContainerRuntimeAliasMessage = TypedContainerRuntimeMessage<
|
|
106
121
|
ContainerMessageType.Alias,
|
|
107
122
|
IDataStoreAliasMessage
|
package/src/packageVersion.ts
CHANGED
|
@@ -104,6 +104,7 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
104
104
|
* Encoded handle or path to the node
|
|
105
105
|
*/
|
|
106
106
|
private readonly _summaryHandleId: string,
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly
|
|
107
108
|
private _changeSequenceNumber: number,
|
|
108
109
|
/**
|
|
109
110
|
* Summary reference sequence number, i.e. last sequence number seen when last successful summary was created
|