fluid-framework 3.3.0 → 3.4.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 +50 -0
- package/api-report/fluid-framework.alpha.api.md +34 -0
- package/dist/alpha.d.ts +1 -0
- package/lib/alpha.d.ts +1 -0
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# fluid-framework
|
|
2
2
|
|
|
3
|
+
## 3.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add experimental SharedTree sandboxing APIs ([#28382](https://github.com/microsoft/FluidFramework/pull/28382)) [e41dc04d41](https://github.com/microsoft/FluidFramework/commit/e41dc04d41d1cb21ccd48a2a1b44d817f1a33c0c)
|
|
8
|
+
|
|
9
|
+
The new alpha `Sandboxing.createHost` and `Sandboxing.createGuest` APIs synchronize a SharedTree [`ViewableTree`](https://fluidframework.com/docs/api/fluid-framework/viewabletree-interface) across a `MessagePort`.
|
|
10
|
+
The Host remains connected to Fluid services while the Guest exposes a normal schema-aware tree view on the other side of the message channel.
|
|
11
|
+
|
|
12
|
+
> [!IMPORTANT]
|
|
13
|
+
> To use Sandboxing, you must set the container runtime's [`oldestSupportedClient`](https://fluidframework.com/docs/api/container-runtime/loadcontainerruntimeparams-interface#oldestsupportedclient-propertysignature) option to `"3.4.0"` or later.
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { asBeta } from "@fluidframework/tree/beta";
|
|
17
|
+
import { FormatValidatorBasic, Sandboxing } from "@fluidframework/tree/alpha";
|
|
18
|
+
|
|
19
|
+
// Create the application-owned view that remains connected to Fluid services.
|
|
20
|
+
const hostView = asBeta(tree.viewWith(config));
|
|
21
|
+
|
|
22
|
+
// Create the message channel that crosses the sandbox boundary.
|
|
23
|
+
const channel = new MessageChannel();
|
|
24
|
+
|
|
25
|
+
// Connect the Host endpoint to the collaborative tree.
|
|
26
|
+
const host = Sandboxing.createHost({ main: hostView, port: channel.port1 });
|
|
27
|
+
|
|
28
|
+
// Create the independent Guest tree on the other side of the channel.
|
|
29
|
+
const guest = await Sandboxing.createGuest({
|
|
30
|
+
port: channel.port2,
|
|
31
|
+
treeOptions: { jsonValidator: FormatValidatorBasic },
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Open a schema-aware view for application code running in the sandbox.
|
|
35
|
+
const guestView = guest.tree.viewWith(config);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- Add an alpha incremental-summary field property ([#28285](https://github.com/microsoft/FluidFramework/pull/28285)) [5d1392bb81](https://github.com/microsoft/FluidFramework/commit/5d1392bb8170cb3dbdc6745b8e01227a20a4d75f)
|
|
39
|
+
|
|
40
|
+
The new alpha `summarizeIncrementally` property on [`FieldPropsAlpha`](https://fluidframework.com/docs/api/tree/fieldpropsalpha-interface) marks a field as an incremental-summary boundary without requiring direct use of allowed-types metadata or the [`incrementalSummaryHint`](https://fluidframework.com/docs/api/tree/#incrementalsummaryhint-variable) symbol.
|
|
41
|
+
This property is the preferred way to configure incremental summarization.
|
|
42
|
+
[`SchemaFactoryAlpha.requiredRecursive`](https://fluidframework.com/docs/api/tree/schemafactoryalpha-class#requiredrecursive-property) and [`optionalRecursive`](https://fluidframework.com/docs/api/tree/schemafactoryalpha-class#optionalrecursive-property) provide the same field configuration for recursive allowed types with relaxed compile-time constraints.
|
|
43
|
+
The [`SchemaFactoryAlpha.stagedOptional`](https://fluidframework.com/docs/api/tree/schemafactoryalpha-class#stagedoptional-property) and [`stagedOptionalRecursive`](https://fluidframework.com/docs/api/tree/schemafactoryalpha-class#stagedoptionalrecursive-property) field constructors also accept this option.
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
const sf = new SchemaFactoryAlpha("example");
|
|
47
|
+
|
|
48
|
+
class Document extends sf.objectAlpha("Document", {
|
|
49
|
+
sections: sf.required(sf.map(Section), { summarizeIncrementally: true }),
|
|
50
|
+
}) {}
|
|
51
|
+
```
|
|
52
|
+
|
|
3
53
|
## 3.3.0
|
|
4
54
|
|
|
5
55
|
### Minor Changes
|
|
@@ -512,6 +512,7 @@ export interface FieldProps<TCustomMetadata = unknown> {
|
|
|
512
512
|
export interface FieldPropsAlpha<TCustomMetadata = unknown> extends FieldProps<TCustomMetadata> {
|
|
513
513
|
readonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;
|
|
514
514
|
readonly stagedOptionalUpgrade?: SchemaUpgrade;
|
|
515
|
+
readonly summarizeIncrementally?: boolean;
|
|
515
516
|
}
|
|
516
517
|
|
|
517
518
|
// @public @sealed
|
|
@@ -1802,6 +1803,39 @@ export interface RunTransactionParamsBeta {
|
|
|
1802
1803
|
readonly label?: unknown;
|
|
1803
1804
|
}
|
|
1804
1805
|
|
|
1806
|
+
// @alpha
|
|
1807
|
+
export namespace Sandboxing {
|
|
1808
|
+
export function createGuest(options: GuestOptions): Promise<Guest>;
|
|
1809
|
+
export function createHost(options: HostOptions): Host;
|
|
1810
|
+
// @input
|
|
1811
|
+
export interface EndpointOptions {
|
|
1812
|
+
readonly handleProtocolError?: (error: Error) => void;
|
|
1813
|
+
readonly logger?: ITelemetryBaseLogger;
|
|
1814
|
+
readonly port: InstanceType<typeof MessagePort>;
|
|
1815
|
+
}
|
|
1816
|
+
// @sealed
|
|
1817
|
+
export interface Guest {
|
|
1818
|
+
dispose(): void;
|
|
1819
|
+
readonly error: Error | undefined;
|
|
1820
|
+
readonly tree: ViewableTree;
|
|
1821
|
+
readonly updateHostPromise: Promise<void> | undefined;
|
|
1822
|
+
}
|
|
1823
|
+
// @input
|
|
1824
|
+
export interface GuestOptions extends EndpointOptions {
|
|
1825
|
+
readonly treeOptions: ForestOptions & ICodecOptions;
|
|
1826
|
+
}
|
|
1827
|
+
// @sealed
|
|
1828
|
+
export interface Host {
|
|
1829
|
+
dispose(): void;
|
|
1830
|
+
readonly error: Error | undefined;
|
|
1831
|
+
readonly updateGuestPromise: Promise<void> | undefined;
|
|
1832
|
+
}
|
|
1833
|
+
// @input
|
|
1834
|
+
export interface HostOptions extends EndpointOptions {
|
|
1835
|
+
readonly main: UntypedTreeView;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1805
1839
|
// @public @sealed
|
|
1806
1840
|
export interface SchemaCompatibilityStatus {
|
|
1807
1841
|
readonly canInitialize: boolean;
|
package/dist/alpha.d.ts
CHANGED
package/lib/alpha.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluid-framework",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "The main entry point into Fluid Framework public packages",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@fluidframework/container-definitions": "~3.
|
|
47
|
-
"@fluidframework/container-loader": "~3.
|
|
48
|
-
"@fluidframework/core-interfaces": "~3.
|
|
49
|
-
"@fluidframework/core-utils": "~3.
|
|
50
|
-
"@fluidframework/driver-definitions": "~3.
|
|
51
|
-
"@fluidframework/fluid-static": "~3.
|
|
52
|
-
"@fluidframework/map": "~3.
|
|
53
|
-
"@fluidframework/runtime-utils": "~3.
|
|
54
|
-
"@fluidframework/sequence": "~3.
|
|
55
|
-
"@fluidframework/shared-object-base": "~3.
|
|
56
|
-
"@fluidframework/tree": "~3.
|
|
46
|
+
"@fluidframework/container-definitions": "~3.4.0",
|
|
47
|
+
"@fluidframework/container-loader": "~3.4.0",
|
|
48
|
+
"@fluidframework/core-interfaces": "~3.4.0",
|
|
49
|
+
"@fluidframework/core-utils": "~3.4.0",
|
|
50
|
+
"@fluidframework/driver-definitions": "~3.4.0",
|
|
51
|
+
"@fluidframework/fluid-static": "~3.4.0",
|
|
52
|
+
"@fluidframework/map": "~3.4.0",
|
|
53
|
+
"@fluidframework/runtime-utils": "~3.4.0",
|
|
54
|
+
"@fluidframework/sequence": "~3.4.0",
|
|
55
|
+
"@fluidframework/shared-object-base": "~3.4.0",
|
|
56
|
+
"@fluidframework/tree": "~3.4.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"concurrently": "^10.0.3",
|
|
68
68
|
"copyfiles": "^2.4.1",
|
|
69
69
|
"eslint": "~9.39.1",
|
|
70
|
-
"fluid-framework-previous": "npm:fluid-framework@3.
|
|
70
|
+
"fluid-framework-previous": "npm:fluid-framework@3.3.0",
|
|
71
71
|
"jiti": "^2.6.1",
|
|
72
72
|
"rimraf": "^6.1.3",
|
|
73
73
|
"typescript": "~6.0.3"
|