@fluidframework/shared-summary-block 2.0.0-internal.6.4.0 → 2.0.0-internal.7.1.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 +48 -0
- package/api-extractor.json +1 -1
- package/api-report/shared-summary-block.api.md +62 -0
- package/dist/interfaces.d.ts +2 -0
- 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/shared-summary-block-alpha.d.ts +130 -0
- package/dist/shared-summary-block-beta.d.ts +130 -0
- package/dist/shared-summary-block-public.d.ts +130 -0
- package/dist/shared-summary-block.d.ts +130 -0
- package/dist/sharedSummaryBlock.d.ts +2 -0
- package/dist/sharedSummaryBlock.d.ts.map +1 -1
- package/dist/sharedSummaryBlock.js +17 -15
- package/dist/sharedSummaryBlock.js.map +1 -1
- package/dist/sharedSummaryBlockFactory.d.ts +2 -0
- package/dist/sharedSummaryBlockFactory.d.ts.map +1 -1
- package/dist/sharedSummaryBlockFactory.js +2 -0
- package/dist/sharedSummaryBlockFactory.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/interfaces.d.ts +2 -0
- 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 +2 -0
- package/lib/sharedSummaryBlock.d.ts.map +1 -1
- package/lib/sharedSummaryBlock.js +17 -15
- package/lib/sharedSummaryBlock.js.map +1 -1
- package/lib/sharedSummaryBlockFactory.d.ts +2 -0
- package/lib/sharedSummaryBlockFactory.d.ts.map +1 -1
- package/lib/sharedSummaryBlockFactory.js +2 -0
- package/lib/sharedSummaryBlockFactory.js.map +1 -1
- package/package.json +20 -20
- package/src/interfaces.ts +2 -0
- package/src/packageVersion.ts +1 -1
- package/src/sharedSummaryBlock.ts +2 -0
- package/src/sharedSummaryBlockFactory.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# @fluidframework/shared-summary-block
|
|
2
2
|
|
|
3
|
+
## 2.0.0-internal.7.1.0
|
|
4
|
+
|
|
5
|
+
Dependency updates only.
|
|
6
|
+
|
|
7
|
+
## 2.0.0-internal.7.0.0
|
|
8
|
+
|
|
9
|
+
### Major Changes
|
|
10
|
+
|
|
11
|
+
- Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
12
|
+
|
|
13
|
+
This included the following changes from the protocol-definitions release:
|
|
14
|
+
|
|
15
|
+
- Updating signal interfaces for some planned improvements. The intention is split the interface between signals
|
|
16
|
+
submitted by clients to the server and the resulting signals sent from the server to clients.
|
|
17
|
+
- A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
|
|
18
|
+
been added, which will be the typing for signals sent from the client to the server. Both extend a new
|
|
19
|
+
ISignalMessageBase interface that contains common members.
|
|
20
|
+
- The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
|
|
21
|
+
|
|
22
|
+
- Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
23
|
+
|
|
24
|
+
Dependencies on the following Fluid server package have been updated to version 2.0.1:
|
|
25
|
+
|
|
26
|
+
- @fluidframework/gitresources: 2.0.1
|
|
27
|
+
- @fluidframework/server-kafka-orderer: 2.0.1
|
|
28
|
+
- @fluidframework/server-lambdas: 2.0.1
|
|
29
|
+
- @fluidframework/server-lambdas-driver: 2.0.1
|
|
30
|
+
- @fluidframework/server-local-server: 2.0.1
|
|
31
|
+
- @fluidframework/server-memory-orderer: 2.0.1
|
|
32
|
+
- @fluidframework/protocol-base: 2.0.1
|
|
33
|
+
- @fluidframework/server-routerlicious: 2.0.1
|
|
34
|
+
- @fluidframework/server-routerlicious-base: 2.0.1
|
|
35
|
+
- @fluidframework/server-services: 2.0.1
|
|
36
|
+
- @fluidframework/server-services-client: 2.0.1
|
|
37
|
+
- @fluidframework/server-services-core: 2.0.1
|
|
38
|
+
- @fluidframework/server-services-ordering-kafkanode: 2.0.1
|
|
39
|
+
- @fluidframework/server-services-ordering-rdkafka: 2.0.1
|
|
40
|
+
- @fluidframework/server-services-ordering-zookeeper: 2.0.1
|
|
41
|
+
- @fluidframework/server-services-shared: 2.0.1
|
|
42
|
+
- @fluidframework/server-services-telemetry: 2.0.1
|
|
43
|
+
- @fluidframework/server-services-utils: 2.0.1
|
|
44
|
+
- @fluidframework/server-test-utils: 2.0.1
|
|
45
|
+
- tinylicious: 2.0.1
|
|
46
|
+
|
|
47
|
+
- Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
48
|
+
|
|
49
|
+
The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
|
|
50
|
+
|
|
3
51
|
## 2.0.0-internal.6.4.0
|
|
4
52
|
|
|
5
53
|
Dependency updates only.
|
package/api-extractor.json
CHANGED
|
@@ -0,0 +1,62 @@
|
|
|
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';
|
|
17
|
+
import { SharedObject } from '@fluidframework/shared-object-base';
|
|
18
|
+
|
|
19
|
+
// @public
|
|
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
|
+
// @public
|
|
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
|
+
// (undocumented)
|
|
34
|
+
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
35
|
+
// (undocumented)
|
|
36
|
+
protected onDisconnect(): void;
|
|
37
|
+
// (undocumented)
|
|
38
|
+
protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
|
|
39
|
+
set<T>(key: string, value: Jsonable<T>): void;
|
|
40
|
+
// (undocumented)
|
|
41
|
+
protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// @public @sealed
|
|
45
|
+
export class SharedSummaryBlockFactory implements IChannelFactory {
|
|
46
|
+
// (undocumented)
|
|
47
|
+
static readonly Attributes: IChannelAttributes;
|
|
48
|
+
// (undocumented)
|
|
49
|
+
get attributes(): IChannelAttributes;
|
|
50
|
+
// (undocumented)
|
|
51
|
+
create(runtime: IFluidDataStoreRuntime, id: string): ISharedObject;
|
|
52
|
+
// (undocumented)
|
|
53
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
|
|
54
|
+
// (undocumented)
|
|
55
|
+
static readonly Type = "https://graph.microsoft.com/types/shared-summary-block";
|
|
56
|
+
// (undocumented)
|
|
57
|
+
get type(): string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// (No @packageDocumentation comment for this package)
|
|
61
|
+
|
|
62
|
+
```
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
|
9
9
|
* The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
|
|
10
10
|
* the set of calls on this interface to set data should be the same. This is critical because the object does not
|
|
11
11
|
* generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
12
14
|
*/
|
|
13
15
|
export interface ISharedSummaryBlock extends ISharedObject {
|
|
14
16
|
/**
|
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,uCAAuC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACzD;;;;OAIG;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\";\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 */\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\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\";\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 *\n * @public\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\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-internal.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.7.1.0";
|
|
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-internal.
|
|
11
|
+
exports.pkgVersion = "2.0.0-internal.7.1.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,sCAAsC,CAAC;AACjD,QAAA,UAAU,GAAG,sBAAsB,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-internal.
|
|
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,sBAAsB,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-internal.7.1.0\";\n"]}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { IChannelAttributes } from '@fluidframework/datastore-definitions';
|
|
2
|
+
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
3
|
+
import { IChannelServices } from '@fluidframework/datastore-definitions';
|
|
4
|
+
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
5
|
+
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
6
|
+
import { IFluidSerializer } from '@fluidframework/shared-object-base';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
import { ISharedObject } from '@fluidframework/shared-object-base';
|
|
9
|
+
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
10
|
+
import { Jsonable } from '@fluidframework/datastore-definitions';
|
|
11
|
+
import { SharedObject } from '@fluidframework/shared-object-base';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.
|
|
15
|
+
* The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
|
|
16
|
+
* the set of calls on this interface to set data should be the same. This is critical because the object does not
|
|
17
|
+
* generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare interface ISharedSummaryBlock extends ISharedObject {
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the given key from the map.
|
|
24
|
+
* @param key - Key to retrieve from.
|
|
25
|
+
* @returns The stored value, or undefined if the key is not set.
|
|
26
|
+
*/
|
|
27
|
+
get<T>(key: string): Jsonable<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the value stored at key to the provided value.
|
|
30
|
+
* @param key - Key to set at.
|
|
31
|
+
* @param value - Jsonable type value to set.
|
|
32
|
+
*/
|
|
33
|
+
set<T>(key: string, value: Jsonable<T>): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
38
|
+
* Data should be set in this object in response to a remote op.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
|
|
43
|
+
/**
|
|
44
|
+
* Create a new shared summary block
|
|
45
|
+
*
|
|
46
|
+
* @param runtime - data store runtime the new shared summary block belongs to.
|
|
47
|
+
* @param id - optional name of the shared summary block.
|
|
48
|
+
* @returns newly created shared summary block (but not attached yet).
|
|
49
|
+
*/
|
|
50
|
+
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
|
|
51
|
+
/**
|
|
52
|
+
* Get a factory for SharedSummaryBlock to register with the data store.
|
|
53
|
+
*
|
|
54
|
+
* @returns a factory that creates and loads SharedSummaryBlock.
|
|
55
|
+
*/
|
|
56
|
+
static getFactory(): IChannelFactory;
|
|
57
|
+
/**
|
|
58
|
+
* The data held by this object.
|
|
59
|
+
*/
|
|
60
|
+
private readonly data;
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
|
|
63
|
+
* be provided.
|
|
64
|
+
*
|
|
65
|
+
* @param id - optional name of the shared summary block.
|
|
66
|
+
* @param runtime - data store runtime thee object belongs to.
|
|
67
|
+
* @param attributes - The attributes for the object.
|
|
68
|
+
*/
|
|
69
|
+
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
|
|
70
|
+
/**
|
|
71
|
+
* {@inheritDoc ISharedSummaryBlock.get}
|
|
72
|
+
*/
|
|
73
|
+
get<T>(key: string): Jsonable<T>;
|
|
74
|
+
/**
|
|
75
|
+
* {@inheritDoc ISharedSummaryBlock.set}
|
|
76
|
+
*/
|
|
77
|
+
set<T>(key: string, value: Jsonable<T>): void;
|
|
78
|
+
/**
|
|
79
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
|
|
80
|
+
*/
|
|
81
|
+
protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
|
|
82
|
+
/**
|
|
83
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
|
|
84
|
+
*/
|
|
85
|
+
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
|
|
88
|
+
*/
|
|
89
|
+
protected onDisconnect(): void;
|
|
90
|
+
/**
|
|
91
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
|
|
92
|
+
*/
|
|
93
|
+
protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
|
|
94
|
+
protected applyStashedOp(): void;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The factory that defines the shared summary block.
|
|
99
|
+
*
|
|
100
|
+
* @sealed
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
export declare class SharedSummaryBlockFactory implements IChannelFactory {
|
|
104
|
+
/**
|
|
105
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
106
|
+
*/
|
|
107
|
+
static readonly Type = "https://graph.microsoft.com/types/shared-summary-block";
|
|
108
|
+
/**
|
|
109
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
|
|
110
|
+
*/
|
|
111
|
+
static readonly Attributes: IChannelAttributes;
|
|
112
|
+
/**
|
|
113
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
114
|
+
*/
|
|
115
|
+
get type(): string;
|
|
116
|
+
/**
|
|
117
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
|
|
118
|
+
*/
|
|
119
|
+
get attributes(): IChannelAttributes;
|
|
120
|
+
/**
|
|
121
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
122
|
+
*/
|
|
123
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
|
|
124
|
+
/**
|
|
125
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
|
|
126
|
+
*/
|
|
127
|
+
create(runtime: IFluidDataStoreRuntime, id: string): ISharedObject;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { }
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { IChannelAttributes } from '@fluidframework/datastore-definitions';
|
|
2
|
+
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
3
|
+
import { IChannelServices } from '@fluidframework/datastore-definitions';
|
|
4
|
+
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
5
|
+
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
6
|
+
import { IFluidSerializer } from '@fluidframework/shared-object-base';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
import { ISharedObject } from '@fluidframework/shared-object-base';
|
|
9
|
+
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
10
|
+
import { Jsonable } from '@fluidframework/datastore-definitions';
|
|
11
|
+
import { SharedObject } from '@fluidframework/shared-object-base';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.
|
|
15
|
+
* The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
|
|
16
|
+
* the set of calls on this interface to set data should be the same. This is critical because the object does not
|
|
17
|
+
* generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare interface ISharedSummaryBlock extends ISharedObject {
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the given key from the map.
|
|
24
|
+
* @param key - Key to retrieve from.
|
|
25
|
+
* @returns The stored value, or undefined if the key is not set.
|
|
26
|
+
*/
|
|
27
|
+
get<T>(key: string): Jsonable<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the value stored at key to the provided value.
|
|
30
|
+
* @param key - Key to set at.
|
|
31
|
+
* @param value - Jsonable type value to set.
|
|
32
|
+
*/
|
|
33
|
+
set<T>(key: string, value: Jsonable<T>): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
38
|
+
* Data should be set in this object in response to a remote op.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
|
|
43
|
+
/**
|
|
44
|
+
* Create a new shared summary block
|
|
45
|
+
*
|
|
46
|
+
* @param runtime - data store runtime the new shared summary block belongs to.
|
|
47
|
+
* @param id - optional name of the shared summary block.
|
|
48
|
+
* @returns newly created shared summary block (but not attached yet).
|
|
49
|
+
*/
|
|
50
|
+
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
|
|
51
|
+
/**
|
|
52
|
+
* Get a factory for SharedSummaryBlock to register with the data store.
|
|
53
|
+
*
|
|
54
|
+
* @returns a factory that creates and loads SharedSummaryBlock.
|
|
55
|
+
*/
|
|
56
|
+
static getFactory(): IChannelFactory;
|
|
57
|
+
/**
|
|
58
|
+
* The data held by this object.
|
|
59
|
+
*/
|
|
60
|
+
private readonly data;
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
|
|
63
|
+
* be provided.
|
|
64
|
+
*
|
|
65
|
+
* @param id - optional name of the shared summary block.
|
|
66
|
+
* @param runtime - data store runtime thee object belongs to.
|
|
67
|
+
* @param attributes - The attributes for the object.
|
|
68
|
+
*/
|
|
69
|
+
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
|
|
70
|
+
/**
|
|
71
|
+
* {@inheritDoc ISharedSummaryBlock.get}
|
|
72
|
+
*/
|
|
73
|
+
get<T>(key: string): Jsonable<T>;
|
|
74
|
+
/**
|
|
75
|
+
* {@inheritDoc ISharedSummaryBlock.set}
|
|
76
|
+
*/
|
|
77
|
+
set<T>(key: string, value: Jsonable<T>): void;
|
|
78
|
+
/**
|
|
79
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
|
|
80
|
+
*/
|
|
81
|
+
protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
|
|
82
|
+
/**
|
|
83
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
|
|
84
|
+
*/
|
|
85
|
+
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
|
|
88
|
+
*/
|
|
89
|
+
protected onDisconnect(): void;
|
|
90
|
+
/**
|
|
91
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
|
|
92
|
+
*/
|
|
93
|
+
protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
|
|
94
|
+
protected applyStashedOp(): void;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The factory that defines the shared summary block.
|
|
99
|
+
*
|
|
100
|
+
* @sealed
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
export declare class SharedSummaryBlockFactory implements IChannelFactory {
|
|
104
|
+
/**
|
|
105
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
106
|
+
*/
|
|
107
|
+
static readonly Type = "https://graph.microsoft.com/types/shared-summary-block";
|
|
108
|
+
/**
|
|
109
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
|
|
110
|
+
*/
|
|
111
|
+
static readonly Attributes: IChannelAttributes;
|
|
112
|
+
/**
|
|
113
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
114
|
+
*/
|
|
115
|
+
get type(): string;
|
|
116
|
+
/**
|
|
117
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
|
|
118
|
+
*/
|
|
119
|
+
get attributes(): IChannelAttributes;
|
|
120
|
+
/**
|
|
121
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
122
|
+
*/
|
|
123
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
|
|
124
|
+
/**
|
|
125
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
|
|
126
|
+
*/
|
|
127
|
+
create(runtime: IFluidDataStoreRuntime, id: string): ISharedObject;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { }
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { IChannelAttributes } from '@fluidframework/datastore-definitions';
|
|
2
|
+
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
3
|
+
import { IChannelServices } from '@fluidframework/datastore-definitions';
|
|
4
|
+
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
5
|
+
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
6
|
+
import { IFluidSerializer } from '@fluidframework/shared-object-base';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
import { ISharedObject } from '@fluidframework/shared-object-base';
|
|
9
|
+
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
10
|
+
import { Jsonable } from '@fluidframework/datastore-definitions';
|
|
11
|
+
import { SharedObject } from '@fluidframework/shared-object-base';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.
|
|
15
|
+
* The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
|
|
16
|
+
* the set of calls on this interface to set data should be the same. This is critical because the object does not
|
|
17
|
+
* generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare interface ISharedSummaryBlock extends ISharedObject {
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the given key from the map.
|
|
24
|
+
* @param key - Key to retrieve from.
|
|
25
|
+
* @returns The stored value, or undefined if the key is not set.
|
|
26
|
+
*/
|
|
27
|
+
get<T>(key: string): Jsonable<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the value stored at key to the provided value.
|
|
30
|
+
* @param key - Key to set at.
|
|
31
|
+
* @param value - Jsonable type value to set.
|
|
32
|
+
*/
|
|
33
|
+
set<T>(key: string, value: Jsonable<T>): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
38
|
+
* Data should be set in this object in response to a remote op.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
|
|
43
|
+
/**
|
|
44
|
+
* Create a new shared summary block
|
|
45
|
+
*
|
|
46
|
+
* @param runtime - data store runtime the new shared summary block belongs to.
|
|
47
|
+
* @param id - optional name of the shared summary block.
|
|
48
|
+
* @returns newly created shared summary block (but not attached yet).
|
|
49
|
+
*/
|
|
50
|
+
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
|
|
51
|
+
/**
|
|
52
|
+
* Get a factory for SharedSummaryBlock to register with the data store.
|
|
53
|
+
*
|
|
54
|
+
* @returns a factory that creates and loads SharedSummaryBlock.
|
|
55
|
+
*/
|
|
56
|
+
static getFactory(): IChannelFactory;
|
|
57
|
+
/**
|
|
58
|
+
* The data held by this object.
|
|
59
|
+
*/
|
|
60
|
+
private readonly data;
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
|
|
63
|
+
* be provided.
|
|
64
|
+
*
|
|
65
|
+
* @param id - optional name of the shared summary block.
|
|
66
|
+
* @param runtime - data store runtime thee object belongs to.
|
|
67
|
+
* @param attributes - The attributes for the object.
|
|
68
|
+
*/
|
|
69
|
+
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
|
|
70
|
+
/**
|
|
71
|
+
* {@inheritDoc ISharedSummaryBlock.get}
|
|
72
|
+
*/
|
|
73
|
+
get<T>(key: string): Jsonable<T>;
|
|
74
|
+
/**
|
|
75
|
+
* {@inheritDoc ISharedSummaryBlock.set}
|
|
76
|
+
*/
|
|
77
|
+
set<T>(key: string, value: Jsonable<T>): void;
|
|
78
|
+
/**
|
|
79
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
|
|
80
|
+
*/
|
|
81
|
+
protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
|
|
82
|
+
/**
|
|
83
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
|
|
84
|
+
*/
|
|
85
|
+
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
|
|
88
|
+
*/
|
|
89
|
+
protected onDisconnect(): void;
|
|
90
|
+
/**
|
|
91
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
|
|
92
|
+
*/
|
|
93
|
+
protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
|
|
94
|
+
protected applyStashedOp(): void;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The factory that defines the shared summary block.
|
|
99
|
+
*
|
|
100
|
+
* @sealed
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
export declare class SharedSummaryBlockFactory implements IChannelFactory {
|
|
104
|
+
/**
|
|
105
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
106
|
+
*/
|
|
107
|
+
static readonly Type = "https://graph.microsoft.com/types/shared-summary-block";
|
|
108
|
+
/**
|
|
109
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
|
|
110
|
+
*/
|
|
111
|
+
static readonly Attributes: IChannelAttributes;
|
|
112
|
+
/**
|
|
113
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
114
|
+
*/
|
|
115
|
+
get type(): string;
|
|
116
|
+
/**
|
|
117
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
|
|
118
|
+
*/
|
|
119
|
+
get attributes(): IChannelAttributes;
|
|
120
|
+
/**
|
|
121
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
122
|
+
*/
|
|
123
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
|
|
124
|
+
/**
|
|
125
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
|
|
126
|
+
*/
|
|
127
|
+
create(runtime: IFluidDataStoreRuntime, id: string): ISharedObject;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { }
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { IChannelAttributes } from '@fluidframework/datastore-definitions';
|
|
2
|
+
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
3
|
+
import { IChannelServices } from '@fluidframework/datastore-definitions';
|
|
4
|
+
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
5
|
+
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
6
|
+
import { IFluidSerializer } from '@fluidframework/shared-object-base';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
import { ISharedObject } from '@fluidframework/shared-object-base';
|
|
9
|
+
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
10
|
+
import { Jsonable } from '@fluidframework/datastore-definitions';
|
|
11
|
+
import { SharedObject } from '@fluidframework/shared-object-base';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.
|
|
15
|
+
* The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
|
|
16
|
+
* the set of calls on this interface to set data should be the same. This is critical because the object does not
|
|
17
|
+
* generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare interface ISharedSummaryBlock extends ISharedObject {
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the given key from the map.
|
|
24
|
+
* @param key - Key to retrieve from.
|
|
25
|
+
* @returns The stored value, or undefined if the key is not set.
|
|
26
|
+
*/
|
|
27
|
+
get<T>(key: string): Jsonable<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the value stored at key to the provided value.
|
|
30
|
+
* @param key - Key to set at.
|
|
31
|
+
* @param value - Jsonable type value to set.
|
|
32
|
+
*/
|
|
33
|
+
set<T>(key: string, value: Jsonable<T>): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
38
|
+
* Data should be set in this object in response to a remote op.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
|
|
43
|
+
/**
|
|
44
|
+
* Create a new shared summary block
|
|
45
|
+
*
|
|
46
|
+
* @param runtime - data store runtime the new shared summary block belongs to.
|
|
47
|
+
* @param id - optional name of the shared summary block.
|
|
48
|
+
* @returns newly created shared summary block (but not attached yet).
|
|
49
|
+
*/
|
|
50
|
+
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
|
|
51
|
+
/**
|
|
52
|
+
* Get a factory for SharedSummaryBlock to register with the data store.
|
|
53
|
+
*
|
|
54
|
+
* @returns a factory that creates and loads SharedSummaryBlock.
|
|
55
|
+
*/
|
|
56
|
+
static getFactory(): IChannelFactory;
|
|
57
|
+
/**
|
|
58
|
+
* The data held by this object.
|
|
59
|
+
*/
|
|
60
|
+
private readonly data;
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
|
|
63
|
+
* be provided.
|
|
64
|
+
*
|
|
65
|
+
* @param id - optional name of the shared summary block.
|
|
66
|
+
* @param runtime - data store runtime thee object belongs to.
|
|
67
|
+
* @param attributes - The attributes for the object.
|
|
68
|
+
*/
|
|
69
|
+
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
|
|
70
|
+
/**
|
|
71
|
+
* {@inheritDoc ISharedSummaryBlock.get}
|
|
72
|
+
*/
|
|
73
|
+
get<T>(key: string): Jsonable<T>;
|
|
74
|
+
/**
|
|
75
|
+
* {@inheritDoc ISharedSummaryBlock.set}
|
|
76
|
+
*/
|
|
77
|
+
set<T>(key: string, value: Jsonable<T>): void;
|
|
78
|
+
/**
|
|
79
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
|
|
80
|
+
*/
|
|
81
|
+
protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
|
|
82
|
+
/**
|
|
83
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
|
|
84
|
+
*/
|
|
85
|
+
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
|
|
88
|
+
*/
|
|
89
|
+
protected onDisconnect(): void;
|
|
90
|
+
/**
|
|
91
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
|
|
92
|
+
*/
|
|
93
|
+
protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
|
|
94
|
+
protected applyStashedOp(): void;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The factory that defines the shared summary block.
|
|
99
|
+
*
|
|
100
|
+
* @sealed
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
export declare class SharedSummaryBlockFactory implements IChannelFactory {
|
|
104
|
+
/**
|
|
105
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
106
|
+
*/
|
|
107
|
+
static readonly Type = "https://graph.microsoft.com/types/shared-summary-block";
|
|
108
|
+
/**
|
|
109
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
|
|
110
|
+
*/
|
|
111
|
+
static readonly Attributes: IChannelAttributes;
|
|
112
|
+
/**
|
|
113
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
114
|
+
*/
|
|
115
|
+
get type(): string;
|
|
116
|
+
/**
|
|
117
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
|
|
118
|
+
*/
|
|
119
|
+
get attributes(): IChannelAttributes;
|
|
120
|
+
/**
|
|
121
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
122
|
+
*/
|
|
123
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
|
|
124
|
+
/**
|
|
125
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
|
|
126
|
+
*/
|
|
127
|
+
create(runtime: IFluidDataStoreRuntime, id: string): ISharedObject;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { }
|
|
@@ -10,6 +10,8 @@ import { ISharedSummaryBlock } from "./interfaces";
|
|
|
10
10
|
/**
|
|
11
11
|
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
12
12
|
* Data should be set in this object in response to a remote op.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
13
15
|
*/
|
|
14
16
|
export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
|
|
15
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlock.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAEN,gBAAgB,EAChB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAYnD
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlock.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAEN,gBAAgB,EAChB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAYnD;;;;;GAKG;AACH,qBAAa,kBAAmB,SAAQ,YAAa,YAAW,mBAAmB;IAClF;;;;;;OAMG;WACW,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,CAAC,EAAE,MAAM;IAIjE;;;;OAIG;WACW,UAAU,IAAI,eAAe;IAI3C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+B;IAEpD;;;;;;;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"}
|
|
@@ -12,23 +12,10 @@ const snapshotFileName = "header";
|
|
|
12
12
|
/**
|
|
13
13
|
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
14
14
|
* Data should be set in this object in response to a remote op.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
15
17
|
*/
|
|
16
18
|
class SharedSummaryBlock extends shared_object_base_1.SharedObject {
|
|
17
|
-
/**
|
|
18
|
-
* Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
|
|
19
|
-
* be provided.
|
|
20
|
-
*
|
|
21
|
-
* @param id - optional name of the shared summary block.
|
|
22
|
-
* @param runtime - data store runtime thee object belongs to.
|
|
23
|
-
* @param attributes - The attributes for the object.
|
|
24
|
-
*/
|
|
25
|
-
constructor(id, runtime, attributes) {
|
|
26
|
-
super(id, runtime, attributes, "fluid_sharedSummaryBlock_");
|
|
27
|
-
/**
|
|
28
|
-
* The data held by this object.
|
|
29
|
-
*/
|
|
30
|
-
this.data = new Map();
|
|
31
|
-
}
|
|
32
19
|
/**
|
|
33
20
|
* Create a new shared summary block
|
|
34
21
|
*
|
|
@@ -47,6 +34,21 @@ class SharedSummaryBlock extends shared_object_base_1.SharedObject {
|
|
|
47
34
|
static getFactory() {
|
|
48
35
|
return new sharedSummaryBlockFactory_1.SharedSummaryBlockFactory();
|
|
49
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
|
|
39
|
+
* be provided.
|
|
40
|
+
*
|
|
41
|
+
* @param id - optional name of the shared summary block.
|
|
42
|
+
* @param runtime - data store runtime thee object belongs to.
|
|
43
|
+
* @param attributes - The attributes for the object.
|
|
44
|
+
*/
|
|
45
|
+
constructor(id, runtime, attributes) {
|
|
46
|
+
super(id, runtime, attributes, "fluid_sharedSummaryBlock_");
|
|
47
|
+
/**
|
|
48
|
+
* The data held by this object.
|
|
49
|
+
*/
|
|
50
|
+
this.data = new Map();
|
|
51
|
+
}
|
|
50
52
|
/**
|
|
51
53
|
* {@inheritDoc ISharedSummaryBlock.get}
|
|
52
54
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlock.js","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAWH,+DAA4D;AAC5D,2EAI4C;AAC5C,2EAAwE;AAGxE,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAUlC
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlock.js","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAWH,+DAA4D;AAC5D,2EAI4C;AAC5C,2EAAwE;AAGxE,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAUlC;;;;;GAKG;AACH,MAAa,kBAAmB,SAAQ,iCAAY;IACnD;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,qDAAyB,CAAC,IAAI,CAAuB,CAAC;IACxF,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,qDAAyB,EAAE,CAAC;IACxC,CAAC;IAOD;;;;;;;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,EAAoB,CAAC;IAYpD,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,4CAAuB,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,2BAAY,EAClC,OAAO,EACP,gBAAgB,CAChB,CAAC;QACF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACpD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC1B;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;AA7FD,gDA6FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n\tJsonable,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport { readAndParse } from \"@fluidframework/driver-utils\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\nimport { SharedSummaryBlockFactory } from \"./sharedSummaryBlockFactory\";\nimport { ISharedSummaryBlock } from \"./interfaces\";\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;\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 *\n * @public\n */\nexport class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {\n\t/**\n\t * Create a new shared summary block\n\t *\n\t * @param runtime - data store runtime the new shared summary block belongs to.\n\t * @param id - optional name of the shared summary block.\n\t * @returns newly created shared summary block (but not attached yet).\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SharedSummaryBlockFactory.Type) as SharedSummaryBlock;\n\t}\n\n\t/**\n\t * Get a factory for SharedSummaryBlock to register with the data store.\n\t *\n\t * @returns a factory that creates and loads SharedSummaryBlock.\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new SharedSummaryBlockFactory();\n\t}\n\n\t/**\n\t * The data held by this object.\n\t */\n\tprivate readonly data = new Map<string, Jsonable>();\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"]}
|
|
@@ -6,7 +6,9 @@ import { IChannelAttributes, IFluidDataStoreRuntime, IChannelServices, IChannelF
|
|
|
6
6
|
import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
7
7
|
/**
|
|
8
8
|
* The factory that defines the shared summary block.
|
|
9
|
+
*
|
|
9
10
|
* @sealed
|
|
11
|
+
* @public
|
|
10
12
|
*/
|
|
11
13
|
export declare class SharedSummaryBlockFactory implements IChannelFactory {
|
|
12
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlockFactory.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAInE
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlockFactory.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAInE;;;;;GAKG;AACH,qBAAa,yBAA0B,YAAW,eAAe;IAChE;;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,aAAa,CAAC;IAOzB;;OAEG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa;CAUzE"}
|
|
@@ -9,7 +9,9 @@ const packageVersion_1 = require("./packageVersion");
|
|
|
9
9
|
const sharedSummaryBlock_1 = require("./sharedSummaryBlock");
|
|
10
10
|
/**
|
|
11
11
|
* The factory that defines the shared summary block.
|
|
12
|
+
*
|
|
12
13
|
* @sealed
|
|
14
|
+
* @public
|
|
13
15
|
*/
|
|
14
16
|
class SharedSummaryBlockFactory {
|
|
15
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlockFactory.js","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,qDAA8C;AAC9C,6DAA0D;AAE1D
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlockFactory.js","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,qDAA8C;AAC9C,6DAA0D;AAE1D;;;;;GAKG;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,uCAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3E,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,uCAAkB,CAChD,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,2BAAU;CAC1B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SharedSummaryBlock } from \"./sharedSummaryBlock\";\n\n/**\n * The factory that defines the shared summary block.\n *\n * @sealed\n * @public\n */\nexport class SharedSummaryBlockFactory implements IChannelFactory {\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<ISharedObject> {\n\t\tconst sharedSummaryBlock = new SharedSummaryBlock(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): ISharedObject {\n\t\tconst sharedSummaryBlock = new SharedSummaryBlock(\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"]}
|
package/dist/tsdoc-metadata.json
CHANGED
package/lib/interfaces.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
|
9
9
|
* The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
|
|
10
10
|
* the set of calls on this interface to set data should be the same. This is critical because the object does not
|
|
11
11
|
* generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
12
14
|
*/
|
|
13
15
|
export interface ISharedSummaryBlock extends ISharedObject {
|
|
14
16
|
/**
|
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,uCAAuC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACzD;;;;OAIG;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\";\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 */\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\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\";\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 *\n * @public\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\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-internal.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.7.1.0";
|
|
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-internal.
|
|
8
|
+
export const pkgVersion = "2.0.0-internal.7.1.0";
|
|
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,sBAAsB,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-internal.
|
|
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,sBAAsB,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-internal.7.1.0\";\n"]}
|
|
@@ -10,6 +10,8 @@ import { ISharedSummaryBlock } from "./interfaces";
|
|
|
10
10
|
/**
|
|
11
11
|
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
12
12
|
* Data should be set in this object in response to a remote op.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
13
15
|
*/
|
|
14
16
|
export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
|
|
15
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlock.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAEN,gBAAgB,EAChB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAYnD
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlock.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAEN,gBAAgB,EAChB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAYnD;;;;;GAKG;AACH,qBAAa,kBAAmB,SAAQ,YAAa,YAAW,mBAAmB;IAClF;;;;;;OAMG;WACW,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,CAAC,EAAE,MAAM;IAIjE;;;;OAIG;WACW,UAAU,IAAI,eAAe;IAI3C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+B;IAEpD;;;;;;;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"}
|
|
@@ -9,23 +9,10 @@ const snapshotFileName = "header";
|
|
|
9
9
|
/**
|
|
10
10
|
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
11
11
|
* Data should be set in this object in response to a remote op.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
12
14
|
*/
|
|
13
15
|
export class SharedSummaryBlock extends SharedObject {
|
|
14
|
-
/**
|
|
15
|
-
* Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
|
|
16
|
-
* be provided.
|
|
17
|
-
*
|
|
18
|
-
* @param id - optional name of the shared summary block.
|
|
19
|
-
* @param runtime - data store runtime thee object belongs to.
|
|
20
|
-
* @param attributes - The attributes for the object.
|
|
21
|
-
*/
|
|
22
|
-
constructor(id, runtime, attributes) {
|
|
23
|
-
super(id, runtime, attributes, "fluid_sharedSummaryBlock_");
|
|
24
|
-
/**
|
|
25
|
-
* The data held by this object.
|
|
26
|
-
*/
|
|
27
|
-
this.data = new Map();
|
|
28
|
-
}
|
|
29
16
|
/**
|
|
30
17
|
* Create a new shared summary block
|
|
31
18
|
*
|
|
@@ -44,6 +31,21 @@ export class SharedSummaryBlock extends SharedObject {
|
|
|
44
31
|
static getFactory() {
|
|
45
32
|
return new SharedSummaryBlockFactory();
|
|
46
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
|
|
36
|
+
* be provided.
|
|
37
|
+
*
|
|
38
|
+
* @param id - optional name of the shared summary block.
|
|
39
|
+
* @param runtime - data store runtime thee object belongs to.
|
|
40
|
+
* @param attributes - The attributes for the object.
|
|
41
|
+
*/
|
|
42
|
+
constructor(id, runtime, attributes) {
|
|
43
|
+
super(id, runtime, attributes, "fluid_sharedSummaryBlock_");
|
|
44
|
+
/**
|
|
45
|
+
* The data held by this object.
|
|
46
|
+
*/
|
|
47
|
+
this.data = new Map();
|
|
48
|
+
}
|
|
47
49
|
/**
|
|
48
50
|
* {@inheritDoc ISharedSummaryBlock.get}
|
|
49
51
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlock.js","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EACN,uBAAuB,EAEvB,YAAY,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAUlC
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlock.js","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EACN,uBAAuB,EAEvB,YAAY,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAUlC;;;;;GAKG;AACH,MAAM,OAAO,kBAAmB,SAAQ,YAAY;IACnD;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,yBAAyB,CAAC,IAAI,CAAuB,CAAC;IACxF,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,yBAAyB,EAAE,CAAC;IACxC,CAAC;IAOD;;;;;;;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,EAAoB,CAAC;IAYpD,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;YACpD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC1B;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 { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n\tJsonable,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport { readAndParse } from \"@fluidframework/driver-utils\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\nimport { SharedSummaryBlockFactory } from \"./sharedSummaryBlockFactory\";\nimport { ISharedSummaryBlock } from \"./interfaces\";\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;\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 *\n * @public\n */\nexport class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {\n\t/**\n\t * Create a new shared summary block\n\t *\n\t * @param runtime - data store runtime the new shared summary block belongs to.\n\t * @param id - optional name of the shared summary block.\n\t * @returns newly created shared summary block (but not attached yet).\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SharedSummaryBlockFactory.Type) as SharedSummaryBlock;\n\t}\n\n\t/**\n\t * Get a factory for SharedSummaryBlock to register with the data store.\n\t *\n\t * @returns a factory that creates and loads SharedSummaryBlock.\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new SharedSummaryBlockFactory();\n\t}\n\n\t/**\n\t * The data held by this object.\n\t */\n\tprivate readonly data = new Map<string, Jsonable>();\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"]}
|
|
@@ -6,7 +6,9 @@ import { IChannelAttributes, IFluidDataStoreRuntime, IChannelServices, IChannelF
|
|
|
6
6
|
import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
7
7
|
/**
|
|
8
8
|
* The factory that defines the shared summary block.
|
|
9
|
+
*
|
|
9
10
|
* @sealed
|
|
11
|
+
* @public
|
|
10
12
|
*/
|
|
11
13
|
export declare class SharedSummaryBlockFactory implements IChannelFactory {
|
|
12
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlockFactory.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAInE
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlockFactory.d.ts","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAInE;;;;;GAKG;AACH,qBAAa,yBAA0B,YAAW,eAAe;IAChE;;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,aAAa,CAAC;IAOzB;;OAEG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa;CAUzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedSummaryBlockFactory.js","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"sharedSummaryBlockFactory.js","sourceRoot":"","sources":["../src/sharedSummaryBlockFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;GAKG;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,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3E,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,kBAAkB,CAChD,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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SharedSummaryBlock } from \"./sharedSummaryBlock\";\n\n/**\n * The factory that defines the shared summary block.\n *\n * @sealed\n * @public\n */\nexport class SharedSummaryBlockFactory implements IChannelFactory {\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<ISharedObject> {\n\t\tconst sharedSummaryBlock = new SharedSummaryBlock(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): ISharedObject {\n\t\tconst sharedSummaryBlock = new SharedSummaryBlock(\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/shared-summary-block",
|
|
3
|
-
"version": "2.0.0-internal.
|
|
3
|
+
"version": "2.0.0-internal.7.1.0",
|
|
4
4
|
"description": "A DDS that does not generate ops but is part of summary",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
"temp-directory": "nyc/.nyc_output"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.
|
|
39
|
-
"@fluidframework/datastore-definitions": ">=2.0.0-internal.
|
|
40
|
-
"@fluidframework/driver-utils": ">=2.0.0-internal.
|
|
41
|
-
"@fluidframework/protocol-definitions": "^
|
|
42
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-internal.
|
|
43
|
-
"@fluidframework/shared-object-base": ">=2.0.0-internal.
|
|
38
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
39
|
+
"@fluidframework/datastore-definitions": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
40
|
+
"@fluidframework/driver-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
41
|
+
"@fluidframework/protocol-definitions": "^3.0.0",
|
|
42
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
43
|
+
"@fluidframework/shared-object-base": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@fluid-tools/build-cli": "^0.
|
|
47
|
-
"@fluidframework/build-common": "^2.0.
|
|
48
|
-
"@fluidframework/build-tools": "^0.
|
|
49
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
50
|
-
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.
|
|
51
|
-
"@fluidframework/shared-summary-block-previous": "npm:@fluidframework/shared-summary-block@2.0.0-internal.
|
|
52
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.
|
|
53
|
-
"@microsoft/api-extractor": "^7.
|
|
46
|
+
"@fluid-tools/build-cli": "^0.25.0",
|
|
47
|
+
"@fluidframework/build-common": "^2.0.1",
|
|
48
|
+
"@fluidframework/build-tools": "^0.25.0",
|
|
49
|
+
"@fluidframework/eslint-config-fluid": "^3.0.0",
|
|
50
|
+
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
51
|
+
"@fluidframework/shared-summary-block-previous": "npm:@fluidframework/shared-summary-block@2.0.0-internal.7.0.0",
|
|
52
|
+
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
53
|
+
"@microsoft/api-extractor": "^7.37.0",
|
|
54
54
|
"@types/benchmark": "^2.1.0",
|
|
55
55
|
"@types/mocha": "^9.1.1",
|
|
56
56
|
"@types/node": "^16.18.38",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"c8": "^7.7.1",
|
|
59
59
|
"copyfiles": "^2.4.1",
|
|
60
60
|
"cross-env": "^7.0.3",
|
|
61
|
-
"eslint": "~8.
|
|
61
|
+
"eslint": "~8.50.0",
|
|
62
62
|
"mocha": "^10.2.0",
|
|
63
63
|
"mocha-json-output-reporter": "^2.0.1",
|
|
64
64
|
"mocha-multi-reporters": "^1.5.1",
|
|
65
65
|
"moment": "^2.21.0",
|
|
66
|
-
"prettier": "~
|
|
66
|
+
"prettier": "~3.0.3",
|
|
67
67
|
"rimraf": "^4.4.0",
|
|
68
|
-
"typescript": "~
|
|
68
|
+
"typescript": "~5.1.6"
|
|
69
69
|
},
|
|
70
70
|
"typeValidation": {
|
|
71
71
|
"broken": {}
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
76
76
|
"build:compile": "fluid-build . --task compile",
|
|
77
77
|
"build:compile:min": "npm run build:compile",
|
|
78
|
-
"build:docs": "api-extractor run --local
|
|
78
|
+
"build:docs": "api-extractor run --local",
|
|
79
79
|
"build:esnext": "tsc --project ./tsconfig.esnext.json",
|
|
80
80
|
"build:genver": "gen-version",
|
|
81
81
|
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
82
|
-
"ci:build:docs": "api-extractor run
|
|
82
|
+
"ci:build:docs": "api-extractor run",
|
|
83
83
|
"clean": "rimraf --glob 'dist' 'lib' '*.tsbuildinfo' '*.build.log' '_api-extractor-temp' 'nyc'",
|
|
84
84
|
"eslint": "eslint --format stylish src",
|
|
85
85
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
package/src/interfaces.ts
CHANGED
|
@@ -11,6 +11,8 @@ import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
|
11
11
|
* The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
|
|
12
12
|
* the set of calls on this interface to set data should be the same. This is critical because the object does not
|
|
13
13
|
* generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
14
16
|
*/
|
|
15
17
|
export interface ISharedSummaryBlock extends ISharedObject {
|
|
16
18
|
/**
|
package/src/packageVersion.ts
CHANGED
|
@@ -34,6 +34,8 @@ interface ISharedSummaryBlockDataSerializable {
|
|
|
34
34
|
/**
|
|
35
35
|
* Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
|
|
36
36
|
* Data should be set in this object in response to a remote op.
|
|
37
|
+
*
|
|
38
|
+
* @public
|
|
37
39
|
*/
|
|
38
40
|
export class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
|
|
39
41
|
/**
|