@fluidframework/shared-summary-block 2.0.0-rc.2.0.2 → 2.0.0-rc.3.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/api-report/shared-summary-block.api.md +2 -2
  3. package/dist/interfaces.d.ts +1 -1
  4. package/dist/interfaces.d.ts.map +1 -1
  5. package/dist/interfaces.js.map +1 -1
  6. package/dist/legacy.d.ts +15 -0
  7. package/dist/packageVersion.d.ts +1 -1
  8. package/dist/packageVersion.js +1 -1
  9. package/dist/packageVersion.js.map +1 -1
  10. package/dist/public.d.ts +12 -0
  11. package/dist/sharedSummaryBlock.d.ts +4 -2
  12. package/dist/sharedSummaryBlock.d.ts.map +1 -1
  13. package/dist/sharedSummaryBlock.js +5 -5
  14. package/dist/sharedSummaryBlock.js.map +1 -1
  15. package/dist/sharedSummaryBlockFactory.d.ts +1 -1
  16. package/dist/sharedSummaryBlockFactory.d.ts.map +1 -1
  17. package/dist/sharedSummaryBlockFactory.js.map +1 -1
  18. package/internal.d.ts +11 -0
  19. package/legacy.d.ts +11 -0
  20. package/lib/interfaces.d.ts +1 -1
  21. package/lib/interfaces.d.ts.map +1 -1
  22. package/lib/interfaces.js.map +1 -1
  23. package/lib/legacy.d.ts +15 -0
  24. package/lib/packageVersion.d.ts +1 -1
  25. package/lib/packageVersion.js +1 -1
  26. package/lib/packageVersion.js.map +1 -1
  27. package/lib/public.d.ts +12 -0
  28. package/lib/sharedSummaryBlock.d.ts +4 -2
  29. package/lib/sharedSummaryBlock.d.ts.map +1 -1
  30. package/lib/sharedSummaryBlock.js +2 -2
  31. package/lib/sharedSummaryBlock.js.map +1 -1
  32. package/lib/sharedSummaryBlockFactory.d.ts +1 -1
  33. package/lib/sharedSummaryBlockFactory.d.ts.map +1 -1
  34. package/lib/sharedSummaryBlockFactory.js.map +1 -1
  35. package/package.json +31 -52
  36. package/src/interfaces.ts +1 -1
  37. package/src/packageVersion.ts +1 -1
  38. package/src/sharedSummaryBlock.ts +9 -11
  39. package/src/sharedSummaryBlockFactory.ts +3 -2
  40. package/api-extractor-cjs.json +0 -8
  41. package/dist/shared-summary-block-alpha.d.ts +0 -100
  42. package/dist/shared-summary-block-beta.d.ts +0 -23
  43. package/dist/shared-summary-block-public.d.ts +0 -23
  44. package/dist/shared-summary-block-untrimmed.d.ts +0 -131
  45. package/lib/shared-summary-block-alpha.d.ts +0 -100
  46. package/lib/shared-summary-block-beta.d.ts +0 -23
  47. package/lib/shared-summary-block-public.d.ts +0 -23
  48. package/lib/shared-summary-block-untrimmed.d.ts +0 -131
  49. package/lib/test/sharedSummaryBlock.spec.js +0 -80
  50. package/lib/test/sharedSummaryBlock.spec.js.map +0 -1
  51. package/lib/test/types/validateSharedSummaryBlockPrevious.generated.js +0 -8
  52. package/lib/test/types/validateSharedSummaryBlockPrevious.generated.js.map +0 -1
  53. /package/{dist → lib}/tsdoc-metadata.json +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/shared-summary-block",
3
- "version": "2.0.0-rc.2.0.2",
3
+ "version": "2.0.0-rc.3.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": {
@@ -15,31 +15,21 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "import": {
18
- "types": "./lib/index.d.ts",
19
- "default": "./lib/index.js"
20
- },
21
- "require": {
22
- "types": "./dist/index.d.ts",
23
- "default": "./dist/index.js"
24
- }
25
- },
26
- "./public": {
27
- "import": {
28
- "types": "./lib/shared-summary-block-public.d.ts",
18
+ "types": "./lib/public.d.ts",
29
19
  "default": "./lib/index.js"
30
20
  },
31
21
  "require": {
32
- "types": "./dist/shared-summary-block-public.d.ts",
22
+ "types": "./dist/public.d.ts",
33
23
  "default": "./dist/index.js"
34
24
  }
35
25
  },
36
- "./alpha": {
26
+ "./legacy": {
37
27
  "import": {
38
- "types": "./lib/shared-summary-block-alpha.d.ts",
28
+ "types": "./lib/legacy.d.ts",
39
29
  "default": "./lib/index.js"
40
30
  },
41
31
  "require": {
42
- "types": "./dist/shared-summary-block-alpha.d.ts",
32
+ "types": "./dist/legacy.d.ts",
43
33
  "default": "./dist/index.js"
44
34
  }
45
35
  },
@@ -54,8 +44,8 @@
54
44
  }
55
45
  }
56
46
  },
57
- "main": "dist/index.js",
58
- "types": "dist/index.d.ts",
47
+ "main": "lib/index.js",
48
+ "types": "lib/public.d.ts",
59
49
  "c8": {
60
50
  "all": true,
61
51
  "cache-dir": "nyc/.cache",
@@ -77,23 +67,24 @@
77
67
  "temp-directory": "nyc/.nyc_output"
78
68
  },
79
69
  "dependencies": {
80
- "@fluidframework/core-interfaces": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
81
- "@fluidframework/datastore-definitions": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
82
- "@fluidframework/driver-utils": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
70
+ "@fluidframework/core-interfaces": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
71
+ "@fluidframework/datastore-definitions": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
72
+ "@fluidframework/driver-utils": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
83
73
  "@fluidframework/protocol-definitions": "^3.2.0",
84
- "@fluidframework/runtime-definitions": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
85
- "@fluidframework/shared-object-base": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0"
74
+ "@fluidframework/runtime-definitions": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
75
+ "@fluidframework/shared-object-base": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0"
86
76
  },
87
77
  "devDependencies": {
88
- "@arethetypeswrong/cli": "^0.13.3",
89
- "@fluid-internal/mocha-test-setup": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
90
- "@fluid-tools/build-cli": "^0.34.0",
78
+ "@arethetypeswrong/cli": "^0.15.2",
79
+ "@biomejs/biome": "^1.6.2",
80
+ "@fluid-internal/mocha-test-setup": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
81
+ "@fluid-tools/build-cli": "^0.37.0",
91
82
  "@fluidframework/build-common": "^2.0.3",
92
- "@fluidframework/build-tools": "^0.34.0",
93
- "@fluidframework/container-definitions": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
94
- "@fluidframework/eslint-config-fluid": "^4.0.0",
83
+ "@fluidframework/build-tools": "^0.37.0",
84
+ "@fluidframework/container-definitions": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
85
+ "@fluidframework/eslint-config-fluid": "^5.1.0",
95
86
  "@fluidframework/shared-summary-block-previous": "npm:@fluidframework/shared-summary-block@2.0.0-internal.8.0.0",
96
- "@fluidframework/test-runtime-utils": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
87
+ "@fluidframework/test-runtime-utils": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
97
88
  "@microsoft/api-extractor": "^7.42.3",
98
89
  "@types/benchmark": "^2.1.0",
99
90
  "@types/mocha": "^9.1.1",
@@ -112,46 +103,34 @@
112
103
  "rimraf": "^4.4.0",
113
104
  "typescript": "~5.1.6"
114
105
  },
115
- "fluidBuild": {
116
- "tasks": {
117
- "build:docs": {
118
- "dependsOn": [
119
- "...",
120
- "api-extractor:commonjs",
121
- "api-extractor:esnext"
122
- ],
123
- "script": false
124
- }
125
- }
126
- },
127
106
  "typeValidation": {
128
107
  "broken": {}
129
108
  },
130
109
  "scripts": {
131
110
  "api": "fluid-build . --task api",
132
- "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
133
- "api-extractor:esnext": "api-extractor run --local",
111
+ "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist",
112
+ "api-extractor:esnext": "flub generate entrypoints --outFileAlpha legacy --outDir ./lib --node10TypeCompat",
134
113
  "build": "fluid-build . --task build",
135
114
  "build:commonjs": "fluid-build . --task commonjs",
136
115
  "build:compile": "fluid-build . --task compile",
137
116
  "build:compile:min": "npm run build:compile",
138
- "build:docs": "fluid-build . --task api",
117
+ "build:docs": "api-extractor run --local",
139
118
  "build:esnext": "tsc --project ./tsconfig.json",
140
119
  "build:genver": "gen-version",
141
120
  "build:test": "npm run build:test:esm && npm run build:test:cjs",
142
121
  "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
143
122
  "build:test:esm": "tsc --project ./src/test/tsconfig.json",
144
- "check:are-the-types-wrong": "attw --pack . --entrypoints .",
123
+ "check:are-the-types-wrong": "attw --pack .",
124
+ "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
145
125
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
146
126
  "ci:build:docs": "api-extractor run",
147
- "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
127
+ "clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
148
128
  "eslint": "eslint --format stylish src",
149
129
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
150
- "format": "npm run prettier:fix",
151
- "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
152
- "lint:fix": "npm run prettier:fix && npm run eslint:fix",
153
- "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
154
- "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
130
+ "format": "fluid-build --task format .",
131
+ "format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
132
+ "lint": "fluid-build . --task lint",
133
+ "lint:fix": "fluid-build . --task eslint:fix --task format",
155
134
  "test": "npm run test:mocha",
156
135
  "test:coverage": "c8 npm test",
157
136
  "test:mocha": "npm run test:mocha:esm && echo skipping cjs to avoid overhead - npm run test:mocha:cjs",
package/src/interfaces.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { Jsonable } from "@fluidframework/datastore-definitions";
6
+ import { Jsonable } from "@fluidframework/datastore-definitions/internal";
7
7
  import { ISharedObject } from "@fluidframework/shared-object-base";
8
8
 
9
9
  /**
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/shared-summary-block";
9
- export const pkgVersion = "2.0.0-rc.2.0.2";
9
+ export const pkgVersion = "2.0.0-rc.3.0.1";
@@ -3,23 +3,21 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
7
6
  import {
8
7
  IChannelAttributes,
9
- IFluidDataStoreRuntime,
10
- IChannelStorageService,
11
- Jsonable,
12
8
  IChannelFactory,
9
+ IChannelStorageService,
10
+ IFluidDataStoreRuntime,
13
11
  } from "@fluidframework/datastore-definitions";
12
+ import { Jsonable } from "@fluidframework/datastore-definitions/internal";
13
+ import { readAndParse } from "@fluidframework/driver-utils/internal";
14
+ import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
14
15
  import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
15
- import { readAndParse } from "@fluidframework/driver-utils";
16
- import {
17
- createSingleBlobSummary,
18
- IFluidSerializer,
19
- SharedObject,
20
- } from "@fluidframework/shared-object-base";
21
- import { SharedSummaryBlockFactory } from "./sharedSummaryBlockFactory.js";
16
+ import { IFluidSerializer } from "@fluidframework/shared-object-base";
17
+ import { SharedObject, createSingleBlobSummary } from "@fluidframework/shared-object-base/internal";
18
+
22
19
  import { ISharedSummaryBlock } from "./interfaces.js";
20
+ import { SharedSummaryBlockFactory } from "./sharedSummaryBlockFactory.js";
23
21
 
24
22
  const snapshotFileName = "header";
25
23
 
@@ -5,11 +5,12 @@
5
5
 
6
6
  import {
7
7
  IChannelAttributes,
8
- IFluidDataStoreRuntime,
9
- IChannelServices,
10
8
  IChannelFactory,
9
+ IChannelServices,
10
+ IFluidDataStoreRuntime,
11
11
  } from "@fluidframework/datastore-definitions";
12
12
  import { ISharedObject } from "@fluidframework/shared-object-base";
13
+
13
14
  import { pkgVersion } from "./packageVersion.js";
14
15
  import { SharedSummaryBlock } from "./sharedSummaryBlock.js";
15
16
 
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
4
- // CJS is actually secondary; so, no report.
5
- "apiReport": {
6
- "enabled": false
7
- }
8
- }
@@ -1,100 +0,0 @@
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
- * @alpha
19
- */
20
- export declare interface ISharedSummaryBlock extends ISharedObject {
21
- /**
22
- * Retrieves the given key from the map.
23
- * @param key - Key to retrieve from.
24
- * @returns The stored value, or undefined if the key is not set.
25
- *
26
- * @privateRemarks
27
- * The return type is underspecified to allow for the possibility of objects with function or undefined values.
28
- */
29
- get<T>(key: string): Jsonable<T>;
30
- /**
31
- * Sets the value stored at key to the provided value.
32
- * @param key - Key to set at.
33
- * @param value - Jsonable type value to set.
34
- */
35
- set<T>(key: string, value: Jsonable<T>): void;
36
- }
37
-
38
- /**
39
- * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
40
- * Data should be set in this object in response to a remote op.
41
- * @alpha
42
- */
43
- export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
44
- /**
45
- * Create a new shared summary block
46
- *
47
- * @param runtime - data store runtime the new shared summary block belongs to.
48
- * @param id - optional name of the shared summary block.
49
- * @returns newly created shared summary block (but not attached yet).
50
- */
51
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
52
- /**
53
- * Get a factory for SharedSummaryBlock to register with the data store.
54
- *
55
- * @returns a factory that creates and loads SharedSummaryBlock.
56
- */
57
- static getFactory(): IChannelFactory;
58
- /**
59
- * The data held by this object.
60
- */
61
- private readonly data;
62
- /**
63
- * Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
64
- * be provided.
65
- *
66
- * @param id - optional name of the shared summary block.
67
- * @param runtime - data store runtime thee object belongs to.
68
- * @param attributes - The attributes for the object.
69
- */
70
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
71
- /**
72
- * {@inheritDoc ISharedSummaryBlock.get}
73
- */
74
- get<T>(key: string): Jsonable<T>;
75
- /**
76
- * {@inheritDoc ISharedSummaryBlock.set}
77
- */
78
- set<T>(key: string, value: Jsonable<T>): void;
79
- /**
80
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
81
- */
82
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
83
- /**
84
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
85
- */
86
- protected loadCore(storage: IChannelStorageService): Promise<void>;
87
- /**
88
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
89
- */
90
- protected onDisconnect(): void;
91
- /**
92
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
93
- */
94
- protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
95
- protected applyStashedOp(): void;
96
- }
97
-
98
- /* Excluded from this release type: SharedSummaryBlockFactory */
99
-
100
- export { }
@@ -1,23 +0,0 @@
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
- /* Excluded from this release type: ISharedSummaryBlock */
14
-
15
- /* Excluded from this release type: Jsonable */
16
-
17
- /* Excluded from this release type: SharedObject */
18
-
19
- /* Excluded from this release type: SharedSummaryBlock */
20
-
21
- /* Excluded from this release type: SharedSummaryBlockFactory */
22
-
23
- export { }
@@ -1,23 +0,0 @@
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
- /* Excluded from this release type: ISharedSummaryBlock */
14
-
15
- /* Excluded from this release type: Jsonable */
16
-
17
- /* Excluded from this release type: SharedObject */
18
-
19
- /* Excluded from this release type: SharedSummaryBlock */
20
-
21
- /* Excluded from this release type: SharedSummaryBlockFactory */
22
-
23
- export { }
@@ -1,131 +0,0 @@
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
- * @alpha
19
- */
20
- export declare interface ISharedSummaryBlock extends ISharedObject {
21
- /**
22
- * Retrieves the given key from the map.
23
- * @param key - Key to retrieve from.
24
- * @returns The stored value, or undefined if the key is not set.
25
- *
26
- * @privateRemarks
27
- * The return type is underspecified to allow for the possibility of objects with function or undefined values.
28
- */
29
- get<T>(key: string): Jsonable<T>;
30
- /**
31
- * Sets the value stored at key to the provided value.
32
- * @param key - Key to set at.
33
- * @param value - Jsonable type value to set.
34
- */
35
- set<T>(key: string, value: Jsonable<T>): void;
36
- }
37
-
38
- /**
39
- * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
40
- * Data should be set in this object in response to a remote op.
41
- * @alpha
42
- */
43
- export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
44
- /**
45
- * Create a new shared summary block
46
- *
47
- * @param runtime - data store runtime the new shared summary block belongs to.
48
- * @param id - optional name of the shared summary block.
49
- * @returns newly created shared summary block (but not attached yet).
50
- */
51
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
52
- /**
53
- * Get a factory for SharedSummaryBlock to register with the data store.
54
- *
55
- * @returns a factory that creates and loads SharedSummaryBlock.
56
- */
57
- static getFactory(): IChannelFactory;
58
- /**
59
- * The data held by this object.
60
- */
61
- private readonly data;
62
- /**
63
- * Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
64
- * be provided.
65
- *
66
- * @param id - optional name of the shared summary block.
67
- * @param runtime - data store runtime thee object belongs to.
68
- * @param attributes - The attributes for the object.
69
- */
70
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
71
- /**
72
- * {@inheritDoc ISharedSummaryBlock.get}
73
- */
74
- get<T>(key: string): Jsonable<T>;
75
- /**
76
- * {@inheritDoc ISharedSummaryBlock.set}
77
- */
78
- set<T>(key: string, value: Jsonable<T>): void;
79
- /**
80
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
81
- */
82
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
83
- /**
84
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
85
- */
86
- protected loadCore(storage: IChannelStorageService): Promise<void>;
87
- /**
88
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
89
- */
90
- protected onDisconnect(): void;
91
- /**
92
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
93
- */
94
- protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
95
- protected applyStashedOp(): void;
96
- }
97
-
98
- /**
99
- * The factory that defines the shared summary block.
100
- *
101
- * @sealed
102
- * @internal
103
- */
104
- export declare class SharedSummaryBlockFactory implements IChannelFactory {
105
- /**
106
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
107
- */
108
- static readonly Type = "https://graph.microsoft.com/types/shared-summary-block";
109
- /**
110
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
111
- */
112
- static readonly Attributes: IChannelAttributes;
113
- /**
114
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
115
- */
116
- get type(): string;
117
- /**
118
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
119
- */
120
- get attributes(): IChannelAttributes;
121
- /**
122
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
123
- */
124
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
125
- /**
126
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
127
- */
128
- create(runtime: IFluidDataStoreRuntime, id: string): ISharedObject;
129
- }
130
-
131
- export { }
@@ -1,100 +0,0 @@
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
- * @alpha
19
- */
20
- export declare interface ISharedSummaryBlock extends ISharedObject {
21
- /**
22
- * Retrieves the given key from the map.
23
- * @param key - Key to retrieve from.
24
- * @returns The stored value, or undefined if the key is not set.
25
- *
26
- * @privateRemarks
27
- * The return type is underspecified to allow for the possibility of objects with function or undefined values.
28
- */
29
- get<T>(key: string): Jsonable<T>;
30
- /**
31
- * Sets the value stored at key to the provided value.
32
- * @param key - Key to set at.
33
- * @param value - Jsonable type value to set.
34
- */
35
- set<T>(key: string, value: Jsonable<T>): void;
36
- }
37
-
38
- /**
39
- * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
40
- * Data should be set in this object in response to a remote op.
41
- * @alpha
42
- */
43
- export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
44
- /**
45
- * Create a new shared summary block
46
- *
47
- * @param runtime - data store runtime the new shared summary block belongs to.
48
- * @param id - optional name of the shared summary block.
49
- * @returns newly created shared summary block (but not attached yet).
50
- */
51
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
52
- /**
53
- * Get a factory for SharedSummaryBlock to register with the data store.
54
- *
55
- * @returns a factory that creates and loads SharedSummaryBlock.
56
- */
57
- static getFactory(): IChannelFactory;
58
- /**
59
- * The data held by this object.
60
- */
61
- private readonly data;
62
- /**
63
- * Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
64
- * be provided.
65
- *
66
- * @param id - optional name of the shared summary block.
67
- * @param runtime - data store runtime thee object belongs to.
68
- * @param attributes - The attributes for the object.
69
- */
70
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
71
- /**
72
- * {@inheritDoc ISharedSummaryBlock.get}
73
- */
74
- get<T>(key: string): Jsonable<T>;
75
- /**
76
- * {@inheritDoc ISharedSummaryBlock.set}
77
- */
78
- set<T>(key: string, value: Jsonable<T>): void;
79
- /**
80
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
81
- */
82
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
83
- /**
84
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
85
- */
86
- protected loadCore(storage: IChannelStorageService): Promise<void>;
87
- /**
88
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
89
- */
90
- protected onDisconnect(): void;
91
- /**
92
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
93
- */
94
- protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
95
- protected applyStashedOp(): void;
96
- }
97
-
98
- /* Excluded from this release type: SharedSummaryBlockFactory */
99
-
100
- export { }
@@ -1,23 +0,0 @@
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
- /* Excluded from this release type: ISharedSummaryBlock */
14
-
15
- /* Excluded from this release type: Jsonable */
16
-
17
- /* Excluded from this release type: SharedObject */
18
-
19
- /* Excluded from this release type: SharedSummaryBlock */
20
-
21
- /* Excluded from this release type: SharedSummaryBlockFactory */
22
-
23
- export { }
@@ -1,23 +0,0 @@
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
- /* Excluded from this release type: ISharedSummaryBlock */
14
-
15
- /* Excluded from this release type: Jsonable */
16
-
17
- /* Excluded from this release type: SharedObject */
18
-
19
- /* Excluded from this release type: SharedSummaryBlock */
20
-
21
- /* Excluded from this release type: SharedSummaryBlockFactory */
22
-
23
- export { }