@fluidframework/datastore 2.53.1 → 2.61.0-355054
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/.mocharc.cjs +1 -2
- package/CHANGELOG.md +4 -0
- package/api-report/{datastore.legacy.alpha.api.md → datastore.legacy.beta.api.md} +7 -7
- package/dist/channelContext.d.ts +5 -5
- package/dist/channelContext.d.ts.map +1 -1
- package/dist/channelContext.js.map +1 -1
- package/dist/channelDeltaConnection.d.ts +1 -1
- package/dist/channelDeltaConnection.d.ts.map +1 -1
- package/dist/channelDeltaConnection.js.map +1 -1
- package/dist/channelStorageService.d.ts +3 -3
- package/dist/channelStorageService.d.ts.map +1 -1
- package/dist/channelStorageService.js.map +1 -1
- package/dist/dataStoreRuntime.d.ts +15 -21
- package/dist/dataStoreRuntime.d.ts.map +1 -1
- package/dist/dataStoreRuntime.js +5 -26
- package/dist/dataStoreRuntime.js.map +1 -1
- package/dist/fluidHandle.d.ts +3 -4
- package/dist/fluidHandle.d.ts.map +1 -1
- package/dist/fluidHandle.js +1 -2
- package/dist/fluidHandle.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/legacy.d.ts +2 -1
- package/dist/localChannelContext.d.ts +6 -6
- package/dist/localChannelContext.d.ts.map +1 -1
- package/dist/localChannelContext.js.map +1 -1
- package/dist/localChannelStorageService.d.ts +2 -2
- package/dist/localChannelStorageService.d.ts.map +1 -1
- package/dist/localChannelStorageService.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/remoteChannelContext.d.ts +5 -5
- package/dist/remoteChannelContext.d.ts.map +1 -1
- package/dist/remoteChannelContext.js.map +1 -1
- package/internal.d.ts +1 -1
- package/legacy.d.ts +1 -1
- package/lib/channelContext.d.ts +5 -5
- package/lib/channelContext.d.ts.map +1 -1
- package/lib/channelContext.js.map +1 -1
- package/lib/channelDeltaConnection.d.ts +1 -1
- package/lib/channelDeltaConnection.d.ts.map +1 -1
- package/lib/channelDeltaConnection.js.map +1 -1
- package/lib/channelStorageService.d.ts +3 -3
- package/lib/channelStorageService.d.ts.map +1 -1
- package/lib/channelStorageService.js.map +1 -1
- package/lib/dataStoreRuntime.d.ts +15 -21
- package/lib/dataStoreRuntime.d.ts.map +1 -1
- package/lib/dataStoreRuntime.js +5 -26
- package/lib/dataStoreRuntime.js.map +1 -1
- package/lib/fluidHandle.d.ts +3 -4
- package/lib/fluidHandle.d.ts.map +1 -1
- package/lib/fluidHandle.js +1 -2
- package/lib/fluidHandle.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/legacy.d.ts +2 -1
- package/lib/localChannelContext.d.ts +6 -6
- package/lib/localChannelContext.d.ts.map +1 -1
- package/lib/localChannelContext.js.map +1 -1
- package/lib/localChannelStorageService.d.ts +2 -2
- package/lib/localChannelStorageService.d.ts.map +1 -1
- package/lib/localChannelStorageService.js +1 -1
- package/lib/localChannelStorageService.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/remoteChannelContext.d.ts +5 -5
- package/lib/remoteChannelContext.d.ts.map +1 -1
- package/lib/remoteChannelContext.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +24 -24
- package/src/channelContext.ts +7 -7
- package/src/channelDeltaConnection.ts +1 -1
- package/src/channelStorageService.ts +3 -3
- package/src/dataStoreRuntime.ts +38 -56
- package/src/fluidHandle.ts +3 -4
- package/src/index.ts +1 -1
- package/src/localChannelContext.ts +11 -11
- package/src/localChannelStorageService.ts +6 -2
- package/src/packageVersion.ts +1 -1
- package/src/remoteChannelContext.ts +10 -10
package/src/dataStoreRuntime.ts
CHANGED
|
@@ -4,16 +4,18 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { TypedEventEmitter, type ILayerCompatDetails } from "@fluid-internal/client-utils";
|
|
7
|
-
import { AttachState, IAudience } from "@fluidframework/container-definitions";
|
|
8
|
-
import { IDeltaManager } from "@fluidframework/container-definitions/internal";
|
|
9
|
-
import {
|
|
7
|
+
import { AttachState, type IAudience } from "@fluidframework/container-definitions";
|
|
8
|
+
import type { IDeltaManager } from "@fluidframework/container-definitions/internal";
|
|
9
|
+
import type {
|
|
10
10
|
FluidObject,
|
|
11
11
|
IFluidHandle,
|
|
12
12
|
IRequest,
|
|
13
13
|
IResponse,
|
|
14
14
|
} from "@fluidframework/core-interfaces";
|
|
15
|
-
import {
|
|
16
|
-
|
|
15
|
+
import type {
|
|
16
|
+
IFluidHandleContext,
|
|
17
|
+
IFluidHandleInternal,
|
|
18
|
+
} from "@fluidframework/core-interfaces/internal";
|
|
17
19
|
import {
|
|
18
20
|
assert,
|
|
19
21
|
debugAssert,
|
|
@@ -21,42 +23,42 @@ import {
|
|
|
21
23
|
LazyPromise,
|
|
22
24
|
unreachableCase,
|
|
23
25
|
} from "@fluidframework/core-utils/internal";
|
|
24
|
-
import {
|
|
26
|
+
import type {
|
|
25
27
|
IChannel,
|
|
26
28
|
IChannelFactory,
|
|
27
29
|
IFluidDataStoreRuntime,
|
|
28
30
|
IFluidDataStoreRuntimeEvents,
|
|
29
|
-
|
|
31
|
+
IDeltaManagerErased,
|
|
30
32
|
// eslint-disable-next-line import/no-deprecated
|
|
31
|
-
|
|
33
|
+
IFluidDataStoreRuntimeExperimental,
|
|
32
34
|
} from "@fluidframework/datastore-definitions/internal";
|
|
33
35
|
import {
|
|
34
|
-
IClientDetails,
|
|
35
|
-
IQuorumClients,
|
|
36
|
-
ISummaryBlob,
|
|
37
|
-
ISummaryTree,
|
|
36
|
+
type IClientDetails,
|
|
37
|
+
type IQuorumClients,
|
|
38
|
+
type ISummaryBlob,
|
|
39
|
+
type ISummaryTree,
|
|
38
40
|
SummaryType,
|
|
39
41
|
} from "@fluidframework/driver-definitions";
|
|
40
|
-
import {
|
|
42
|
+
import type {
|
|
41
43
|
IDocumentMessage,
|
|
42
|
-
|
|
44
|
+
ISnapshotTree,
|
|
43
45
|
ISequencedDocumentMessage,
|
|
44
46
|
} from "@fluidframework/driver-definitions/internal";
|
|
45
47
|
import { buildSnapshotTree } from "@fluidframework/driver-utils/internal";
|
|
46
|
-
import { IIdCompressor } from "@fluidframework/id-compressor";
|
|
48
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
47
49
|
import {
|
|
48
|
-
ISummaryTreeWithStats,
|
|
49
|
-
ITelemetryContext,
|
|
50
|
-
IGarbageCollectionData,
|
|
51
|
-
CreateChildSummarizerNodeParam,
|
|
50
|
+
type ISummaryTreeWithStats,
|
|
51
|
+
type ITelemetryContext,
|
|
52
|
+
type IGarbageCollectionData,
|
|
53
|
+
type CreateChildSummarizerNodeParam,
|
|
52
54
|
CreateSummarizerNodeSource,
|
|
53
|
-
IAttachMessage,
|
|
54
|
-
IEnvelope,
|
|
55
|
-
IFluidDataStoreChannel,
|
|
56
|
-
IFluidDataStoreContext,
|
|
55
|
+
type IAttachMessage,
|
|
56
|
+
type IEnvelope,
|
|
57
|
+
type IFluidDataStoreChannel,
|
|
58
|
+
type IFluidDataStoreContext,
|
|
57
59
|
VisibilityState,
|
|
58
60
|
gcDataBlobKey,
|
|
59
|
-
IInboundSignalMessage,
|
|
61
|
+
type IInboundSignalMessage,
|
|
60
62
|
type IRuntimeMessageCollection,
|
|
61
63
|
type IRuntimeMessagesContent,
|
|
62
64
|
// eslint-disable-next-line import/no-deprecated
|
|
@@ -83,10 +85,10 @@ import {
|
|
|
83
85
|
encodeCompactIdToString,
|
|
84
86
|
} from "@fluidframework/runtime-utils/internal";
|
|
85
87
|
import {
|
|
86
|
-
ITelemetryLoggerExt,
|
|
88
|
+
type ITelemetryLoggerExt,
|
|
87
89
|
DataProcessingError,
|
|
88
90
|
LoggingError,
|
|
89
|
-
MonitoringContext,
|
|
91
|
+
type MonitoringContext,
|
|
90
92
|
UsageError,
|
|
91
93
|
createChildMonitoringContext,
|
|
92
94
|
generateStack,
|
|
@@ -95,7 +97,7 @@ import {
|
|
|
95
97
|
} from "@fluidframework/telemetry-utils/internal";
|
|
96
98
|
import { v4 as uuid } from "uuid";
|
|
97
99
|
|
|
98
|
-
import { IChannelContext, summarizeChannel } from "./channelContext.js";
|
|
100
|
+
import { type IChannelContext, summarizeChannel } from "./channelContext.js";
|
|
99
101
|
import {
|
|
100
102
|
dataStoreCompatDetailsForRuntime,
|
|
101
103
|
validateRuntimeCompatibility,
|
|
@@ -126,8 +128,7 @@ function contextSupportsFeature<K extends keyof IFluidDataStoreContextFeaturesTo
|
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
/**
|
|
129
|
-
* @legacy
|
|
130
|
-
* @alpha
|
|
131
|
+
* @legacy @beta
|
|
131
132
|
*/
|
|
132
133
|
export enum DataStoreMessageType {
|
|
133
134
|
// Creates a new channel
|
|
@@ -136,8 +137,7 @@ export enum DataStoreMessageType {
|
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
/**
|
|
139
|
-
* @legacy
|
|
140
|
-
* @alpha
|
|
140
|
+
* @legacy @beta
|
|
141
141
|
*/
|
|
142
142
|
export interface ISharedObjectRegistry {
|
|
143
143
|
// TODO consider making this async. A consequence is that either the creation of a distributed data type
|
|
@@ -167,8 +167,7 @@ function initializePendingOpCount(): { value: number } {
|
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
* Base data store class
|
|
170
|
-
* @legacy
|
|
171
|
-
* @alpha
|
|
170
|
+
* @legacy @beta
|
|
172
171
|
*/
|
|
173
172
|
export class FluidDataStoreRuntime
|
|
174
173
|
extends TypedEventEmitter<IFluidDataStoreRuntimeEvents>
|
|
@@ -1129,25 +1128,10 @@ export class FluidDataStoreRuntime
|
|
|
1129
1128
|
private visitLocalBoundContextsDuringAttach(
|
|
1130
1129
|
visitor: (contextId: string, context: LocalChannelContextBase) => void,
|
|
1131
1130
|
): void {
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
*
|
|
1137
|
-
* 1. Before attaching the data store - When a detached container is attached.
|
|
1138
|
-
*
|
|
1139
|
-
* 2. After attaching the data store - When a data store is created and bound in an attached container.
|
|
1140
|
-
*
|
|
1141
|
-
* The basic idea is that all local object should become locally visible before they are globally visible.
|
|
1142
|
-
*/
|
|
1143
|
-
this.attachGraph();
|
|
1144
|
-
|
|
1145
|
-
// This assert cannot be added now due to back-compat. To be uncommented when the following issue is fixed -
|
|
1146
|
-
// https://github.com/microsoft/FluidFramework/issues/9688.
|
|
1147
|
-
//
|
|
1148
|
-
// assert(this.visibilityState === VisibilityState.LocallyVisible,
|
|
1149
|
-
// "The data store should be locally visible when generating attach summary",
|
|
1150
|
-
// );
|
|
1131
|
+
assert(
|
|
1132
|
+
this.visibilityState === VisibilityState.LocallyVisible,
|
|
1133
|
+
0xc2c /* The data store should be locally visible when generating attach summary */,
|
|
1134
|
+
);
|
|
1151
1135
|
|
|
1152
1136
|
const visitedContexts = new Set<string>();
|
|
1153
1137
|
let visitedLength = -1;
|
|
@@ -1511,8 +1495,7 @@ export class FluidDataStoreRuntime
|
|
|
1511
1495
|
* Request handler is only called when data store can't resolve request, i.e. for custom requests.
|
|
1512
1496
|
* @param Base - base class, inherits from FluidDataStoreRuntime
|
|
1513
1497
|
* @param requestHandler - request handler to mix in
|
|
1514
|
-
* @legacy
|
|
1515
|
-
* @alpha
|
|
1498
|
+
* @legacy @beta
|
|
1516
1499
|
*/
|
|
1517
1500
|
export const mixinRequestHandler = (
|
|
1518
1501
|
requestHandler: (request: IRequest, runtime: FluidDataStoreRuntime) => Promise<IResponse>,
|
|
@@ -1533,8 +1516,7 @@ export const mixinRequestHandler = (
|
|
|
1533
1516
|
* @param handler - handler that returns info about blob to be added to summary.
|
|
1534
1517
|
* Or undefined not to add anything to summary.
|
|
1535
1518
|
* @param Base - base class, inherits from FluidDataStoreRuntime
|
|
1536
|
-
* @legacy
|
|
1537
|
-
* @alpha
|
|
1519
|
+
* @legacy @beta
|
|
1538
1520
|
*/
|
|
1539
1521
|
export const mixinSummaryHandler = (
|
|
1540
1522
|
handler: (
|
package/src/fluidHandle.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { FluidObject } from "@fluidframework/core-interfaces";
|
|
7
|
-
import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
|
|
6
|
+
import type { FluidObject } from "@fluidframework/core-interfaces";
|
|
7
|
+
import type { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
|
|
8
8
|
import {
|
|
9
9
|
generateHandleContextPath,
|
|
10
10
|
FluidHandleBase,
|
|
@@ -12,8 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.
|
|
15
|
-
* @legacy
|
|
16
|
-
* @alpha
|
|
15
|
+
* @legacy @beta
|
|
17
16
|
*/
|
|
18
17
|
export class FluidObjectHandle<
|
|
19
18
|
T extends FluidObject = FluidObject,
|
package/src/index.ts
CHANGED
|
@@ -3,37 +3,37 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ISnapshotTreeWithBlobContents } from "@fluidframework/container-definitions/internal";
|
|
6
|
+
import type { ISnapshotTreeWithBlobContents } from "@fluidframework/container-definitions/internal";
|
|
7
7
|
import { assert, Lazy, LazyPromise } from "@fluidframework/core-utils/internal";
|
|
8
|
-
import {
|
|
8
|
+
import type {
|
|
9
9
|
IChannel,
|
|
10
10
|
IFluidDataStoreRuntime,
|
|
11
11
|
} from "@fluidframework/datastore-definitions/internal";
|
|
12
|
-
import { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
|
|
13
|
-
import {
|
|
12
|
+
import type { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
|
|
13
|
+
import type {
|
|
14
14
|
ITelemetryContext,
|
|
15
15
|
IFluidDataStoreContext,
|
|
16
16
|
IGarbageCollectionData,
|
|
17
17
|
ISummarizeResult,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
IPendingMessagesState,
|
|
19
|
+
IRuntimeMessageCollection,
|
|
20
|
+
IRuntimeStorageService,
|
|
21
21
|
} from "@fluidframework/runtime-definitions/internal";
|
|
22
22
|
import {
|
|
23
|
-
ITelemetryLoggerExt,
|
|
23
|
+
type ITelemetryLoggerExt,
|
|
24
24
|
DataProcessingError,
|
|
25
25
|
} from "@fluidframework/telemetry-utils/internal";
|
|
26
26
|
|
|
27
27
|
import {
|
|
28
|
-
ChannelServiceEndpoints,
|
|
29
|
-
IChannelContext,
|
|
28
|
+
type ChannelServiceEndpoints,
|
|
29
|
+
type IChannelContext,
|
|
30
30
|
createChannelServiceEndpoints,
|
|
31
31
|
loadChannel,
|
|
32
32
|
loadChannelFactoryAndAttributes,
|
|
33
33
|
summarizeChannel,
|
|
34
34
|
summarizeChannelAsync,
|
|
35
35
|
} from "./channelContext.js";
|
|
36
|
-
import { ISharedObjectRegistry } from "./dataStoreRuntime.js";
|
|
36
|
+
import type { ISharedObjectRegistry } from "./dataStoreRuntime.js";
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Channel context for a locally created channel
|
|
@@ -4,8 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { stringToBuffer } from "@fluid-internal/client-utils";
|
|
7
|
-
import { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
8
|
-
import {
|
|
7
|
+
import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
8
|
+
import {
|
|
9
|
+
type IBlob,
|
|
10
|
+
type ITree,
|
|
11
|
+
TreeEntry,
|
|
12
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
9
13
|
import { listBlobsAtTreePath } from "@fluidframework/runtime-utils/internal";
|
|
10
14
|
|
|
11
15
|
export class LocalChannelStorageService implements IChannelStorageService {
|
package/src/packageVersion.ts
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
import { AttachState } from "@fluidframework/container-definitions/internal";
|
|
7
7
|
import { assert, LazyPromise } from "@fluidframework/core-utils/internal";
|
|
8
|
-
import {
|
|
8
|
+
import type {
|
|
9
9
|
IChannel,
|
|
10
10
|
IFluidDataStoreRuntime,
|
|
11
11
|
} from "@fluidframework/datastore-definitions/internal";
|
|
12
|
-
import { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
|
|
13
|
-
import {
|
|
12
|
+
import type { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
|
|
13
|
+
import type {
|
|
14
14
|
IExperimentalIncrementalSummaryContext,
|
|
15
15
|
ITelemetryContext,
|
|
16
16
|
IGarbageCollectionData,
|
|
@@ -19,25 +19,25 @@ import {
|
|
|
19
19
|
ISummarizeInternalResult,
|
|
20
20
|
ISummarizeResult,
|
|
21
21
|
ISummarizerNodeWithGC,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
IPendingMessagesState,
|
|
23
|
+
IRuntimeMessageCollection,
|
|
24
|
+
IRuntimeStorageService,
|
|
25
25
|
} from "@fluidframework/runtime-definitions/internal";
|
|
26
26
|
import {
|
|
27
|
-
ITelemetryLoggerExt,
|
|
27
|
+
type ITelemetryLoggerExt,
|
|
28
28
|
ThresholdCounter,
|
|
29
29
|
createChildLogger,
|
|
30
30
|
} from "@fluidframework/telemetry-utils/internal";
|
|
31
31
|
|
|
32
32
|
import {
|
|
33
|
-
ChannelServiceEndpoints,
|
|
34
|
-
IChannelContext,
|
|
33
|
+
type ChannelServiceEndpoints,
|
|
34
|
+
type IChannelContext,
|
|
35
35
|
createChannelServiceEndpoints,
|
|
36
36
|
loadChannel,
|
|
37
37
|
loadChannelFactoryAndAttributes,
|
|
38
38
|
summarizeChannelAsync,
|
|
39
39
|
} from "./channelContext.js";
|
|
40
|
-
import { ISharedObjectRegistry } from "./dataStoreRuntime.js";
|
|
40
|
+
import type { ISharedObjectRegistry } from "./dataStoreRuntime.js";
|
|
41
41
|
|
|
42
42
|
export class RemoteChannelContext implements IChannelContext {
|
|
43
43
|
private isLoaded = false;
|