@fluidframework/datastore 2.50.0-345060 → 2.50.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 +8 -0
- package/api-report/datastore.legacy.alpha.api.md +0 -2
- package/dist/fluidHandle.d.ts +0 -15
- package/dist/fluidHandle.d.ts.map +1 -1
- package/dist/fluidHandle.js +0 -46
- package/dist/fluidHandle.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/fluidHandle.d.ts +0 -15
- package/lib/fluidHandle.d.ts.map +1 -1
- package/lib/fluidHandle.js +0 -46
- package/lib/fluidHandle.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 +28 -15
- package/src/fluidHandle.ts +0 -53
- package/src/packageVersion.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @fluidframework/datastore
|
|
2
2
|
|
|
3
|
+
## 2.50.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- IFluidHandleInternal.bind (deprecated) has been removed ([#24974](https://github.com/microsoft/FluidFramework/pull/24974)) [07e183795f](https://github.com/microsoft/FluidFramework/commit/07e183795fa8118fae717c118ab7a7945ac1ad57)
|
|
8
|
+
|
|
9
|
+
`IFluidHandleInternal.bind` was deprecated in 2.40 and has now been removed. See [release notes entry](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.40.0#user-content-ifluidhandleinternalbind-has-been-deprecated-24553) for more details.
|
|
10
|
+
|
|
3
11
|
## 2.43.0
|
|
4
12
|
|
|
5
13
|
Dependency updates only.
|
|
@@ -110,8 +110,6 @@ export class FluidObjectHandle<T extends FluidObject = FluidObject> extends Flui
|
|
|
110
110
|
constructor(value: T | Promise<T>, path: string, routeContext: IFluidHandleContext);
|
|
111
111
|
readonly absolutePath: string;
|
|
112
112
|
attachGraph(): void;
|
|
113
|
-
// @deprecated (undocumented)
|
|
114
|
-
bind(handle: IFluidHandleInternal): void;
|
|
115
113
|
get(): Promise<any>;
|
|
116
114
|
get isAttached(): boolean;
|
|
117
115
|
// (undocumented)
|
package/dist/fluidHandle.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { FluidObject } from "@fluidframework/core-interfaces";
|
|
6
|
-
import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
|
|
7
6
|
import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
|
|
8
7
|
import { FluidHandleBase } from "@fluidframework/runtime-utils/internal";
|
|
9
8
|
/**
|
|
@@ -15,7 +14,6 @@ export declare class FluidObjectHandle<T extends FluidObject = FluidObject> exte
|
|
|
15
14
|
protected readonly value: T | Promise<T>;
|
|
16
15
|
readonly path: string;
|
|
17
16
|
readonly routeContext: IFluidHandleContext;
|
|
18
|
-
private readonly pendingHandlesToMakeVisible;
|
|
19
17
|
/**
|
|
20
18
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.absolutePath}
|
|
21
19
|
*/
|
|
@@ -24,14 +22,6 @@ export declare class FluidObjectHandle<T extends FluidObject = FluidObject> exte
|
|
|
24
22
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.isAttached}
|
|
25
23
|
*/
|
|
26
24
|
get isAttached(): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Tells whether the object of this handle is visible in the container locally or globally.
|
|
29
|
-
*/
|
|
30
|
-
private get visible();
|
|
31
|
-
/**
|
|
32
|
-
* Tracks whether this handle is locally visible in the container.
|
|
33
|
-
*/
|
|
34
|
-
private locallyVisible;
|
|
35
25
|
/**
|
|
36
26
|
* Creates a new `FluidObjectHandle`.
|
|
37
27
|
*
|
|
@@ -49,10 +39,5 @@ export declare class FluidObjectHandle<T extends FluidObject = FluidObject> exte
|
|
|
49
39
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.attachGraph }
|
|
50
40
|
*/
|
|
51
41
|
attachGraph(): void;
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated No replacement provided. Arbitrary handles may not serve as a bind source.
|
|
54
|
-
* @privateRemarks This implementation will be moved to SharedObjectHandle once this is removed.
|
|
55
|
-
*/
|
|
56
|
-
bind(handle: IFluidHandleInternal): void;
|
|
57
42
|
}
|
|
58
43
|
//# 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,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"fluidHandle.d.ts","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAEN,eAAe,EACf,MAAM,wCAAwC,CAAC;AAEhD;;;;GAIG;AACH,qBAAa,iBAAiB,CAC7B,CAAC,SAAS,WAAW,GAAG,WAAW,CAClC,SAAQ,eAAe,CAAC,CAAC,CAAC;IAsB1B,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;aACxB,IAAI,EAAE,MAAM;aACZ,YAAY,EAAE,mBAAmB;IAvBlD;;OAEG;IACH,SAAgB,YAAY,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED;;;;;;;OAOG;gBAEiB,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACxB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,mBAAmB;IAMlD;;OAEG;IAIU,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAKhC;;OAEG;IACI,WAAW,IAAI,IAAI;CAG1B"}
|
package/dist/fluidHandle.js
CHANGED
|
@@ -18,24 +18,6 @@ class FluidObjectHandle extends internal_1.FluidHandleBase {
|
|
|
18
18
|
get isAttached() {
|
|
19
19
|
return this.routeContext.isAttached;
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Tells whether the object of this handle is visible in the container locally or globally.
|
|
23
|
-
*/
|
|
24
|
-
get visible() {
|
|
25
|
-
/**
|
|
26
|
-
* If the object of this handle is attached, it is visible in the container. Ideally, checking local visibility
|
|
27
|
-
* should be enough for a handle. However, there are scenarios where the object becomes locally visible but the
|
|
28
|
-
* handle does not know this - This will happen is attachGraph is never called on the handle. Couple of examples
|
|
29
|
-
* where this can happen:
|
|
30
|
-
*
|
|
31
|
-
* 1. Handles to DDS other than the default handle won't know if the DDS becomes visible after the handle was
|
|
32
|
-
* created.
|
|
33
|
-
*
|
|
34
|
-
* 2. Handles to root data stores will never know that it was visible because the handle will not be stores in
|
|
35
|
-
* another DDS and so, attachGraph will never be called on it.
|
|
36
|
-
*/
|
|
37
|
-
return this.isAttached || this.locallyVisible;
|
|
38
|
-
}
|
|
39
21
|
/**
|
|
40
22
|
* Creates a new `FluidObjectHandle`.
|
|
41
23
|
*
|
|
@@ -49,11 +31,6 @@ class FluidObjectHandle extends internal_1.FluidHandleBase {
|
|
|
49
31
|
this.value = value;
|
|
50
32
|
this.path = path;
|
|
51
33
|
this.routeContext = routeContext;
|
|
52
|
-
this.pendingHandlesToMakeVisible = new Set();
|
|
53
|
-
/**
|
|
54
|
-
* Tracks whether this handle is locally visible in the container.
|
|
55
|
-
*/
|
|
56
|
-
this.locallyVisible = false;
|
|
57
34
|
this.absolutePath = (0, internal_1.generateHandleContextPath)(path, this.routeContext);
|
|
58
35
|
}
|
|
59
36
|
/**
|
|
@@ -70,31 +47,8 @@ class FluidObjectHandle extends internal_1.FluidHandleBase {
|
|
|
70
47
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.attachGraph }
|
|
71
48
|
*/
|
|
72
49
|
attachGraph() {
|
|
73
|
-
// start legacy bind/attach flow
|
|
74
|
-
if (this.visible) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
this.locallyVisible = true;
|
|
78
|
-
for (const handle of this.pendingHandlesToMakeVisible) {
|
|
79
|
-
handle.attachGraph();
|
|
80
|
-
}
|
|
81
|
-
this.pendingHandlesToMakeVisible.clear();
|
|
82
|
-
// end legacy bind/attach flow
|
|
83
50
|
this.routeContext.attachGraph();
|
|
84
51
|
}
|
|
85
|
-
// eslint-disable-next-line jsdoc/require-description
|
|
86
|
-
/**
|
|
87
|
-
* @deprecated No replacement provided. Arbitrary handles may not serve as a bind source.
|
|
88
|
-
* @privateRemarks This implementation will be moved to SharedObjectHandle once this is removed.
|
|
89
|
-
*/
|
|
90
|
-
bind(handle) {
|
|
91
|
-
// If this handle is visible, attach the graph of the incoming handle as well.
|
|
92
|
-
if (this.visible) {
|
|
93
|
-
handle.attachGraph();
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
this.pendingHandlesToMakeVisible.add(handle);
|
|
97
|
-
}
|
|
98
52
|
}
|
|
99
53
|
exports.FluidObjectHandle = FluidObjectHandle;
|
|
100
54
|
//# sourceMappingURL=fluidHandle.js.map
|
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,qEAGgD;AAEhD;;;;GAIG;AACH,MAAa,iBAEX,SAAQ,0BAAkB;IAM3B;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;IACrC,CAAC;IAED;;;;;;;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;QAGjD,IAAI,CAAC,YAAY,GAAG,IAAA,oCAAyB,EAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,uDAAuD;IACvD,8FAA8F;IAC9F,8DAA8D;IACvD,KAAK,CAAC,GAAG;QACf,yGAAyG;QACzG,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,WAAW;QACjB,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACjC,CAAC;CACD;AAjDD,8CAiDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { IFluidHandleContext } from \"@fluidframework/core-interfaces/internal\";\nimport {\n\tgenerateHandleContextPath,\n\tFluidHandleBase,\n} from \"@fluidframework/runtime-utils/internal\";\n\n/**\n * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.\n * @legacy\n * @alpha\n */\nexport class FluidObjectHandle<\n\tT extends FluidObject = FluidObject,\n> extends FluidHandleBase<T> {\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 * 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\t// TODO: Return `Promise<T>` instead of `Promise<any>`.\n\t// This was clearly the intended typing of this API, but fixing it would be a breaking change.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\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\tthis.routeContext.attachGraph();\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.50.0
|
|
8
|
+
export declare const pkgVersion = "2.50.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,8BAA8B,CAAC;AACnD,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,8BAA8B,CAAC;AACnD,eAAO,MAAM,UAAU,WAAW,CAAC"}
|
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.50.0
|
|
11
|
+
exports.pkgVersion = "2.50.0";
|
|
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,
|
|
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,QAAQ,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.50.0\";\n"]}
|
package/lib/fluidHandle.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { FluidObject } from "@fluidframework/core-interfaces";
|
|
6
|
-
import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
|
|
7
6
|
import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
|
|
8
7
|
import { FluidHandleBase } from "@fluidframework/runtime-utils/internal";
|
|
9
8
|
/**
|
|
@@ -15,7 +14,6 @@ export declare class FluidObjectHandle<T extends FluidObject = FluidObject> exte
|
|
|
15
14
|
protected readonly value: T | Promise<T>;
|
|
16
15
|
readonly path: string;
|
|
17
16
|
readonly routeContext: IFluidHandleContext;
|
|
18
|
-
private readonly pendingHandlesToMakeVisible;
|
|
19
17
|
/**
|
|
20
18
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.absolutePath}
|
|
21
19
|
*/
|
|
@@ -24,14 +22,6 @@ export declare class FluidObjectHandle<T extends FluidObject = FluidObject> exte
|
|
|
24
22
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.isAttached}
|
|
25
23
|
*/
|
|
26
24
|
get isAttached(): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Tells whether the object of this handle is visible in the container locally or globally.
|
|
29
|
-
*/
|
|
30
|
-
private get visible();
|
|
31
|
-
/**
|
|
32
|
-
* Tracks whether this handle is locally visible in the container.
|
|
33
|
-
*/
|
|
34
|
-
private locallyVisible;
|
|
35
25
|
/**
|
|
36
26
|
* Creates a new `FluidObjectHandle`.
|
|
37
27
|
*
|
|
@@ -49,10 +39,5 @@ export declare class FluidObjectHandle<T extends FluidObject = FluidObject> exte
|
|
|
49
39
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.attachGraph }
|
|
50
40
|
*/
|
|
51
41
|
attachGraph(): void;
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated No replacement provided. Arbitrary handles may not serve as a bind source.
|
|
54
|
-
* @privateRemarks This implementation will be moved to SharedObjectHandle once this is removed.
|
|
55
|
-
*/
|
|
56
|
-
bind(handle: IFluidHandleInternal): void;
|
|
57
42
|
}
|
|
58
43
|
//# sourceMappingURL=fluidHandle.d.ts.map
|
package/lib/fluidHandle.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidHandle.d.ts","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"fluidHandle.d.ts","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAEN,eAAe,EACf,MAAM,wCAAwC,CAAC;AAEhD;;;;GAIG;AACH,qBAAa,iBAAiB,CAC7B,CAAC,SAAS,WAAW,GAAG,WAAW,CAClC,SAAQ,eAAe,CAAC,CAAC,CAAC;IAsB1B,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;aACxB,IAAI,EAAE,MAAM;aACZ,YAAY,EAAE,mBAAmB;IAvBlD;;OAEG;IACH,SAAgB,YAAY,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED;;;;;;;OAOG;gBAEiB,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACxB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,mBAAmB;IAMlD;;OAEG;IAIU,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAKhC;;OAEG;IACI,WAAW,IAAI,IAAI;CAG1B"}
|
package/lib/fluidHandle.js
CHANGED
|
@@ -15,24 +15,6 @@ export class FluidObjectHandle extends FluidHandleBase {
|
|
|
15
15
|
get isAttached() {
|
|
16
16
|
return this.routeContext.isAttached;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Tells whether the object of this handle is visible in the container locally or globally.
|
|
20
|
-
*/
|
|
21
|
-
get visible() {
|
|
22
|
-
/**
|
|
23
|
-
* If the object of this handle is attached, it is visible in the container. Ideally, checking local visibility
|
|
24
|
-
* should be enough for a handle. However, there are scenarios where the object becomes locally visible but the
|
|
25
|
-
* handle does not know this - This will happen is attachGraph is never called on the handle. Couple of examples
|
|
26
|
-
* where this can happen:
|
|
27
|
-
*
|
|
28
|
-
* 1. Handles to DDS other than the default handle won't know if the DDS becomes visible after the handle was
|
|
29
|
-
* created.
|
|
30
|
-
*
|
|
31
|
-
* 2. Handles to root data stores will never know that it was visible because the handle will not be stores in
|
|
32
|
-
* another DDS and so, attachGraph will never be called on it.
|
|
33
|
-
*/
|
|
34
|
-
return this.isAttached || this.locallyVisible;
|
|
35
|
-
}
|
|
36
18
|
/**
|
|
37
19
|
* Creates a new `FluidObjectHandle`.
|
|
38
20
|
*
|
|
@@ -46,11 +28,6 @@ export class FluidObjectHandle extends FluidHandleBase {
|
|
|
46
28
|
this.value = value;
|
|
47
29
|
this.path = path;
|
|
48
30
|
this.routeContext = routeContext;
|
|
49
|
-
this.pendingHandlesToMakeVisible = new Set();
|
|
50
|
-
/**
|
|
51
|
-
* Tracks whether this handle is locally visible in the container.
|
|
52
|
-
*/
|
|
53
|
-
this.locallyVisible = false;
|
|
54
31
|
this.absolutePath = generateHandleContextPath(path, this.routeContext);
|
|
55
32
|
}
|
|
56
33
|
/**
|
|
@@ -67,30 +44,7 @@ export class FluidObjectHandle extends FluidHandleBase {
|
|
|
67
44
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.attachGraph }
|
|
68
45
|
*/
|
|
69
46
|
attachGraph() {
|
|
70
|
-
// start legacy bind/attach flow
|
|
71
|
-
if (this.visible) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
this.locallyVisible = true;
|
|
75
|
-
for (const handle of this.pendingHandlesToMakeVisible) {
|
|
76
|
-
handle.attachGraph();
|
|
77
|
-
}
|
|
78
|
-
this.pendingHandlesToMakeVisible.clear();
|
|
79
|
-
// end legacy bind/attach flow
|
|
80
47
|
this.routeContext.attachGraph();
|
|
81
48
|
}
|
|
82
|
-
// eslint-disable-next-line jsdoc/require-description
|
|
83
|
-
/**
|
|
84
|
-
* @deprecated No replacement provided. Arbitrary handles may not serve as a bind source.
|
|
85
|
-
* @privateRemarks This implementation will be moved to SharedObjectHandle once this is removed.
|
|
86
|
-
*/
|
|
87
|
-
bind(handle) {
|
|
88
|
-
// If this handle is visible, attach the graph of the incoming handle as well.
|
|
89
|
-
if (this.visible) {
|
|
90
|
-
handle.attachGraph();
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
this.pendingHandlesToMakeVisible.add(handle);
|
|
94
|
-
}
|
|
95
49
|
}
|
|
96
50
|
//# sourceMappingURL=fluidHandle.js.map
|
package/lib/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,OAAO,EACN,yBAAyB,EACzB,eAAe,GACf,MAAM,wCAAwC,CAAC;AAEhD;;;;GAIG;AACH,MAAM,OAAO,iBAEX,SAAQ,eAAkB;IAM3B;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;IACrC,CAAC;IAED;;;;;;;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;QAGjD,IAAI,CAAC,YAAY,GAAG,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,uDAAuD;IACvD,8FAA8F;IAC9F,8DAA8D;IACvD,KAAK,CAAC,GAAG;QACf,yGAAyG;QACzG,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,WAAW;QACjB,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACjC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { IFluidHandleContext } from \"@fluidframework/core-interfaces/internal\";\nimport {\n\tgenerateHandleContextPath,\n\tFluidHandleBase,\n} from \"@fluidframework/runtime-utils/internal\";\n\n/**\n * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.\n * @legacy\n * @alpha\n */\nexport class FluidObjectHandle<\n\tT extends FluidObject = FluidObject,\n> extends FluidHandleBase<T> {\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 * 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\t// TODO: Return `Promise<T>` instead of `Promise<any>`.\n\t// This was clearly the intended typing of this API, but fixing it would be a breaking change.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\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\tthis.routeContext.attachGraph();\n\t}\n}\n"]}
|
package/lib/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.50.0
|
|
8
|
+
export declare const pkgVersion = "2.50.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,8BAA8B,CAAC;AACnD,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,8BAA8B,CAAC;AACnD,eAAO,MAAM,UAAU,WAAW,CAAC"}
|
package/lib/packageVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,2BAA2B,CAAC;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,2BAA2B,CAAC;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,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.50.0\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/datastore",
|
|
3
|
-
"version": "2.50.0
|
|
3
|
+
"version": "2.50.0",
|
|
4
4
|
"description": "Fluid data store implementation",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -69,29 +69,29 @@
|
|
|
69
69
|
"temp-directory": "nyc/.nyc_output"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@fluid-internal/client-utils": "2.50.0
|
|
73
|
-
"@fluidframework/container-definitions": "2.50.0
|
|
74
|
-
"@fluidframework/core-interfaces": "2.50.0
|
|
75
|
-
"@fluidframework/core-utils": "2.50.0
|
|
76
|
-
"@fluidframework/datastore-definitions": "2.50.0
|
|
77
|
-
"@fluidframework/driver-definitions": "2.50.0
|
|
78
|
-
"@fluidframework/driver-utils": "2.50.0
|
|
79
|
-
"@fluidframework/id-compressor": "2.50.0
|
|
80
|
-
"@fluidframework/runtime-definitions": "2.50.0
|
|
81
|
-
"@fluidframework/runtime-utils": "2.50.0
|
|
82
|
-
"@fluidframework/telemetry-utils": "2.50.0
|
|
72
|
+
"@fluid-internal/client-utils": "~2.50.0",
|
|
73
|
+
"@fluidframework/container-definitions": "~2.50.0",
|
|
74
|
+
"@fluidframework/core-interfaces": "~2.50.0",
|
|
75
|
+
"@fluidframework/core-utils": "~2.50.0",
|
|
76
|
+
"@fluidframework/datastore-definitions": "~2.50.0",
|
|
77
|
+
"@fluidframework/driver-definitions": "~2.50.0",
|
|
78
|
+
"@fluidframework/driver-utils": "~2.50.0",
|
|
79
|
+
"@fluidframework/id-compressor": "~2.50.0",
|
|
80
|
+
"@fluidframework/runtime-definitions": "~2.50.0",
|
|
81
|
+
"@fluidframework/runtime-utils": "~2.50.0",
|
|
82
|
+
"@fluidframework/telemetry-utils": "~2.50.0",
|
|
83
83
|
"uuid": "^9.0.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
87
87
|
"@biomejs/biome": "~1.9.3",
|
|
88
|
-
"@fluid-internal/mocha-test-setup": "2.50.0
|
|
88
|
+
"@fluid-internal/mocha-test-setup": "~2.50.0",
|
|
89
89
|
"@fluid-tools/build-cli": "^0.56.0",
|
|
90
90
|
"@fluidframework/build-common": "^2.0.3",
|
|
91
91
|
"@fluidframework/build-tools": "^0.56.0",
|
|
92
92
|
"@fluidframework/datastore-previous": "npm:@fluidframework/datastore@2.43.0",
|
|
93
93
|
"@fluidframework/eslint-config-fluid": "^5.7.4",
|
|
94
|
-
"@fluidframework/test-runtime-utils": "2.50.0
|
|
94
|
+
"@fluidframework/test-runtime-utils": "~2.50.0",
|
|
95
95
|
"@microsoft/api-extractor": "7.52.8",
|
|
96
96
|
"@types/lodash": "^4.14.118",
|
|
97
97
|
"@types/mocha": "^10.0.10",
|
|
@@ -110,7 +110,20 @@
|
|
|
110
110
|
"typescript": "~5.4.5"
|
|
111
111
|
},
|
|
112
112
|
"typeValidation": {
|
|
113
|
-
"broken": {
|
|
113
|
+
"broken": {
|
|
114
|
+
"Class_FluidDataStoreRuntime": {
|
|
115
|
+
"backCompat": false
|
|
116
|
+
},
|
|
117
|
+
"Class_FluidObjectHandle": {
|
|
118
|
+
"backCompat": false
|
|
119
|
+
},
|
|
120
|
+
"ClassStatics_FluidDataStoreRuntime": {
|
|
121
|
+
"backCompat": false
|
|
122
|
+
},
|
|
123
|
+
"ClassStatics_FluidObjectHandle": {
|
|
124
|
+
"backCompat": false
|
|
125
|
+
}
|
|
126
|
+
},
|
|
114
127
|
"entrypoint": "legacy"
|
|
115
128
|
},
|
|
116
129
|
"scripts": {
|
package/src/fluidHandle.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { FluidObject } from "@fluidframework/core-interfaces";
|
|
7
|
-
import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
|
|
8
7
|
import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
|
|
9
8
|
import {
|
|
10
9
|
generateHandleContextPath,
|
|
@@ -19,8 +18,6 @@ import {
|
|
|
19
18
|
export class FluidObjectHandle<
|
|
20
19
|
T extends FluidObject = FluidObject,
|
|
21
20
|
> extends FluidHandleBase<T> {
|
|
22
|
-
private readonly pendingHandlesToMakeVisible: Set<IFluidHandleInternal> = new Set();
|
|
23
|
-
|
|
24
21
|
/**
|
|
25
22
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.absolutePath}
|
|
26
23
|
*/
|
|
@@ -33,30 +30,6 @@ export class FluidObjectHandle<
|
|
|
33
30
|
return this.routeContext.isAttached;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
/**
|
|
37
|
-
* Tells whether the object of this handle is visible in the container locally or globally.
|
|
38
|
-
*/
|
|
39
|
-
private get visible(): boolean {
|
|
40
|
-
/**
|
|
41
|
-
* If the object of this handle is attached, it is visible in the container. Ideally, checking local visibility
|
|
42
|
-
* should be enough for a handle. However, there are scenarios where the object becomes locally visible but the
|
|
43
|
-
* handle does not know this - This will happen is attachGraph is never called on the handle. Couple of examples
|
|
44
|
-
* where this can happen:
|
|
45
|
-
*
|
|
46
|
-
* 1. Handles to DDS other than the default handle won't know if the DDS becomes visible after the handle was
|
|
47
|
-
* created.
|
|
48
|
-
*
|
|
49
|
-
* 2. Handles to root data stores will never know that it was visible because the handle will not be stores in
|
|
50
|
-
* another DDS and so, attachGraph will never be called on it.
|
|
51
|
-
*/
|
|
52
|
-
return this.isAttached || this.locallyVisible;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Tracks whether this handle is locally visible in the container.
|
|
57
|
-
*/
|
|
58
|
-
private locallyVisible: boolean = false;
|
|
59
|
-
|
|
60
33
|
/**
|
|
61
34
|
* Creates a new `FluidObjectHandle`.
|
|
62
35
|
*
|
|
@@ -89,32 +62,6 @@ export class FluidObjectHandle<
|
|
|
89
62
|
* {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.attachGraph }
|
|
90
63
|
*/
|
|
91
64
|
public attachGraph(): void {
|
|
92
|
-
// start legacy bind/attach flow
|
|
93
|
-
if (this.visible) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
this.locallyVisible = true;
|
|
98
|
-
for (const handle of this.pendingHandlesToMakeVisible) {
|
|
99
|
-
handle.attachGraph();
|
|
100
|
-
}
|
|
101
|
-
this.pendingHandlesToMakeVisible.clear();
|
|
102
|
-
// end legacy bind/attach flow
|
|
103
|
-
|
|
104
65
|
this.routeContext.attachGraph();
|
|
105
66
|
}
|
|
106
|
-
|
|
107
|
-
// eslint-disable-next-line jsdoc/require-description
|
|
108
|
-
/**
|
|
109
|
-
* @deprecated No replacement provided. Arbitrary handles may not serve as a bind source.
|
|
110
|
-
* @privateRemarks This implementation will be moved to SharedObjectHandle once this is removed.
|
|
111
|
-
*/
|
|
112
|
-
public bind(handle: IFluidHandleInternal): void {
|
|
113
|
-
// If this handle is visible, attach the graph of the incoming handle as well.
|
|
114
|
-
if (this.visible) {
|
|
115
|
-
handle.attachGraph();
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
this.pendingHandlesToMakeVisible.add(handle);
|
|
119
|
-
}
|
|
120
67
|
}
|
package/src/packageVersion.ts
CHANGED