@fluidframework/shared-summary-block 2.0.0-rc.4.0.6 → 2.0.0-rc.5.0.1
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-extractor/api-extractor-lint-bundle.json +5 -0
- package/api-extractor/api-extractor-lint-legacy.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-legacy.esm.json +5 -0
- package/api-extractor/api-extractor-lint-public.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-public.esm.json +5 -0
- package/api-extractor.json +1 -1
- package/api-report/shared-summary-block.alpha.api.md +26 -0
- package/api-report/shared-summary-block.beta.api.md +14 -0
- package/api-report/shared-summary-block.public.api.md +14 -0
- package/biome.jsonc +4 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +1 -1
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.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/dist/sharedSummaryBlock.d.ts +5 -21
- package/dist/sharedSummaryBlock.d.ts.map +1 -1
- package/dist/sharedSummaryBlock.js +3 -22
- package/dist/sharedSummaryBlock.js.map +1 -1
- package/dist/sharedSummaryBlockFactory.d.ts +15 -8
- package/dist/sharedSummaryBlockFactory.d.ts.map +1 -1
- package/dist/sharedSummaryBlockFactory.js +9 -6
- package/dist/sharedSummaryBlockFactory.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/interfaces.d.ts +1 -1
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.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/sharedSummaryBlock.d.ts +5 -21
- package/lib/sharedSummaryBlock.d.ts.map +1 -1
- package/lib/sharedSummaryBlock.js +2 -21
- package/lib/sharedSummaryBlock.js.map +1 -1
- package/lib/sharedSummaryBlockFactory.d.ts +15 -8
- package/lib/sharedSummaryBlockFactory.d.ts.map +1 -1
- package/lib/sharedSummaryBlockFactory.js +9 -6
- package/lib/sharedSummaryBlockFactory.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +32 -22
- package/src/index.ts +1 -2
- package/src/interfaces.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/sharedSummaryBlock.ts +11 -30
- package/src/sharedSummaryBlockFactory.ts +22 -12
- package/tsconfig.json +1 -0
- package/tsdoc.json +4 -0
- package/api-report/shared-summary-block.api.md +0 -52
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @fluidframework/shared-summary-block
|
|
2
2
|
|
|
3
|
+
## 2.0.0-rc.5.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Update to TypeScript 5.4 ([#21214](https://github.com/microsoft/FluidFramework/pull/21214)) [0e6256c722](https://github.com/microsoft/FluidFramework/commit/0e6256c722d8bf024f4325bf02547daeeb18bfa6)
|
|
8
|
+
|
|
9
|
+
Update package implementations to use TypeScript 5.4.5.
|
|
10
|
+
|
|
3
11
|
## 2.0.0-rc.4.0.0
|
|
4
12
|
|
|
5
13
|
Dependency updates only.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/dist/legacy.d.ts"
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/lib/legacy.d.ts"
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/dist/public.d.ts"
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/lib/public.d.ts"
|
|
5
|
+
}
|
package/api-extractor.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "../../../common/build/build-common/api-extractor-base.esm.
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.esm.current.json"
|
|
4
4
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## Alpha API Report File for "@fluidframework/shared-summary-block"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { ISharedObject } from '@fluidframework/shared-object-base/internal';
|
|
8
|
+
import { ISharedObjectKind } from '@fluidframework/shared-object-base/internal';
|
|
9
|
+
import { Jsonable } from '@fluidframework/datastore-definitions/internal';
|
|
10
|
+
import { SharedObjectKind } from '@fluidframework/shared-object-base/internal';
|
|
11
|
+
|
|
12
|
+
// @alpha
|
|
13
|
+
export interface ISharedSummaryBlock extends ISharedObject {
|
|
14
|
+
get<T>(key: string): Jsonable<T>;
|
|
15
|
+
set<T>(key: string, value: Jsonable<T>): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// @alpha
|
|
19
|
+
export const SharedSummaryBlock: ISharedObjectKind<ISharedSummaryBlock> & SharedObjectKind<ISharedSummaryBlock>;
|
|
20
|
+
|
|
21
|
+
// @alpha
|
|
22
|
+
export type SharedSummaryBlock = ISharedSummaryBlock;
|
|
23
|
+
|
|
24
|
+
// (No @packageDocumentation comment for this package)
|
|
25
|
+
|
|
26
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Beta API Report File for "@fluidframework/shared-summary-block"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { ISharedObject } from '@fluidframework/shared-object-base/internal';
|
|
8
|
+
import { ISharedObjectKind } from '@fluidframework/shared-object-base/internal';
|
|
9
|
+
import { Jsonable } from '@fluidframework/datastore-definitions/internal';
|
|
10
|
+
import { SharedObjectKind } from '@fluidframework/shared-object-base/internal';
|
|
11
|
+
|
|
12
|
+
// (No @packageDocumentation comment for this package)
|
|
13
|
+
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Public API Report File for "@fluidframework/shared-summary-block"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { ISharedObject } from '@fluidframework/shared-object-base/internal';
|
|
8
|
+
import { ISharedObjectKind } from '@fluidframework/shared-object-base/internal';
|
|
9
|
+
import { Jsonable } from '@fluidframework/datastore-definitions/internal';
|
|
10
|
+
import { SharedObjectKind } from '@fluidframework/shared-object-base/internal';
|
|
11
|
+
|
|
12
|
+
// (No @packageDocumentation comment for this package)
|
|
13
|
+
|
|
14
|
+
```
|
package/biome.jsonc
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
export { ISharedSummaryBlock } from "./interfaces.js";
|
|
6
|
-
export { SharedSummaryBlock } from "./
|
|
7
|
-
export { SharedSummaryBlockFactory } from "./sharedSummaryBlockFactory.js";
|
|
6
|
+
export { SharedSummaryBlock } from "./sharedSummaryBlockFactory.js";
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
var sharedSummaryBlock_js_1 = require("./sharedSummaryBlock.js");
|
|
9
|
-
Object.defineProperty(exports, "SharedSummaryBlock", { enumerable: true, get: function () { return sharedSummaryBlock_js_1.SharedSummaryBlock; } });
|
|
7
|
+
exports.SharedSummaryBlock = void 0;
|
|
10
8
|
var sharedSummaryBlockFactory_js_1 = require("./sharedSummaryBlockFactory.js");
|
|
11
|
-
Object.defineProperty(exports, "
|
|
9
|
+
Object.defineProperty(exports, "SharedSummaryBlock", { enumerable: true, get: function () { return sharedSummaryBlockFactory_js_1.SharedSummaryBlock; } });
|
|
12
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+EAAoE;AAA3D,kIAAA,kBAAkB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { ISharedSummaryBlock } from \"./interfaces.js\";\nexport { SharedSummaryBlock } from \"./sharedSummaryBlockFactory.js\";\n"]}
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { Jsonable } from "@fluidframework/datastore-definitions/internal";
|
|
6
|
-
import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
6
|
+
import { ISharedObject } from "@fluidframework/shared-object-base/internal";
|
|
7
7
|
/**
|
|
8
8
|
* Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.
|
|
9
9
|
* The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
|
package/dist/interfaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAE5E;;;;;;GAMG;AACH,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACzD;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEjC;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC9C"}
|
package/dist/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Jsonable } from \"@fluidframework/datastore-definitions/internal\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\n\n/**\n * Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.\n * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,\n * the set of calls on this interface to set data should be the same. This is critical because the object does not\n * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.\n * @alpha\n */\nexport interface ISharedSummaryBlock extends ISharedObject {\n\t/**\n\t * Retrieves the given key from the map.\n\t * @param key - Key to retrieve from.\n\t * @returns The stored value, or undefined if the key is not set.\n\t *\n\t * @privateRemarks\n\t * The return type is underspecified to allow for the possibility of objects with function or undefined values.\n\t */\n\tget<T>(key: string): Jsonable<T>;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at.\n\t * @param value - Jsonable type value to set.\n\t */\n\tset<T>(key: string, value: Jsonable<T>): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Jsonable } from \"@fluidframework/datastore-definitions/internal\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base/internal\";\n\n/**\n * Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.\n * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,\n * the set of calls on this interface to set data should be the same. This is critical because the object does not\n * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.\n * @alpha\n */\nexport interface ISharedSummaryBlock extends ISharedObject {\n\t/**\n\t * Retrieves the given key from the map.\n\t * @param key - Key to retrieve from.\n\t * @returns The stored value, or undefined if the key is not set.\n\t *\n\t * @privateRemarks\n\t * The return type is underspecified to allow for the possibility of objects with function or undefined values.\n\t */\n\tget<T>(key: string): Jsonable<T>;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at.\n\t * @param value - Jsonable type value to set.\n\t */\n\tset<T>(key: string, value: Jsonable<T>): void;\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/shared-summary-block";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-rc.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-rc.5.0.1";
|
|
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/shared-summary-block";
|
|
11
|
-
exports.pkgVersion = "2.0.0-rc.
|
|
11
|
+
exports.pkgVersion = "2.0.0-rc.5.0.1";
|
|
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,sCAAsC,CAAC;AACjD,QAAA,UAAU,GAAG,gBAAgB,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/shared-summary-block\";\nexport const pkgVersion = \"2.0.0-rc.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sCAAsC,CAAC;AACjD,QAAA,UAAU,GAAG,gBAAgB,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/shared-summary-block\";\nexport const pkgVersion = \"2.0.0-rc.5.0.1\";\n"]}
|
|
@@ -2,33 +2,17 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IChannelAttributes,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { IFluidSerializer } from "@fluidframework/shared-object-base";
|
|
10
|
-
import { SharedObject } from "@fluidframework/shared-object-base/internal";
|
|
5
|
+
import { Jsonable, IChannelAttributes, IFluidDataStoreRuntime, IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
6
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
7
|
+
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
|
|
8
|
+
import { IFluidSerializer, SharedObject } from "@fluidframework/shared-object-base/internal";
|
|
11
9
|
import { ISharedSummaryBlock } from "./interfaces.js";
|
|
12
10
|
/**
|
|
13
11
|
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
14
12
|
* Data should be set in this object in response to a remote op.
|
|
15
13
|
* @alpha
|
|
16
14
|
*/
|
|
17
|
-
export declare class
|
|
18
|
-
/**
|
|
19
|
-
* Create a new shared summary block
|
|
20
|
-
*
|
|
21
|
-
* @param runtime - data store runtime the new shared summary block belongs to.
|
|
22
|
-
* @param id - optional name of the shared summary block.
|
|
23
|
-
* @returns newly created shared summary block (but not attached yet).
|
|
24
|
-
*/
|
|
25
|
-
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
|
|
26
|
-
/**
|
|
27
|
-
* Get a factory for SharedSummaryBlock to register with the data store.
|
|
28
|
-
*
|
|
29
|
-
* @returns a factory that creates and loads SharedSummaryBlock.
|
|
30
|
-
*/
|
|
31
|
-
static getFactory(): IChannelFactory;
|
|
15
|
+
export declare class SharedSummaryBlockClass extends SharedObject implements ISharedSummaryBlock {
|
|
32
16
|
/**
|
|
33
17
|
* The data held by this object.
|
|
34
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlock.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlock.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAExF,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EACN,gBAAgB,EAChB,YAAY,EAEZ,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAYtD;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,YAAa,YAAW,mBAAmB;IACvF;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAwC;IAE7D;;;;;;;OAOG;gBACS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,kBAAkB;IAIvF;;OAEG;IACI,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC;IAIvC;;OAEG;IACI,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI;IAMpD;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,UAAU,EAAE,gBAAgB,GAAG,qBAAqB;IAQ5E;;OAEG;cACa,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUxE;;OAEG;IACH,SAAS,CAAC,YAAY;IAEtB;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO;IAIxE,SAAS,CAAC,cAAc;CAGxB"}
|
|
@@ -4,35 +4,16 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.SharedSummaryBlockClass = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/driver-utils/internal");
|
|
9
9
|
const internal_2 = require("@fluidframework/shared-object-base/internal");
|
|
10
|
-
const sharedSummaryBlockFactory_js_1 = require("./sharedSummaryBlockFactory.js");
|
|
11
10
|
const snapshotFileName = "header";
|
|
12
11
|
/**
|
|
13
12
|
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
14
13
|
* Data should be set in this object in response to a remote op.
|
|
15
14
|
* @alpha
|
|
16
15
|
*/
|
|
17
|
-
class
|
|
18
|
-
/**
|
|
19
|
-
* Create a new shared summary block
|
|
20
|
-
*
|
|
21
|
-
* @param runtime - data store runtime the new shared summary block belongs to.
|
|
22
|
-
* @param id - optional name of the shared summary block.
|
|
23
|
-
* @returns newly created shared summary block (but not attached yet).
|
|
24
|
-
*/
|
|
25
|
-
static create(runtime, id) {
|
|
26
|
-
return runtime.createChannel(id, sharedSummaryBlockFactory_js_1.SharedSummaryBlockFactory.Type);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Get a factory for SharedSummaryBlock to register with the data store.
|
|
30
|
-
*
|
|
31
|
-
* @returns a factory that creates and loads SharedSummaryBlock.
|
|
32
|
-
*/
|
|
33
|
-
static getFactory() {
|
|
34
|
-
return new sharedSummaryBlockFactory_js_1.SharedSummaryBlockFactory();
|
|
35
|
-
}
|
|
16
|
+
class SharedSummaryBlockClass extends internal_2.SharedObject {
|
|
36
17
|
/**
|
|
37
18
|
* Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
|
|
38
19
|
* be provided.
|
|
@@ -95,5 +76,5 @@ class SharedSummaryBlock extends internal_2.SharedObject {
|
|
|
95
76
|
throw new Error("not implemented");
|
|
96
77
|
}
|
|
97
78
|
}
|
|
98
|
-
exports.
|
|
79
|
+
exports.SharedSummaryBlockClass = SharedSummaryBlockClass;
|
|
99
80
|
//# sourceMappingURL=sharedSummaryBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlock.js","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,oEAAqE;
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlock.js","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,oEAAqE;AAErE,0EAIqD;AAIrD,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAUlC;;;;GAIG;AACH,MAAa,uBAAwB,SAAQ,uBAAY;IAMxD;;;;;;;OAOG;IACH,YAAY,EAAU,EAAE,OAA+B,EAAE,UAA8B;QACtF,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,2BAA2B,CAAC,CAAC;QAd7D;;WAEG;QACc,SAAI,GAAG,IAAI,GAAG,EAA6B,CAAC;IAY7D,CAAC;IAED;;OAEG;IACI,GAAG,CAAI,GAAW;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,GAAG,CAAI,GAAW,EAAE,KAAkB;QAC5C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC1B,mEAAmE;QACnE,IAAI,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;IAED;;OAEG;IACO,aAAa,CAAC,UAA4B;QACnD,MAAM,YAAY,GAAwC,EAAE,CAAC;QAC7D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YAChC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,OAAO,IAAA,kCAAuB,EAAC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,QAAQ,CAAC,OAA+B;QACvD,MAAM,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAClC,OAAO,EACP,gBAAgB,CAChB,CAAC;QACF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YACrD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3B,CAAC;IACF,CAAC;IAED;;OAEG;IACO,YAAY,KAAI,CAAC;IAE3B;;OAEG;IACO,WAAW,CAAC,OAAkC,EAAE,KAAc;QACvE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACtE,CAAC;IAES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD;AAzED,0DAyEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tJsonable,\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport { readAndParse } from \"@fluidframework/driver-utils/internal\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tIFluidSerializer,\n\tSharedObject,\n\tcreateSingleBlobSummary,\n} from \"@fluidframework/shared-object-base/internal\";\n\nimport { ISharedSummaryBlock } from \"./interfaces.js\";\n\nconst snapshotFileName = \"header\";\n\n/**\n * Defines the in-memory object structure to be used for the conversion to/from serialized.\n * Directly used in JSON.stringify, direct result from JSON.parse.\n */\ninterface ISharedSummaryBlockDataSerializable {\n\t[key: string]: Jsonable<unknown>;\n}\n\n/**\n * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.\n * Data should be set in this object in response to a remote op.\n * @alpha\n */\nexport class SharedSummaryBlockClass extends SharedObject implements ISharedSummaryBlock {\n\t/**\n\t * The data held by this object.\n\t */\n\tprivate readonly data = new Map<string, Jsonable<unknown>>();\n\n\t/**\n\t * Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will\n\t * be provided.\n\t *\n\t * @param id - optional name of the shared summary block.\n\t * @param runtime - data store runtime thee object belongs to.\n\t * @param attributes - The attributes for the object.\n\t */\n\tconstructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes) {\n\t\tsuper(id, runtime, attributes, \"fluid_sharedSummaryBlock_\");\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedSummaryBlock.get}\n\t */\n\tpublic get<T>(key: string): Jsonable<T> {\n\t\treturn this.data.get(key) as Jsonable<T>;\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedSummaryBlock.set}\n\t */\n\tpublic set<T>(key: string, value: Jsonable<T>): void {\n\t\tthis.data.set(key, value);\n\t\t// Set this object as dirty so that it is part of the next summary.\n\t\tthis.dirty();\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}\n\t */\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tconst contentsBlob: ISharedSummaryBlockDataSerializable = {};\n\t\tthis.data.forEach((value, key) => {\n\t\t\tcontentsBlob[key] = value;\n\t\t});\n\t\treturn createSingleBlobSummary(snapshotFileName, JSON.stringify(contentsBlob));\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}\n\t */\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst contents = await readAndParse<ISharedSummaryBlockDataSerializable>(\n\t\t\tstorage,\n\t\t\tsnapshotFileName,\n\t\t);\n\t\tfor (const [key, value] of Object.entries(contents)) {\n\t\t\tthis.data.set(key, value);\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}\n\t */\n\tprotected onDisconnect() {}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}\n\t */\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\tthrow new Error(\"shared summary block should not generate any ops.\");\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
|
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IChannelAttributes, IChannelFactory,
|
|
6
|
-
import {
|
|
5
|
+
import { IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime, IChannelServices } from "@fluidframework/datastore-definitions/internal";
|
|
6
|
+
import type { ISharedSummaryBlock } from "./interfaces.js";
|
|
7
7
|
/**
|
|
8
8
|
* The factory that defines the shared summary block.
|
|
9
|
-
*
|
|
10
|
-
* @sealed
|
|
11
|
-
* @internal
|
|
12
9
|
*/
|
|
13
|
-
export declare class SharedSummaryBlockFactory implements IChannelFactory {
|
|
10
|
+
export declare class SharedSummaryBlockFactory implements IChannelFactory<ISharedSummaryBlock> {
|
|
14
11
|
/**
|
|
15
12
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
16
13
|
*/
|
|
@@ -30,10 +27,20 @@ export declare class SharedSummaryBlockFactory implements IChannelFactory {
|
|
|
30
27
|
/**
|
|
31
28
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
32
29
|
*/
|
|
33
|
-
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<
|
|
30
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedSummaryBlock>;
|
|
34
31
|
/**
|
|
35
32
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
|
|
36
33
|
*/
|
|
37
|
-
create(runtime: IFluidDataStoreRuntime, id: string):
|
|
34
|
+
create(runtime: IFluidDataStoreRuntime, id: string): ISharedSummaryBlock;
|
|
38
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* {@inheritDoc ISharedSummaryBlock}
|
|
38
|
+
* @alpha
|
|
39
|
+
*/
|
|
40
|
+
export declare const SharedSummaryBlock: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedSummaryBlock> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedSummaryBlock>;
|
|
41
|
+
/**
|
|
42
|
+
* {@inheritDoc ISharedSummaryBlock}
|
|
43
|
+
* @alpha
|
|
44
|
+
*/
|
|
45
|
+
export type SharedSummaryBlock = ISharedSummaryBlock;
|
|
39
46
|
//# sourceMappingURL=sharedSummaryBlockFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlockFactory.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlockFactory.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AAGxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAI3D;;GAEG;AACH,qBAAa,yBAA0B,YAAW,eAAe,CAAC,mBAAmB,CAAC;IACrF;;OAEG;IACH,gBAAuB,IAAI,4DAA4D;IAEvF;;OAEG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF;;OAEG;IACH,IAAW,IAAI,WAEd;IAED;;OAEG;IACH,IAAW,UAAU,uBAEpB;IAED;;OAEG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,mBAAmB,CAAC;IAO/B;;OAEG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,mBAAmB;CAU/E;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,4LAAoD,CAAC;AAEpF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC"}
|
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.SharedSummaryBlockFactory = void 0;
|
|
7
|
+
exports.SharedSummaryBlock = exports.SharedSummaryBlockFactory = void 0;
|
|
8
|
+
const internal_1 = require("@fluidframework/shared-object-base/internal");
|
|
8
9
|
const packageVersion_js_1 = require("./packageVersion.js");
|
|
9
10
|
const sharedSummaryBlock_js_1 = require("./sharedSummaryBlock.js");
|
|
10
11
|
/**
|
|
11
12
|
* The factory that defines the shared summary block.
|
|
12
|
-
*
|
|
13
|
-
* @sealed
|
|
14
|
-
* @internal
|
|
15
13
|
*/
|
|
16
14
|
class SharedSummaryBlockFactory {
|
|
17
15
|
/**
|
|
@@ -30,7 +28,7 @@ class SharedSummaryBlockFactory {
|
|
|
30
28
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
31
29
|
*/
|
|
32
30
|
async load(runtime, id, services, attributes) {
|
|
33
|
-
const sharedSummaryBlock = new sharedSummaryBlock_js_1.
|
|
31
|
+
const sharedSummaryBlock = new sharedSummaryBlock_js_1.SharedSummaryBlockClass(id, runtime, attributes);
|
|
34
32
|
await sharedSummaryBlock.load(services);
|
|
35
33
|
return sharedSummaryBlock;
|
|
36
34
|
}
|
|
@@ -38,7 +36,7 @@ class SharedSummaryBlockFactory {
|
|
|
38
36
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
|
|
39
37
|
*/
|
|
40
38
|
create(runtime, id) {
|
|
41
|
-
const sharedSummaryBlock = new sharedSummaryBlock_js_1.
|
|
39
|
+
const sharedSummaryBlock = new sharedSummaryBlock_js_1.SharedSummaryBlockClass(id, runtime, SharedSummaryBlockFactory.Attributes);
|
|
42
40
|
sharedSummaryBlock.initializeLocal();
|
|
43
41
|
return sharedSummaryBlock;
|
|
44
42
|
}
|
|
@@ -56,4 +54,9 @@ SharedSummaryBlockFactory.Attributes = {
|
|
|
56
54
|
snapshotFormatVersion: "0.1",
|
|
57
55
|
packageVersion: packageVersion_js_1.pkgVersion,
|
|
58
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* {@inheritDoc ISharedSummaryBlock}
|
|
59
|
+
* @alpha
|
|
60
|
+
*/
|
|
61
|
+
exports.SharedSummaryBlock = (0, internal_1.createSharedObjectKind)(SharedSummaryBlockFactory);
|
|
59
62
|
//# sourceMappingURL=sharedSummaryBlockFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlockFactory.js","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlockFactory.js","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,0EAAqF;AAGrF,2DAAiD;AACjD,mEAAkE;AAElE;;GAEG;AACH,MAAa,yBAAyB;IAerC;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,yBAAyB,CAAC,IAAI,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,yBAAyB,CAAC,UAAU,CAAC;IAC7C,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,kBAAkB,GAAG,IAAI,+CAAuB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAChF,MAAM,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAExC,OAAO,kBAAkB,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,kBAAkB,GAAG,IAAI,+CAAuB,CACrD,EAAE,EACF,OAAO,EACP,yBAAyB,CAAC,UAAU,CACpC,CAAC;QACF,kBAAkB,CAAC,eAAe,EAAE,CAAC;QAErC,OAAO,kBAAkB,CAAC;IAC3B,CAAC;;AAxDF,8DAyDC;AAxDA;;GAEG;AACoB,8BAAI,GAAG,wDAAwD,CAAC;AAEvF;;GAEG;AACoB,oCAAU,GAAuB;IACvD,IAAI,EAAE,yBAAyB,CAAC,IAAI;IACpC,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,8BAAU;CAC1B,CAAC;AA8CH;;;GAGG;AACU,QAAA,kBAAkB,GAAG,IAAA,iCAAsB,EAAC,yBAAyB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { createSharedObjectKind } from \"@fluidframework/shared-object-base/internal\";\n\nimport type { ISharedSummaryBlock } from \"./interfaces.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\nimport { SharedSummaryBlockClass } from \"./sharedSummaryBlock.js\";\n\n/**\n * The factory that defines the shared summary block.\n */\nexport class SharedSummaryBlockFactory implements IChannelFactory<ISharedSummaryBlock> {\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic static readonly Type = \"https://graph.microsoft.com/types/shared-summary-block\";\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: SharedSummaryBlockFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type() {\n\t\treturn SharedSummaryBlockFactory.Type;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes() {\n\t\treturn SharedSummaryBlockFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<ISharedSummaryBlock> {\n\t\tconst sharedSummaryBlock = new SharedSummaryBlockClass(id, runtime, attributes);\n\t\tawait sharedSummaryBlock.load(services);\n\n\t\treturn sharedSummaryBlock;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): ISharedSummaryBlock {\n\t\tconst sharedSummaryBlock = new SharedSummaryBlockClass(\n\t\t\tid,\n\t\t\truntime,\n\t\t\tSharedSummaryBlockFactory.Attributes,\n\t\t);\n\t\tsharedSummaryBlock.initializeLocal();\n\n\t\treturn sharedSummaryBlock;\n\t}\n}\n\n/**\n * {@inheritDoc ISharedSummaryBlock}\n * @alpha\n */\nexport const SharedSummaryBlock = createSharedObjectKind(SharedSummaryBlockFactory);\n\n/**\n * {@inheritDoc ISharedSummaryBlock}\n * @alpha\n */\nexport type SharedSummaryBlock = ISharedSummaryBlock;\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
export { ISharedSummaryBlock } from "./interfaces.js";
|
|
6
|
-
export { SharedSummaryBlock } from "./
|
|
7
|
-
export { SharedSummaryBlockFactory } from "./sharedSummaryBlockFactory.js";
|
|
6
|
+
export { SharedSummaryBlock } from "./sharedSummaryBlockFactory.js";
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,5 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { SharedSummaryBlock } from "./
|
|
6
|
-
export { SharedSummaryBlockFactory } from "./sharedSummaryBlockFactory.js";
|
|
5
|
+
export { SharedSummaryBlock } from "./sharedSummaryBlockFactory.js";
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { ISharedSummaryBlock } from \"./interfaces.js\";\nexport { SharedSummaryBlock } from \"./sharedSummaryBlockFactory.js\";\n"]}
|
package/lib/interfaces.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { Jsonable } from "@fluidframework/datastore-definitions/internal";
|
|
6
|
-
import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
6
|
+
import { ISharedObject } from "@fluidframework/shared-object-base/internal";
|
|
7
7
|
/**
|
|
8
8
|
* Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.
|
|
9
9
|
* The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
|
package/lib/interfaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAE5E;;;;;;GAMG;AACH,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACzD;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEjC;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC9C"}
|
package/lib/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Jsonable } from \"@fluidframework/datastore-definitions/internal\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\n\n/**\n * Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.\n * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,\n * the set of calls on this interface to set data should be the same. This is critical because the object does not\n * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.\n * @alpha\n */\nexport interface ISharedSummaryBlock extends ISharedObject {\n\t/**\n\t * Retrieves the given key from the map.\n\t * @param key - Key to retrieve from.\n\t * @returns The stored value, or undefined if the key is not set.\n\t *\n\t * @privateRemarks\n\t * The return type is underspecified to allow for the possibility of objects with function or undefined values.\n\t */\n\tget<T>(key: string): Jsonable<T>;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at.\n\t * @param value - Jsonable type value to set.\n\t */\n\tset<T>(key: string, value: Jsonable<T>): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Jsonable } from \"@fluidframework/datastore-definitions/internal\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base/internal\";\n\n/**\n * Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.\n * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,\n * the set of calls on this interface to set data should be the same. This is critical because the object does not\n * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.\n * @alpha\n */\nexport interface ISharedSummaryBlock extends ISharedObject {\n\t/**\n\t * Retrieves the given key from the map.\n\t * @param key - Key to retrieve from.\n\t * @returns The stored value, or undefined if the key is not set.\n\t *\n\t * @privateRemarks\n\t * The return type is underspecified to allow for the possibility of objects with function or undefined values.\n\t */\n\tget<T>(key: string): Jsonable<T>;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at.\n\t * @param value - Jsonable type value to set.\n\t */\n\tset<T>(key: string, value: Jsonable<T>): void;\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/shared-summary-block";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-rc.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-rc.5.0.1";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/lib/packageVersion.js
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export const pkgName = "@fluidframework/shared-summary-block";
|
|
8
|
-
export const pkgVersion = "2.0.0-rc.
|
|
8
|
+
export const pkgVersion = "2.0.0-rc.5.0.1";
|
|
9
9
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,sCAAsC,CAAC;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,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/shared-summary-block\";\nexport const pkgVersion = \"2.0.0-rc.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,sCAAsC,CAAC;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,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/shared-summary-block\";\nexport const pkgVersion = \"2.0.0-rc.5.0.1\";\n"]}
|
|
@@ -2,33 +2,17 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IChannelAttributes,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { IFluidSerializer } from "@fluidframework/shared-object-base";
|
|
10
|
-
import { SharedObject } from "@fluidframework/shared-object-base/internal";
|
|
5
|
+
import { Jsonable, IChannelAttributes, IFluidDataStoreRuntime, IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
6
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
7
|
+
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
|
|
8
|
+
import { IFluidSerializer, SharedObject } from "@fluidframework/shared-object-base/internal";
|
|
11
9
|
import { ISharedSummaryBlock } from "./interfaces.js";
|
|
12
10
|
/**
|
|
13
11
|
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
14
12
|
* Data should be set in this object in response to a remote op.
|
|
15
13
|
* @alpha
|
|
16
14
|
*/
|
|
17
|
-
export declare class
|
|
18
|
-
/**
|
|
19
|
-
* Create a new shared summary block
|
|
20
|
-
*
|
|
21
|
-
* @param runtime - data store runtime the new shared summary block belongs to.
|
|
22
|
-
* @param id - optional name of the shared summary block.
|
|
23
|
-
* @returns newly created shared summary block (but not attached yet).
|
|
24
|
-
*/
|
|
25
|
-
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
|
|
26
|
-
/**
|
|
27
|
-
* Get a factory for SharedSummaryBlock to register with the data store.
|
|
28
|
-
*
|
|
29
|
-
* @returns a factory that creates and loads SharedSummaryBlock.
|
|
30
|
-
*/
|
|
31
|
-
static getFactory(): IChannelFactory;
|
|
15
|
+
export declare class SharedSummaryBlockClass extends SharedObject implements ISharedSummaryBlock {
|
|
32
16
|
/**
|
|
33
17
|
* The data held by this object.
|
|
34
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlock.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlock.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAExF,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EACN,gBAAgB,EAChB,YAAY,EAEZ,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAYtD;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,YAAa,YAAW,mBAAmB;IACvF;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAwC;IAE7D;;;;;;;OAOG;gBACS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,kBAAkB;IAIvF;;OAEG;IACI,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC;IAIvC;;OAEG;IACI,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI;IAMpD;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,UAAU,EAAE,gBAAgB,GAAG,qBAAqB;IAQ5E;;OAEG;cACa,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUxE;;OAEG;IACH,SAAS,CAAC,YAAY;IAEtB;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO;IAIxE,SAAS,CAAC,cAAc;CAGxB"}
|
|
@@ -3,33 +3,14 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { readAndParse } from "@fluidframework/driver-utils/internal";
|
|
6
|
-
import { SharedObject, createSingleBlobSummary } from "@fluidframework/shared-object-base/internal";
|
|
7
|
-
import { SharedSummaryBlockFactory } from "./sharedSummaryBlockFactory.js";
|
|
6
|
+
import { SharedObject, createSingleBlobSummary, } from "@fluidframework/shared-object-base/internal";
|
|
8
7
|
const snapshotFileName = "header";
|
|
9
8
|
/**
|
|
10
9
|
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
11
10
|
* Data should be set in this object in response to a remote op.
|
|
12
11
|
* @alpha
|
|
13
12
|
*/
|
|
14
|
-
export class
|
|
15
|
-
/**
|
|
16
|
-
* Create a new shared summary block
|
|
17
|
-
*
|
|
18
|
-
* @param runtime - data store runtime the new shared summary block belongs to.
|
|
19
|
-
* @param id - optional name of the shared summary block.
|
|
20
|
-
* @returns newly created shared summary block (but not attached yet).
|
|
21
|
-
*/
|
|
22
|
-
static create(runtime, id) {
|
|
23
|
-
return runtime.createChannel(id, SharedSummaryBlockFactory.Type);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Get a factory for SharedSummaryBlock to register with the data store.
|
|
27
|
-
*
|
|
28
|
-
* @returns a factory that creates and loads SharedSummaryBlock.
|
|
29
|
-
*/
|
|
30
|
-
static getFactory() {
|
|
31
|
-
return new SharedSummaryBlockFactory();
|
|
32
|
-
}
|
|
13
|
+
export class SharedSummaryBlockClass extends SharedObject {
|
|
33
14
|
/**
|
|
34
15
|
* Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
|
|
35
16
|
* be provided.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlock.js","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlock.js","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,EAEN,YAAY,EACZ,uBAAuB,GACvB,MAAM,6CAA6C,CAAC;AAIrD,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAUlC;;;;GAIG;AACH,MAAM,OAAO,uBAAwB,SAAQ,YAAY;IAMxD;;;;;;;OAOG;IACH,YAAY,EAAU,EAAE,OAA+B,EAAE,UAA8B;QACtF,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,2BAA2B,CAAC,CAAC;QAd7D;;WAEG;QACc,SAAI,GAAG,IAAI,GAAG,EAA6B,CAAC;IAY7D,CAAC;IAED;;OAEG;IACI,GAAG,CAAI,GAAW;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,GAAG,CAAI,GAAW,EAAE,KAAkB;QAC5C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC1B,mEAAmE;QACnE,IAAI,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;IAED;;OAEG;IACO,aAAa,CAAC,UAA4B;QACnD,MAAM,YAAY,GAAwC,EAAE,CAAC;QAC7D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YAChC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,OAAO,uBAAuB,CAAC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,QAAQ,CAAC,OAA+B;QACvD,MAAM,QAAQ,GAAG,MAAM,YAAY,CAClC,OAAO,EACP,gBAAgB,CAChB,CAAC;QACF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YACrD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3B,CAAC;IACF,CAAC;IAED;;OAEG;IACO,YAAY,KAAI,CAAC;IAE3B;;OAEG;IACO,WAAW,CAAC,OAAkC,EAAE,KAAc;QACvE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACtE,CAAC;IAES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tJsonable,\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport { readAndParse } from \"@fluidframework/driver-utils/internal\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tIFluidSerializer,\n\tSharedObject,\n\tcreateSingleBlobSummary,\n} from \"@fluidframework/shared-object-base/internal\";\n\nimport { ISharedSummaryBlock } from \"./interfaces.js\";\n\nconst snapshotFileName = \"header\";\n\n/**\n * Defines the in-memory object structure to be used for the conversion to/from serialized.\n * Directly used in JSON.stringify, direct result from JSON.parse.\n */\ninterface ISharedSummaryBlockDataSerializable {\n\t[key: string]: Jsonable<unknown>;\n}\n\n/**\n * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.\n * Data should be set in this object in response to a remote op.\n * @alpha\n */\nexport class SharedSummaryBlockClass extends SharedObject implements ISharedSummaryBlock {\n\t/**\n\t * The data held by this object.\n\t */\n\tprivate readonly data = new Map<string, Jsonable<unknown>>();\n\n\t/**\n\t * Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will\n\t * be provided.\n\t *\n\t * @param id - optional name of the shared summary block.\n\t * @param runtime - data store runtime thee object belongs to.\n\t * @param attributes - The attributes for the object.\n\t */\n\tconstructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes) {\n\t\tsuper(id, runtime, attributes, \"fluid_sharedSummaryBlock_\");\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedSummaryBlock.get}\n\t */\n\tpublic get<T>(key: string): Jsonable<T> {\n\t\treturn this.data.get(key) as Jsonable<T>;\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedSummaryBlock.set}\n\t */\n\tpublic set<T>(key: string, value: Jsonable<T>): void {\n\t\tthis.data.set(key, value);\n\t\t// Set this object as dirty so that it is part of the next summary.\n\t\tthis.dirty();\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}\n\t */\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tconst contentsBlob: ISharedSummaryBlockDataSerializable = {};\n\t\tthis.data.forEach((value, key) => {\n\t\t\tcontentsBlob[key] = value;\n\t\t});\n\t\treturn createSingleBlobSummary(snapshotFileName, JSON.stringify(contentsBlob));\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}\n\t */\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst contents = await readAndParse<ISharedSummaryBlockDataSerializable>(\n\t\t\tstorage,\n\t\t\tsnapshotFileName,\n\t\t);\n\t\tfor (const [key, value] of Object.entries(contents)) {\n\t\t\tthis.data.set(key, value);\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}\n\t */\n\tprotected onDisconnect() {}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}\n\t */\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\tthrow new Error(\"shared summary block should not generate any ops.\");\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
|
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IChannelAttributes, IChannelFactory,
|
|
6
|
-
import {
|
|
5
|
+
import { IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime, IChannelServices } from "@fluidframework/datastore-definitions/internal";
|
|
6
|
+
import type { ISharedSummaryBlock } from "./interfaces.js";
|
|
7
7
|
/**
|
|
8
8
|
* The factory that defines the shared summary block.
|
|
9
|
-
*
|
|
10
|
-
* @sealed
|
|
11
|
-
* @internal
|
|
12
9
|
*/
|
|
13
|
-
export declare class SharedSummaryBlockFactory implements IChannelFactory {
|
|
10
|
+
export declare class SharedSummaryBlockFactory implements IChannelFactory<ISharedSummaryBlock> {
|
|
14
11
|
/**
|
|
15
12
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
16
13
|
*/
|
|
@@ -30,10 +27,20 @@ export declare class SharedSummaryBlockFactory implements IChannelFactory {
|
|
|
30
27
|
/**
|
|
31
28
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
32
29
|
*/
|
|
33
|
-
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<
|
|
30
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedSummaryBlock>;
|
|
34
31
|
/**
|
|
35
32
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
|
|
36
33
|
*/
|
|
37
|
-
create(runtime: IFluidDataStoreRuntime, id: string):
|
|
34
|
+
create(runtime: IFluidDataStoreRuntime, id: string): ISharedSummaryBlock;
|
|
38
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* {@inheritDoc ISharedSummaryBlock}
|
|
38
|
+
* @alpha
|
|
39
|
+
*/
|
|
40
|
+
export declare const SharedSummaryBlock: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedSummaryBlock> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedSummaryBlock>;
|
|
41
|
+
/**
|
|
42
|
+
* {@inheritDoc ISharedSummaryBlock}
|
|
43
|
+
* @alpha
|
|
44
|
+
*/
|
|
45
|
+
export type SharedSummaryBlock = ISharedSummaryBlock;
|
|
39
46
|
//# sourceMappingURL=sharedSummaryBlockFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlockFactory.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlockFactory.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AAGxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAI3D;;GAEG;AACH,qBAAa,yBAA0B,YAAW,eAAe,CAAC,mBAAmB,CAAC;IACrF;;OAEG;IACH,gBAAuB,IAAI,4DAA4D;IAEvF;;OAEG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF;;OAEG;IACH,IAAW,IAAI,WAEd;IAED;;OAEG;IACH,IAAW,UAAU,uBAEpB;IAED;;OAEG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,mBAAmB,CAAC;IAO/B;;OAEG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,mBAAmB;CAU/E;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,4LAAoD,CAAC;AAEpF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC"}
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
import { createSharedObjectKind } from "@fluidframework/shared-object-base/internal";
|
|
5
6
|
import { pkgVersion } from "./packageVersion.js";
|
|
6
|
-
import {
|
|
7
|
+
import { SharedSummaryBlockClass } from "./sharedSummaryBlock.js";
|
|
7
8
|
/**
|
|
8
9
|
* The factory that defines the shared summary block.
|
|
9
|
-
*
|
|
10
|
-
* @sealed
|
|
11
|
-
* @internal
|
|
12
10
|
*/
|
|
13
11
|
export class SharedSummaryBlockFactory {
|
|
14
12
|
/**
|
|
@@ -27,7 +25,7 @@ export class SharedSummaryBlockFactory {
|
|
|
27
25
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
28
26
|
*/
|
|
29
27
|
async load(runtime, id, services, attributes) {
|
|
30
|
-
const sharedSummaryBlock = new
|
|
28
|
+
const sharedSummaryBlock = new SharedSummaryBlockClass(id, runtime, attributes);
|
|
31
29
|
await sharedSummaryBlock.load(services);
|
|
32
30
|
return sharedSummaryBlock;
|
|
33
31
|
}
|
|
@@ -35,7 +33,7 @@ export class SharedSummaryBlockFactory {
|
|
|
35
33
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
|
|
36
34
|
*/
|
|
37
35
|
create(runtime, id) {
|
|
38
|
-
const sharedSummaryBlock = new
|
|
36
|
+
const sharedSummaryBlock = new SharedSummaryBlockClass(id, runtime, SharedSummaryBlockFactory.Attributes);
|
|
39
37
|
sharedSummaryBlock.initializeLocal();
|
|
40
38
|
return sharedSummaryBlock;
|
|
41
39
|
}
|
|
@@ -52,4 +50,9 @@ SharedSummaryBlockFactory.Attributes = {
|
|
|
52
50
|
snapshotFormatVersion: "0.1",
|
|
53
51
|
packageVersion: pkgVersion,
|
|
54
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* {@inheritDoc ISharedSummaryBlock}
|
|
55
|
+
* @alpha
|
|
56
|
+
*/
|
|
57
|
+
export const SharedSummaryBlock = createSharedObjectKind(SharedSummaryBlockFactory);
|
|
55
58
|
//# sourceMappingURL=sharedSummaryBlockFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlockFactory.js","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlockFactory.js","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAGrF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,yBAAyB;IAerC;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,yBAAyB,CAAC,IAAI,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,yBAAyB,CAAC,UAAU,CAAC;IAC7C,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,kBAAkB,GAAG,IAAI,uBAAuB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAChF,MAAM,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAExC,OAAO,kBAAkB,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,kBAAkB,GAAG,IAAI,uBAAuB,CACrD,EAAE,EACF,OAAO,EACP,yBAAyB,CAAC,UAAU,CACpC,CAAC;QACF,kBAAkB,CAAC,eAAe,EAAE,CAAC;QAErC,OAAO,kBAAkB,CAAC;IAC3B,CAAC;;AAvDD;;GAEG;AACoB,8BAAI,GAAG,wDAAwD,CAAC;AAEvF;;GAEG;AACoB,oCAAU,GAAuB;IACvD,IAAI,EAAE,yBAAyB,CAAC,IAAI;IACpC,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,UAAU;CAC1B,CAAC;AA8CH;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,yBAAyB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { createSharedObjectKind } from \"@fluidframework/shared-object-base/internal\";\n\nimport type { ISharedSummaryBlock } from \"./interfaces.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\nimport { SharedSummaryBlockClass } from \"./sharedSummaryBlock.js\";\n\n/**\n * The factory that defines the shared summary block.\n */\nexport class SharedSummaryBlockFactory implements IChannelFactory<ISharedSummaryBlock> {\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic static readonly Type = \"https://graph.microsoft.com/types/shared-summary-block\";\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: SharedSummaryBlockFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type() {\n\t\treturn SharedSummaryBlockFactory.Type;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes() {\n\t\treturn SharedSummaryBlockFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<ISharedSummaryBlock> {\n\t\tconst sharedSummaryBlock = new SharedSummaryBlockClass(id, runtime, attributes);\n\t\tawait sharedSummaryBlock.load(services);\n\n\t\treturn sharedSummaryBlock;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): ISharedSummaryBlock {\n\t\tconst sharedSummaryBlock = new SharedSummaryBlockClass(\n\t\t\tid,\n\t\t\truntime,\n\t\t\tSharedSummaryBlockFactory.Attributes,\n\t\t);\n\t\tsharedSummaryBlock.initializeLocal();\n\n\t\treturn sharedSummaryBlock;\n\t}\n}\n\n/**\n * {@inheritDoc ISharedSummaryBlock}\n * @alpha\n */\nexport const SharedSummaryBlock = createSharedObjectKind(SharedSummaryBlockFactory);\n\n/**\n * {@inheritDoc ISharedSummaryBlock}\n * @alpha\n */\nexport type SharedSummaryBlock = ISharedSummaryBlock;\n"]}
|
package/lib/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/shared-summary-block",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.5.0.1",
|
|
4
4
|
"description": "A DDS that does not generate ops but is part of summary",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -67,30 +67,31 @@
|
|
|
67
67
|
"temp-directory": "nyc/.nyc_output"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@fluidframework/core-interfaces": ">=2.0.0-rc.
|
|
71
|
-
"@fluidframework/datastore-definitions": ">=2.0.0-rc.
|
|
72
|
-
"@fluidframework/driver-
|
|
73
|
-
"@fluidframework/
|
|
74
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-rc.
|
|
75
|
-
"@fluidframework/shared-object-base": ">=2.0.0-rc.
|
|
70
|
+
"@fluidframework/core-interfaces": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
71
|
+
"@fluidframework/datastore-definitions": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
72
|
+
"@fluidframework/driver-definitions": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
73
|
+
"@fluidframework/driver-utils": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
74
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
75
|
+
"@fluidframework/shared-object-base": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@arethetypeswrong/cli": "^0.15.2",
|
|
79
|
-
"@biomejs/biome": "^1.
|
|
80
|
-
"@fluid-internal/mocha-test-setup": ">=2.0.0-rc.
|
|
81
|
-
"@fluid-tools/build-cli": "^0.
|
|
79
|
+
"@biomejs/biome": "^1.7.3",
|
|
80
|
+
"@fluid-internal/mocha-test-setup": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
81
|
+
"@fluid-tools/build-cli": "^0.39.0",
|
|
82
82
|
"@fluidframework/build-common": "^2.0.3",
|
|
83
|
-
"@fluidframework/build-tools": "^0.
|
|
84
|
-
"@fluidframework/container-definitions": ">=2.0.0-rc.
|
|
85
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
86
|
-
"@fluidframework/shared-summary-block-previous": "npm:@fluidframework/shared-summary-block@2.0.0-rc.
|
|
87
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-rc.
|
|
88
|
-
"@microsoft/api-extractor": "^7.
|
|
83
|
+
"@fluidframework/build-tools": "^0.39.0",
|
|
84
|
+
"@fluidframework/container-definitions": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
85
|
+
"@fluidframework/eslint-config-fluid": "^5.3.0",
|
|
86
|
+
"@fluidframework/shared-summary-block-previous": "npm:@fluidframework/shared-summary-block@2.0.0-rc.4.0.0",
|
|
87
|
+
"@fluidframework/test-runtime-utils": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
88
|
+
"@microsoft/api-extractor": "^7.45.1",
|
|
89
89
|
"@types/benchmark": "^2.1.0",
|
|
90
90
|
"@types/mocha": "^9.1.1",
|
|
91
91
|
"@types/node": "^18.19.0",
|
|
92
92
|
"benchmark": "^2.1.4",
|
|
93
93
|
"c8": "^8.0.1",
|
|
94
|
+
"concurrently": "^8.2.1",
|
|
94
95
|
"copyfiles": "^2.4.1",
|
|
95
96
|
"cross-env": "^7.0.3",
|
|
96
97
|
"eslint": "~8.55.0",
|
|
@@ -101,16 +102,17 @@
|
|
|
101
102
|
"prettier": "~3.0.3",
|
|
102
103
|
"replace-in-file": "^6.3.5",
|
|
103
104
|
"rimraf": "^4.4.0",
|
|
104
|
-
"typescript": "~5.
|
|
105
|
+
"typescript": "~5.4.5"
|
|
105
106
|
},
|
|
106
107
|
"typeValidation": {
|
|
107
108
|
"broken": {
|
|
108
|
-
"
|
|
109
|
+
"RemovedClassDeclaration_SharedSummaryBlock": {
|
|
109
110
|
"forwardCompat": false,
|
|
110
111
|
"backCompat": false
|
|
111
112
|
},
|
|
112
|
-
"
|
|
113
|
-
"forwardCompat": false
|
|
113
|
+
"RemovedClassDeclaration_SharedSummaryBlockFactory": {
|
|
114
|
+
"forwardCompat": false,
|
|
115
|
+
"backCompat": false
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
},
|
|
@@ -129,13 +131,21 @@
|
|
|
129
131
|
"build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
|
|
130
132
|
"build:test:esm": "tsc --project ./src/test/tsconfig.json",
|
|
131
133
|
"check:are-the-types-wrong": "attw --pack .",
|
|
134
|
+
"check:biome": "biome check . --formatter-enabled=true",
|
|
135
|
+
"check:exports": "concurrently \"npm:check:exports:*\"",
|
|
136
|
+
"check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
|
|
137
|
+
"check:exports:cjs:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.cjs.json",
|
|
138
|
+
"check:exports:cjs:public": "api-extractor run --config api-extractor/api-extractor-lint-public.cjs.json",
|
|
139
|
+
"check:exports:esm:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.esm.json",
|
|
140
|
+
"check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
|
|
141
|
+
"check:format": "npm run check:biome",
|
|
132
142
|
"check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
133
|
-
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
134
143
|
"ci:build:docs": "api-extractor run",
|
|
135
144
|
"clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
|
|
136
145
|
"eslint": "eslint --format stylish src",
|
|
137
146
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
138
|
-
"format": "
|
|
147
|
+
"format": "npm run format:biome",
|
|
148
|
+
"format:biome": "biome check . --formatter-enabled=true --apply",
|
|
139
149
|
"format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
|
140
150
|
"lint": "fluid-build . --task lint",
|
|
141
151
|
"lint:fix": "fluid-build . --task eslint:fix --task format",
|
package/src/index.ts
CHANGED
|
@@ -4,5 +4,4 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export { ISharedSummaryBlock } from "./interfaces.js";
|
|
7
|
-
export { SharedSummaryBlock } from "./
|
|
8
|
-
export { SharedSummaryBlockFactory } from "./sharedSummaryBlockFactory.js";
|
|
7
|
+
export { SharedSummaryBlock } from "./sharedSummaryBlockFactory.js";
|
package/src/interfaces.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { Jsonable } from "@fluidframework/datastore-definitions/internal";
|
|
7
|
-
import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
7
|
+
import { ISharedObject } from "@fluidframework/shared-object-base/internal";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.
|
package/src/packageVersion.ts
CHANGED
|
@@ -4,20 +4,21 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
|
+
Jsonable,
|
|
7
8
|
IChannelAttributes,
|
|
8
|
-
IChannelFactory,
|
|
9
|
-
IChannelStorageService,
|
|
10
9
|
IFluidDataStoreRuntime,
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
IChannelStorageService,
|
|
11
|
+
} from "@fluidframework/datastore-definitions/internal";
|
|
12
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
13
13
|
import { readAndParse } from "@fluidframework/driver-utils/internal";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
|
|
15
|
+
import {
|
|
16
|
+
IFluidSerializer,
|
|
17
|
+
SharedObject,
|
|
18
|
+
createSingleBlobSummary,
|
|
19
|
+
} from "@fluidframework/shared-object-base/internal";
|
|
18
20
|
|
|
19
21
|
import { ISharedSummaryBlock } from "./interfaces.js";
|
|
20
|
-
import { SharedSummaryBlockFactory } from "./sharedSummaryBlockFactory.js";
|
|
21
22
|
|
|
22
23
|
const snapshotFileName = "header";
|
|
23
24
|
|
|
@@ -34,27 +35,7 @@ interface ISharedSummaryBlockDataSerializable {
|
|
|
34
35
|
* Data should be set in this object in response to a remote op.
|
|
35
36
|
* @alpha
|
|
36
37
|
*/
|
|
37
|
-
export class
|
|
38
|
-
/**
|
|
39
|
-
* Create a new shared summary block
|
|
40
|
-
*
|
|
41
|
-
* @param runtime - data store runtime the new shared summary block belongs to.
|
|
42
|
-
* @param id - optional name of the shared summary block.
|
|
43
|
-
* @returns newly created shared summary block (but not attached yet).
|
|
44
|
-
*/
|
|
45
|
-
public static create(runtime: IFluidDataStoreRuntime, id?: string) {
|
|
46
|
-
return runtime.createChannel(id, SharedSummaryBlockFactory.Type) as SharedSummaryBlock;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Get a factory for SharedSummaryBlock to register with the data store.
|
|
51
|
-
*
|
|
52
|
-
* @returns a factory that creates and loads SharedSummaryBlock.
|
|
53
|
-
*/
|
|
54
|
-
public static getFactory(): IChannelFactory {
|
|
55
|
-
return new SharedSummaryBlockFactory();
|
|
56
|
-
}
|
|
57
|
-
|
|
38
|
+
export class SharedSummaryBlockClass extends SharedObject implements ISharedSummaryBlock {
|
|
58
39
|
/**
|
|
59
40
|
* The data held by this object.
|
|
60
41
|
*/
|
|
@@ -6,21 +6,19 @@
|
|
|
6
6
|
import {
|
|
7
7
|
IChannelAttributes,
|
|
8
8
|
IChannelFactory,
|
|
9
|
-
IChannelServices,
|
|
10
9
|
IFluidDataStoreRuntime,
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
IChannelServices,
|
|
11
|
+
} from "@fluidframework/datastore-definitions/internal";
|
|
12
|
+
import { createSharedObjectKind } from "@fluidframework/shared-object-base/internal";
|
|
13
13
|
|
|
14
|
+
import type { ISharedSummaryBlock } from "./interfaces.js";
|
|
14
15
|
import { pkgVersion } from "./packageVersion.js";
|
|
15
|
-
import {
|
|
16
|
+
import { SharedSummaryBlockClass } from "./sharedSummaryBlock.js";
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* The factory that defines the shared summary block.
|
|
19
|
-
*
|
|
20
|
-
* @sealed
|
|
21
|
-
* @internal
|
|
22
20
|
*/
|
|
23
|
-
export class SharedSummaryBlockFactory implements IChannelFactory {
|
|
21
|
+
export class SharedSummaryBlockFactory implements IChannelFactory<ISharedSummaryBlock> {
|
|
24
22
|
/**
|
|
25
23
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
26
24
|
*/
|
|
@@ -57,8 +55,8 @@ export class SharedSummaryBlockFactory implements IChannelFactory {
|
|
|
57
55
|
id: string,
|
|
58
56
|
services: IChannelServices,
|
|
59
57
|
attributes: IChannelAttributes,
|
|
60
|
-
): Promise<
|
|
61
|
-
const sharedSummaryBlock = new
|
|
58
|
+
): Promise<ISharedSummaryBlock> {
|
|
59
|
+
const sharedSummaryBlock = new SharedSummaryBlockClass(id, runtime, attributes);
|
|
62
60
|
await sharedSummaryBlock.load(services);
|
|
63
61
|
|
|
64
62
|
return sharedSummaryBlock;
|
|
@@ -67,8 +65,8 @@ export class SharedSummaryBlockFactory implements IChannelFactory {
|
|
|
67
65
|
/**
|
|
68
66
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
|
|
69
67
|
*/
|
|
70
|
-
public create(runtime: IFluidDataStoreRuntime, id: string):
|
|
71
|
-
const sharedSummaryBlock = new
|
|
68
|
+
public create(runtime: IFluidDataStoreRuntime, id: string): ISharedSummaryBlock {
|
|
69
|
+
const sharedSummaryBlock = new SharedSummaryBlockClass(
|
|
72
70
|
id,
|
|
73
71
|
runtime,
|
|
74
72
|
SharedSummaryBlockFactory.Attributes,
|
|
@@ -78,3 +76,15 @@ export class SharedSummaryBlockFactory implements IChannelFactory {
|
|
|
78
76
|
return sharedSummaryBlock;
|
|
79
77
|
}
|
|
80
78
|
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* {@inheritDoc ISharedSummaryBlock}
|
|
82
|
+
* @alpha
|
|
83
|
+
*/
|
|
84
|
+
export const SharedSummaryBlock = createSharedObjectKind(SharedSummaryBlockFactory);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* {@inheritDoc ISharedSummaryBlock}
|
|
88
|
+
* @alpha
|
|
89
|
+
*/
|
|
90
|
+
export type SharedSummaryBlock = ISharedSummaryBlock;
|
package/tsconfig.json
CHANGED
package/tsdoc.json
ADDED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
## API Report File for "@fluidframework/shared-summary-block"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { IChannelAttributes } from '@fluidframework/datastore-definitions';
|
|
8
|
-
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
9
|
-
import { IChannelServices } from '@fluidframework/datastore-definitions';
|
|
10
|
-
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
11
|
-
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
12
|
-
import { IFluidSerializer } from '@fluidframework/shared-object-base';
|
|
13
|
-
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
14
|
-
import { ISharedObject } from '@fluidframework/shared-object-base';
|
|
15
|
-
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
16
|
-
import { Jsonable } from '@fluidframework/datastore-definitions/internal';
|
|
17
|
-
import { SharedObject } from '@fluidframework/shared-object-base/internal';
|
|
18
|
-
|
|
19
|
-
// @alpha
|
|
20
|
-
export interface ISharedSummaryBlock extends ISharedObject {
|
|
21
|
-
get<T>(key: string): Jsonable<T>;
|
|
22
|
-
set<T>(key: string, value: Jsonable<T>): void;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// @alpha
|
|
26
|
-
export class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
|
|
27
|
-
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
|
|
28
|
-
// (undocumented)
|
|
29
|
-
protected applyStashedOp(): void;
|
|
30
|
-
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
|
|
31
|
-
get<T>(key: string): Jsonable<T>;
|
|
32
|
-
static getFactory(): IChannelFactory;
|
|
33
|
-
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
34
|
-
protected onDisconnect(): void;
|
|
35
|
-
protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
|
|
36
|
-
set<T>(key: string, value: Jsonable<T>): void;
|
|
37
|
-
protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// @internal @sealed
|
|
41
|
-
export class SharedSummaryBlockFactory implements IChannelFactory {
|
|
42
|
-
static readonly Attributes: IChannelAttributes;
|
|
43
|
-
get attributes(): IChannelAttributes;
|
|
44
|
-
create(runtime: IFluidDataStoreRuntime, id: string): ISharedObject;
|
|
45
|
-
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
|
|
46
|
-
static readonly Type = "https://graph.microsoft.com/types/shared-summary-block";
|
|
47
|
-
get type(): string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// (No @packageDocumentation comment for this package)
|
|
51
|
-
|
|
52
|
-
```
|