@fluidframework/datastore 2.0.0-dev-rc.4.0.0.261659 → 2.0.0-dev-rc.5.0.0.263932
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 +21 -0
- package/api-report/datastore.api.md +15 -11
- package/dist/dataStoreRuntime.d.ts +8 -5
- package/dist/dataStoreRuntime.d.ts.map +1 -1
- package/dist/dataStoreRuntime.js +9 -6
- package/dist/dataStoreRuntime.js.map +1 -1
- package/dist/fluidHandle.d.ts +5 -7
- package/dist/fluidHandle.d.ts.map +1 -1
- package/dist/fluidHandle.js +2 -7
- package/dist/fluidHandle.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/lib/dataStoreRuntime.d.ts +8 -5
- package/lib/dataStoreRuntime.d.ts.map +1 -1
- package/lib/dataStoreRuntime.js +10 -7
- package/lib/dataStoreRuntime.js.map +1 -1
- package/lib/fluidHandle.d.ts +5 -7
- package/lib/fluidHandle.d.ts.map +1 -1
- package/lib/fluidHandle.js +3 -8
- package/lib/fluidHandle.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/tsdoc-metadata.json +1 -1
- package/package.json +25 -20
- package/src/dataStoreRuntime.ts +26 -11
- package/src/fluidHandle.ts +7 -12
- package/src/packageVersion.ts +1 -1
package/dist/fluidHandle.d.ts
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
|
|
6
|
+
import { FluidObject, IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
|
|
7
|
+
import { FluidHandleBase } from "@fluidframework/runtime-utils/internal";
|
|
6
8
|
/**
|
|
7
9
|
* Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.
|
|
8
10
|
* @alpha
|
|
9
11
|
*/
|
|
10
|
-
export declare class FluidObjectHandle<T extends FluidObject = FluidObject>
|
|
12
|
+
export declare class FluidObjectHandle<T extends FluidObject = FluidObject> extends FluidHandleBase<T> {
|
|
11
13
|
protected readonly value: T | Promise<T>;
|
|
12
14
|
readonly path: string;
|
|
13
15
|
readonly routeContext: IFluidHandleContext;
|
|
@@ -16,10 +18,6 @@ export declare class FluidObjectHandle<T extends FluidObject = FluidObject> impl
|
|
|
16
18
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.absolutePath}
|
|
17
19
|
*/
|
|
18
20
|
readonly absolutePath: string;
|
|
19
|
-
/**
|
|
20
|
-
* {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}
|
|
21
|
-
*/
|
|
22
|
-
get IFluidHandle(): IFluidHandle;
|
|
23
21
|
/**
|
|
24
22
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.isAttached}
|
|
25
23
|
*/
|
|
@@ -52,6 +50,6 @@ export declare class FluidObjectHandle<T extends FluidObject = FluidObject> impl
|
|
|
52
50
|
/**
|
|
53
51
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.bind}
|
|
54
52
|
*/
|
|
55
|
-
bind(handle:
|
|
53
|
+
bind(handle: IFluidHandleInternal): void;
|
|
56
54
|
}
|
|
57
55
|
//# sourceMappingURL=fluidHandle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidHandle.d.ts","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"fluidHandle.d.ts","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAA6B,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAEpG;;;GAGG;AACH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IAgD5F,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;aACxB,IAAI,EAAE,MAAM;aACZ,YAAY,EAAE,mBAAmB;IAjDlD,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAwC;IAEpF;;OAEG;IACH,SAAgB,YAAY,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED;;OAEG;IACH,OAAO,KAAK,OAAO,GAclB;IAED;;OAEG;IACH,OAAO,CAAC,cAAc,CAAkB;IAExC;;;;;;;OAOG;gBAEiB,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACxB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,mBAAmB;IAMlD;;OAEG;IACU,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAKhC;;OAEG;IACI,WAAW,IAAI,IAAI;IAa1B;;OAEG;IACI,IAAI,CAAC,MAAM,EAAE,oBAAoB;CAQxC"}
|
package/dist/fluidHandle.js
CHANGED
|
@@ -10,13 +10,7 @@ const internal_1 = require("@fluidframework/runtime-utils/internal");
|
|
|
10
10
|
* Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.
|
|
11
11
|
* @alpha
|
|
12
12
|
*/
|
|
13
|
-
class FluidObjectHandle {
|
|
14
|
-
/**
|
|
15
|
-
* {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}
|
|
16
|
-
*/
|
|
17
|
-
get IFluidHandle() {
|
|
18
|
-
return this;
|
|
19
|
-
}
|
|
13
|
+
class FluidObjectHandle extends internal_1.FluidHandleBase {
|
|
20
14
|
/**
|
|
21
15
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.isAttached}
|
|
22
16
|
*/
|
|
@@ -50,6 +44,7 @@ class FluidObjectHandle {
|
|
|
50
44
|
* to this handle.
|
|
51
45
|
*/
|
|
52
46
|
constructor(value, path, routeContext) {
|
|
47
|
+
super();
|
|
53
48
|
this.value = value;
|
|
54
49
|
this.path = path;
|
|
55
50
|
this.routeContext = routeContext;
|
package/dist/fluidHandle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidHandle.js","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"fluidHandle.js","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,qEAAoG;AAEpG;;;GAGG;AACH,MAAa,iBAAuD,SAAQ,0BAAkB;IAQ7F;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAY,OAAO;QAClB;;;;;;;;;;;WAWG;QACH,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,cAAc,CAAC;IAC/C,CAAC;IAOD;;;;;;;OAOG;IACH,YACoB,KAAqB,EACxB,IAAY,EACZ,YAAiC;QAEjD,KAAK,EAAE,CAAC;QAJW,UAAK,GAAL,KAAK,CAAgB;QACxB,SAAI,GAAJ,IAAI,CAAQ;QACZ,iBAAY,GAAZ,YAAY,CAAqB;QAjDjC,gCAA2B,GAA8B,IAAI,GAAG,EAAE,CAAC;QAiCpF;;WAEG;QACK,mBAAc,GAAY,KAAK,CAAC;QAgBvC,IAAI,CAAC,YAAY,GAAG,IAAA,oCAAyB,EAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,GAAG;QACf,yGAAyG;QACzG,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,WAAW;QACjB,IAAI,IAAI,CAAC,OAAO,EAAE;YACjB,OAAO;SACP;QAED,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACnD,MAAM,CAAC,WAAW,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,2BAA2B,CAAC,KAAK,EAAE,CAAC;QACzC,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,IAAI,CAAC,MAA4B;QACvC,8EAA8E;QAC9E,IAAI,IAAI,CAAC,OAAO,EAAE;YACjB,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO;SACP;QACD,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACD;AA3FD,8CA2FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandleInternal } from \"@fluidframework/core-interfaces/internal\";\nimport { FluidObject, IFluidHandleContext } from \"@fluidframework/core-interfaces/internal\";\nimport { generateHandleContextPath, FluidHandleBase } from \"@fluidframework/runtime-utils/internal\";\n\n/**\n * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.\n * @alpha\n */\nexport class FluidObjectHandle<T extends FluidObject = FluidObject> extends FluidHandleBase<T> {\n\tprivate readonly pendingHandlesToMakeVisible: Set<IFluidHandleInternal> = new Set();\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.absolutePath}\n\t */\n\tpublic readonly absolutePath: string;\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.isAttached}\n\t */\n\tpublic get isAttached(): boolean {\n\t\treturn this.routeContext.isAttached;\n\t}\n\n\t/**\n\t * Tells whether the object of this handle is visible in the container locally or globally.\n\t */\n\tprivate get visible(): boolean {\n\t\t/**\n\t\t * If the object of this handle is attached, it is visible in the container. Ideally, checking local visibility\n\t\t * should be enough for a handle. However, there are scenarios where the object becomes locally visible but the\n\t\t * handle does not know this - This will happen is attachGraph is never called on the handle. Couple of examples\n\t\t * where this can happen:\n\t\t *\n\t\t * 1. Handles to DDS other than the default handle won't know if the DDS becomes visible after the handle was\n\t\t * created.\n\t\t *\n\t\t * 2. Handles to root data stores will never know that it was visible because the handle will not be stores in\n\t\t * another DDS and so, attachGraph will never be called on it.\n\t\t */\n\t\treturn this.isAttached || this.locallyVisible;\n\t}\n\n\t/**\n\t * Tracks whether this handle is locally visible in the container.\n\t */\n\tprivate locallyVisible: boolean = false;\n\n\t/**\n\t * Creates a new `FluidObjectHandle`.\n\t *\n\t * @param value - The {@link @fluidframework/core-interfaces#FluidObject} object this handle is for.\n\t * @param path - The path to this handle relative to the `routeContext`.\n\t * @param routeContext - The parent {@link @fluidframework/core-interfaces#IFluidHandleContext} that has a route\n\t * to this handle.\n\t */\n\tconstructor(\n\t\tprotected readonly value: T | Promise<T>,\n\t\tpublic readonly path: string,\n\t\tpublic readonly routeContext: IFluidHandleContext,\n\t) {\n\t\tsuper();\n\t\tthis.absolutePath = generateHandleContextPath(path, this.routeContext);\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.get}\n\t */\n\tpublic async get(): Promise<any> {\n\t\t// Note that this return works whether we received a T or a Promise<T> for this.value in the constructor.\n\t\treturn this.value;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.attachGraph }\n\t */\n\tpublic attachGraph(): void {\n\t\tif (this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.locallyVisible = true;\n\t\tthis.pendingHandlesToMakeVisible.forEach((handle) => {\n\t\t\thandle.attachGraph();\n\t\t});\n\t\tthis.pendingHandlesToMakeVisible.clear();\n\t\tthis.routeContext.attachGraph();\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.bind}\n\t */\n\tpublic bind(handle: IFluidHandleInternal) {\n\t\t// If this handle is visible, attach the graph of the incoming handle as well.\n\t\tif (this.visible) {\n\t\t\thandle.attachGraph();\n\t\t\treturn;\n\t\t}\n\t\tthis.pendingHandlesToMakeVisible.add(handle);\n\t}\n}\n"]}
|
package/dist/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/datastore";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-dev-rc.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-dev-rc.5.0.0.263932";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/datastore";
|
|
11
|
-
exports.pkgVersion = "2.0.0-dev-rc.
|
|
11
|
+
exports.pkgVersion = "2.0.0-dev-rc.5.0.0.263932";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,2BAA2B,CAAC;AACtC,QAAA,UAAU,GAAG,2BAA2B,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/datastore\";\nexport const pkgVersion = \"2.0.0-dev-rc.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,2BAA2B,CAAC;AACtC,QAAA,UAAU,GAAG,2BAA2B,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/datastore\";\nexport const pkgVersion = \"2.0.0-dev-rc.5.0.0.263932\";\n"]}
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
|
-
import { AttachState, IAudience
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { AttachState, IAudience } from "@fluidframework/container-definitions";
|
|
7
|
+
import { IDeltaManager } from "@fluidframework/container-definitions/internal";
|
|
8
|
+
import { FluidObject, IFluidHandle, IFluidHandleContext, IRequest, IResponse } from "@fluidframework/core-interfaces/internal";
|
|
9
|
+
import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
|
|
10
|
+
import { IChannel, IChannelFactory, IFluidDataStoreRuntime, IFluidDataStoreRuntimeEvents, type IDeltaManagerErased } from "@fluidframework/datastore-definitions";
|
|
9
11
|
import { IIdCompressor } from "@fluidframework/id-compressor";
|
|
10
12
|
import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
11
13
|
import { IGarbageCollectionData, IInboundSignalMessage, ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions";
|
|
@@ -34,7 +36,7 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
|
|
|
34
36
|
/**
|
|
35
37
|
* {@inheritDoc @fluidframework/datastore-definitions#IFluidDataStoreRuntime.entryPoint}
|
|
36
38
|
*/
|
|
37
|
-
readonly entryPoint:
|
|
39
|
+
readonly entryPoint: IFluidHandleInternal<FluidObject>;
|
|
38
40
|
get connected(): boolean;
|
|
39
41
|
get clientId(): string | undefined;
|
|
40
42
|
get clientDetails(): IClientDetails;
|
|
@@ -59,7 +61,7 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
|
|
|
59
61
|
private readonly pendingHandlesToMakeVisible;
|
|
60
62
|
readonly id: string;
|
|
61
63
|
readonly options: Record<string | number, any>;
|
|
62
|
-
readonly
|
|
64
|
+
readonly deltaManagerInternal: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
63
65
|
private readonly quorum;
|
|
64
66
|
private readonly audience;
|
|
65
67
|
private readonly mc;
|
|
@@ -82,6 +84,7 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
|
|
|
82
84
|
* and the primary way of interacting with some Fluid objects, and should be used if possible.
|
|
83
85
|
*/
|
|
84
86
|
constructor(dataStoreContext: IFluidDataStoreContext, sharedObjectRegistry: ISharedObjectRegistry, existing: boolean, provideEntryPoint: (runtime: IFluidDataStoreRuntime) => Promise<FluidObject>);
|
|
87
|
+
get deltaManager(): IDeltaManagerErased;
|
|
85
88
|
dispose(): void;
|
|
86
89
|
resolveHandle(request: IRequest): Promise<IResponse>;
|
|
87
90
|
request(request: IRequest): Promise<IResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,
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;OAMG;IACI,QAAQ,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,OAAO;IAwBlF;;;;OAIG;IACI,QAAQ,CAAC,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,OAAO;IAoBtE,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IAuC3D,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,gBAAgB;IAqBxB,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,eAAe;IAMvB;;;;OAIG;IACH,OAAO,CAAC,+BAA+B;IAyBhC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,QAAQ,GAAG,IAAI;CA4CtF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,6BACL,QAAQ,WAAW,qBAAqB,KAAK,QAAQ,SAAS,CAAC,SACnF,4BAA4B,iCAUD,CAAC;AAEnC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,sBAErB,qBAAqB,KAC1B,QAAQ;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,SACvD,4BAA4B,iCAyCD,CAAC"}
|
package/lib/dataStoreRuntime.js
CHANGED
|
@@ -8,7 +8,7 @@ import { assert, Deferred, LazyPromise, unreachableCase, } from "@fluidframework
|
|
|
8
8
|
import { buildSnapshotTree } from "@fluidframework/driver-utils/internal";
|
|
9
9
|
import { SummaryType, } from "@fluidframework/protocol-definitions";
|
|
10
10
|
import { CreateSummarizerNodeSource, VisibilityState, gcDataBlobKey, } from "@fluidframework/runtime-definitions/internal";
|
|
11
|
-
import { GCDataBuilder, RequestParser, SummaryTreeBuilder, addBlobToSummary, convertSnapshotTreeToSummaryTree, convertSummaryTreeToITree, create404Response, createResponseError, encodeCompactIdToString, exceptionToResponse, generateHandleContextPath, processAttachMessageGCData, unpackChildNodesUsedRoutes, } from "@fluidframework/runtime-utils/internal";
|
|
11
|
+
import { GCDataBuilder, RequestParser, SummaryTreeBuilder, addBlobToSummary, convertSnapshotTreeToSummaryTree, convertSummaryTreeToITree, create404Response, createResponseError, encodeCompactIdToString, exceptionToResponse, generateHandleContextPath, processAttachMessageGCData, toFluidHandleInternal, unpackChildNodesUsedRoutes, toDeltaManagerErased, } from "@fluidframework/runtime-utils/internal";
|
|
12
12
|
import { DataProcessingError, LoggingError, UsageError, createChildMonitoringContext, generateStack, raiseConnectedEvent, tagCodeArtifacts, } from "@fluidframework/telemetry-utils/internal";
|
|
13
13
|
import { v4 as uuid } from "uuid";
|
|
14
14
|
import { summarizeChannel } from "./channelContext.js";
|
|
@@ -106,7 +106,7 @@ export class FluidDataStoreRuntime extends TypedEventEmitter {
|
|
|
106
106
|
});
|
|
107
107
|
this.id = dataStoreContext.id;
|
|
108
108
|
this.options = dataStoreContext.options;
|
|
109
|
-
this.
|
|
109
|
+
this.deltaManagerInternal = dataStoreContext.deltaManager;
|
|
110
110
|
this.quorum = dataStoreContext.getQuorum();
|
|
111
111
|
this.audience = dataStoreContext.getAudience();
|
|
112
112
|
const tree = dataStoreContext.baseSnapshot;
|
|
@@ -172,6 +172,9 @@ export class FluidDataStoreRuntime extends TypedEventEmitter {
|
|
|
172
172
|
this.localChangesTelemetryCount =
|
|
173
173
|
this.mc.config.getNumber("Fluid.Telemetry.LocalChangesTelemetryCount") ?? 10;
|
|
174
174
|
}
|
|
175
|
+
get deltaManager() {
|
|
176
|
+
return toDeltaManagerErased(this.deltaManagerInternal);
|
|
177
|
+
}
|
|
175
178
|
dispose() {
|
|
176
179
|
if (this._disposed) {
|
|
177
180
|
return;
|
|
@@ -315,7 +318,7 @@ export class FluidDataStoreRuntime extends TypedEventEmitter {
|
|
|
315
318
|
* If this channel is already waiting to be made visible, do nothing. This can happen during attachGraph() when
|
|
316
319
|
* a channel's graph is attached. It calls bindToContext on the shared object which will end up back here.
|
|
317
320
|
*/
|
|
318
|
-
if (this.pendingHandlesToMakeVisible.has(channel.handle)) {
|
|
321
|
+
if (this.pendingHandlesToMakeVisible.has(toFluidHandleInternal(channel.handle))) {
|
|
319
322
|
return;
|
|
320
323
|
}
|
|
321
324
|
this.bind(channel.handle);
|
|
@@ -355,10 +358,10 @@ export class FluidDataStoreRuntime extends TypedEventEmitter {
|
|
|
355
358
|
bind(handle) {
|
|
356
359
|
// If visible, attach the incoming handle's graph. Else, this will be done when we become visible.
|
|
357
360
|
if (this.visibilityState !== VisibilityState.NotVisible) {
|
|
358
|
-
handle.attachGraph();
|
|
361
|
+
toFluidHandleInternal(handle).attachGraph();
|
|
359
362
|
return;
|
|
360
363
|
}
|
|
361
|
-
this.pendingHandlesToMakeVisible.add(handle);
|
|
364
|
+
this.pendingHandlesToMakeVisible.add(toFluidHandleInternal(handle));
|
|
362
365
|
}
|
|
363
366
|
setConnectionState(connected, clientId) {
|
|
364
367
|
this.verifyNotClosed();
|
|
@@ -525,7 +528,7 @@ export class FluidDataStoreRuntime extends TypedEventEmitter {
|
|
|
525
528
|
// ContainerRuntime is newer, it will actually be a no-op since then the ContainerRuntime
|
|
526
529
|
// will be the one to call addedGCOutboundReference directly.
|
|
527
530
|
// But on the flip side, if the ContainerRuntime is older, then it's important we still call this.
|
|
528
|
-
this.dataStoreContext.addedGCOutboundReference?.(srcHandle, outboundHandle);
|
|
531
|
+
this.dataStoreContext.addedGCOutboundReference?.(toFluidHandleInternal(srcHandle), toFluidHandleInternal(outboundHandle));
|
|
529
532
|
}
|
|
530
533
|
/**
|
|
531
534
|
* Returns a summary at the current sequence number.
|
|
@@ -647,7 +650,7 @@ export class FluidDataStoreRuntime extends TypedEventEmitter {
|
|
|
647
650
|
if (channel.handle.isAttached) {
|
|
648
651
|
return;
|
|
649
652
|
}
|
|
650
|
-
channel.handle.attachGraph();
|
|
653
|
+
toFluidHandleInternal(channel.handle).attachGraph();
|
|
651
654
|
assert(this.isAttached, 0x182 /* "Data store should be attached to attach the channel." */);
|
|
652
655
|
assert(this.visibilityState === VisibilityState.GloballyVisible, 0x2d0 /* "Data store should be globally visible to attach channels." */);
|
|
653
656
|
const summarizeResult = summarizeChannel(channel, true /* fullTree */, false /* trackState */);
|