@fluidframework/shared-summary-block 1.4.0-121020 → 2.0.0-dev-rc.1.0.0.224419

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 (83) hide show
  1. package/.eslintrc.js +5 -7
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +135 -0
  4. package/README.md +22 -1
  5. package/api-extractor-lint.json +4 -0
  6. package/api-extractor.json +2 -2
  7. package/api-report/shared-summary-block.api.md +62 -0
  8. package/dist/index.cjs +12 -0
  9. package/dist/index.cjs.map +1 -0
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/{interfaces.js → interfaces.cjs} +1 -1
  13. package/dist/interfaces.cjs.map +1 -0
  14. package/dist/interfaces.d.ts +4 -0
  15. package/dist/interfaces.d.ts.map +1 -1
  16. package/dist/{packageVersion.js → packageVersion.cjs} +2 -2
  17. package/dist/packageVersion.cjs.map +1 -0
  18. package/dist/packageVersion.d.ts +1 -1
  19. package/dist/packageVersion.d.ts.map +1 -1
  20. package/dist/shared-summary-block-alpha.d.ts +100 -0
  21. package/dist/shared-summary-block-beta.d.ts +21 -0
  22. package/dist/shared-summary-block-public.d.ts +21 -0
  23. package/dist/shared-summary-block-untrimmed.d.ts +131 -0
  24. package/dist/{sharedSummaryBlock.js → sharedSummaryBlock.cjs} +18 -17
  25. package/dist/sharedSummaryBlock.cjs.map +1 -0
  26. package/dist/sharedSummaryBlock.d.ts +1 -0
  27. package/dist/sharedSummaryBlock.d.ts.map +1 -1
  28. package/dist/{sharedSummaryBlockFactory.js → sharedSummaryBlockFactory.cjs} +5 -3
  29. package/dist/sharedSummaryBlockFactory.cjs.map +1 -0
  30. package/dist/sharedSummaryBlockFactory.d.ts +2 -0
  31. package/dist/sharedSummaryBlockFactory.d.ts.map +1 -1
  32. package/dist/tsdoc-metadata.json +11 -0
  33. package/lib/index.d.mts +8 -0
  34. package/lib/index.d.mts.map +1 -0
  35. package/lib/index.mjs +7 -0
  36. package/lib/index.mjs.map +1 -0
  37. package/lib/{interfaces.d.ts → interfaces.d.mts} +4 -0
  38. package/lib/interfaces.d.mts.map +1 -0
  39. package/lib/{interfaces.js → interfaces.mjs} +1 -1
  40. package/lib/interfaces.mjs.map +1 -0
  41. package/lib/{packageVersion.d.ts → packageVersion.d.mts} +1 -1
  42. package/lib/{packageVersion.d.ts.map → packageVersion.d.mts.map} +1 -1
  43. package/lib/{packageVersion.js → packageVersion.mjs} +2 -2
  44. package/lib/packageVersion.mjs.map +1 -0
  45. package/lib/shared-summary-block-alpha.d.mts +100 -0
  46. package/lib/shared-summary-block-beta.d.mts +21 -0
  47. package/lib/shared-summary-block-public.d.mts +21 -0
  48. package/lib/shared-summary-block-untrimmed.d.mts +131 -0
  49. package/lib/{sharedSummaryBlock.d.ts → sharedSummaryBlock.d.mts} +2 -1
  50. package/lib/sharedSummaryBlock.d.mts.map +1 -0
  51. package/lib/{sharedSummaryBlock.js → sharedSummaryBlock.mjs} +18 -17
  52. package/lib/sharedSummaryBlock.mjs.map +1 -0
  53. package/lib/{sharedSummaryBlockFactory.d.ts → sharedSummaryBlockFactory.d.mts} +2 -0
  54. package/lib/sharedSummaryBlockFactory.d.mts.map +1 -0
  55. package/lib/{sharedSummaryBlockFactory.js → sharedSummaryBlockFactory.mjs} +5 -3
  56. package/lib/sharedSummaryBlockFactory.mjs.map +1 -0
  57. package/package.json +95 -62
  58. package/prettier.config.cjs +8 -0
  59. package/src/index.ts +3 -3
  60. package/src/interfaces.ts +16 -12
  61. package/src/packageVersion.ts +1 -1
  62. package/src/sharedSummaryBlock.ts +92 -88
  63. package/src/sharedSummaryBlockFactory.ts +56 -51
  64. package/tsc-multi.test.json +4 -0
  65. package/tsconfig.json +11 -13
  66. package/dist/index.js +0 -20
  67. package/dist/index.js.map +0 -1
  68. package/dist/interfaces.js.map +0 -1
  69. package/dist/packageVersion.js.map +0 -1
  70. package/dist/sharedSummaryBlock.js.map +0 -1
  71. package/dist/sharedSummaryBlockFactory.js.map +0 -1
  72. package/lib/index.d.ts +0 -8
  73. package/lib/index.d.ts.map +0 -1
  74. package/lib/index.js +0 -8
  75. package/lib/index.js.map +0 -1
  76. package/lib/interfaces.d.ts.map +0 -1
  77. package/lib/interfaces.js.map +0 -1
  78. package/lib/packageVersion.js.map +0 -1
  79. package/lib/sharedSummaryBlock.d.ts.map +0 -1
  80. package/lib/sharedSummaryBlock.js.map +0 -1
  81. package/lib/sharedSummaryBlockFactory.d.ts.map +0 -1
  82. package/lib/sharedSummaryBlockFactory.js.map +0 -1
  83. package/tsconfig.esnext.json +0 -7
package/.eslintrc.js CHANGED
@@ -4,10 +4,8 @@
4
4
  */
5
5
 
6
6
  module.exports = {
7
- "extends": [
8
- require.resolve("@fluidframework/eslint-config-fluid")
9
- ],
10
- "parserOptions": {
11
- "project": ["./tsconfig.json", "./src/test/tsconfig.json"]
12
- },
13
- }
7
+ extends: [require.resolve("@fluidframework/eslint-config-fluid/minimal"), "prettier"],
8
+ parserOptions: {
9
+ project: ["./tsconfig.json", "./src/test/tsconfig.json"],
10
+ },
11
+ };
package/.mocharc.js ADDED
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ "use strict";
7
+
8
+ const getFluidTestMochaConfig = require("@fluidframework/mocha-test-setup/mocharc-common");
9
+
10
+ const packageDir = __dirname;
11
+ const config = getFluidTestMochaConfig(packageDir);
12
+ module.exports = config;
package/CHANGELOG.md ADDED
@@ -0,0 +1,135 @@
1
+ # @fluidframework/shared-summary-block
2
+
3
+ ## 2.0.0-internal.8.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - datastore-definitions: Jsonable and Serializable now require a generic parameter [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
8
+
9
+ The `Jsonable` and `Serializable` types from @fluidframework/datastore-definitions now require a generic parameter and
10
+ if that type is `any` or `unknown`will return a new result `JsonableTypeWith<>` that more accurately represents the
11
+ limitation of serialization.
12
+
13
+ Additional modifications:
14
+
15
+ - `Jsonable`'s `TReplacement` parameter default has also been changed from `void` to `never`, which now disallows
16
+ `void`.
17
+ - Unrecognized primitive types like `symbol` are now filtered to `never` instead of `{}`.
18
+ - Recursive types with arrays (`[]`) are now supported.
19
+
20
+ `Serializable` is commonly used for DDS values and now requires more precision when using them. For example SharedMatrix
21
+ (unqualified) has an `any` default that meant values were `Serializable<any>` (i.e. `any`), but now `Serializable<any>`
22
+ is `JsonableTypeWith<IFluidHandle>` which may be problematic for reading or writing. Preferred correction is to specify
23
+ the value type but casting through `any` may provide a quick fix.
24
+
25
+ ## 2.0.0-internal.7.4.0
26
+
27
+ Dependency updates only.
28
+
29
+ ## 2.0.0-internal.7.3.0
30
+
31
+ Dependency updates only.
32
+
33
+ ## 2.0.0-internal.7.2.0
34
+
35
+ Dependency updates only.
36
+
37
+ ## 2.0.0-internal.7.1.0
38
+
39
+ Dependency updates only.
40
+
41
+ ## 2.0.0-internal.7.0.0
42
+
43
+ ### Major Changes
44
+
45
+ - Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
46
+
47
+ This included the following changes from the protocol-definitions release:
48
+
49
+ - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
50
+ submitted by clients to the server and the resulting signals sent from the server to clients.
51
+ - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
52
+ been added, which will be the typing for signals sent from the client to the server. Both extend a new
53
+ ISignalMessageBase interface that contains common members.
54
+ - The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
55
+
56
+ - Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
57
+
58
+ Dependencies on the following Fluid server package have been updated to version 2.0.1:
59
+
60
+ - @fluidframework/gitresources: 2.0.1
61
+ - @fluidframework/server-kafka-orderer: 2.0.1
62
+ - @fluidframework/server-lambdas: 2.0.1
63
+ - @fluidframework/server-lambdas-driver: 2.0.1
64
+ - @fluidframework/server-local-server: 2.0.1
65
+ - @fluidframework/server-memory-orderer: 2.0.1
66
+ - @fluidframework/protocol-base: 2.0.1
67
+ - @fluidframework/server-routerlicious: 2.0.1
68
+ - @fluidframework/server-routerlicious-base: 2.0.1
69
+ - @fluidframework/server-services: 2.0.1
70
+ - @fluidframework/server-services-client: 2.0.1
71
+ - @fluidframework/server-services-core: 2.0.1
72
+ - @fluidframework/server-services-ordering-kafkanode: 2.0.1
73
+ - @fluidframework/server-services-ordering-rdkafka: 2.0.1
74
+ - @fluidframework/server-services-ordering-zookeeper: 2.0.1
75
+ - @fluidframework/server-services-shared: 2.0.1
76
+ - @fluidframework/server-services-telemetry: 2.0.1
77
+ - @fluidframework/server-services-utils: 2.0.1
78
+ - @fluidframework/server-test-utils: 2.0.1
79
+ - tinylicious: 2.0.1
80
+
81
+ - Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
82
+
83
+ The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
84
+
85
+ ## 2.0.0-internal.6.4.0
86
+
87
+ Dependency updates only.
88
+
89
+ ## 2.0.0-internal.6.3.0
90
+
91
+ Dependency updates only.
92
+
93
+ ## 2.0.0-internal.6.2.0
94
+
95
+ Dependency updates only.
96
+
97
+ ## 2.0.0-internal.6.1.0
98
+
99
+ Dependency updates only.
100
+
101
+ ## 2.0.0-internal.6.0.0
102
+
103
+ ### Major Changes
104
+
105
+ - Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
106
+
107
+ Upgraded typescript transpilation target to ES2020. This is done in order to decrease the bundle sizes of Fluid Framework packages. This has provided size improvements across the board for ex. Loader, Driver, Runtime etc. Reduced bundle sizes helps to load lesser code in apps and hence also helps to improve the perf.If any app wants to target any older versions of browsers with which this target version is not compatible, then they can use packages like babel to transpile to a older target.
108
+
109
+ ## 2.0.0-internal.5.4.0
110
+
111
+ Dependency updates only.
112
+
113
+ ## 2.0.0-internal.5.3.0
114
+
115
+ Dependency updates only.
116
+
117
+ ## 2.0.0-internal.5.2.0
118
+
119
+ Dependency updates only.
120
+
121
+ ## 2.0.0-internal.5.1.0
122
+
123
+ Dependency updates only.
124
+
125
+ ## 2.0.0-internal.5.0.0
126
+
127
+ Dependency updates only.
128
+
129
+ ## 2.0.0-internal.4.4.0
130
+
131
+ Dependency updates only.
132
+
133
+ ## 2.0.0-internal.4.1.0
134
+
135
+ Dependency updates only.
package/README.md CHANGED
@@ -1,4 +1,25 @@
1
1
  # @fluidframework/shared-summary-block
2
2
 
3
3
  SharedSummaryBlock is a DDS that does not generate ops but is part of the summary. The name block comes from the fact that the data in this object is shared across clients only via summary blocks.
4
- The data on this object must only be set in response to a remote op. Basically, if we replay same ops, the set of calls on this object to set data should be the same. This is critical because it does not generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
4
+ The data on this object must only be set in response to a remote op. Basically, if we replay same ops, the set of calls on this object to set data should be the same. This is critical because it does not generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
5
+
6
+ <!-- AUTO-GENERATED-CONTENT:START (README_DEPENDENCY_GUIDELINES_SECTION:includeHeading=TRUE) -->
7
+
8
+ <!-- prettier-ignore-start -->
9
+ <!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
10
+
11
+ ## Using Fluid Framework libraries
12
+
13
+ When taking a dependency on a Fluid Framework library, we recommend using a `^` (caret) version range, such as `^1.3.4`.
14
+ While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
15
+ library consumers should always prefer `^`.
16
+
17
+ Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
18
+ you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
19
+ Standard `^` and `~` ranges will not work as expected.
20
+ See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
21
+ package for more information including tools to convert between version schemes.
22
+
23
+ <!-- prettier-ignore-end -->
24
+
25
+ <!-- AUTO-GENERATED-CONTENT:END -->
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "../../../common/build/build-common/api-extractor-lint.json"
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "@fluidframework/build-common/api-extractor-common-report.json"
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "../../../common/build/build-common/api-extractor-base.json"
4
4
  }
@@ -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
+ // @alpha
20
+ export interface ISharedSummaryBlock extends ISharedObject {
21
+ get<T>(key: string): Jsonable<T>;
22
+ set<T>(key: string, value: Jsonable<T>): void;
23
+ }
24
+
25
+ // @alpha
26
+ export class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
27
+ constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
28
+ // (undocumented)
29
+ protected applyStashedOp(): void;
30
+ static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
31
+ get<T>(key: string): Jsonable<T>;
32
+ static getFactory(): IChannelFactory;
33
+ // (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
+ // @internal @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/index.cjs ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /*!
3
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.SharedSummaryBlockFactory = exports.SharedSummaryBlock = void 0;
8
+ var sharedSummaryBlock_1 = require("./sharedSummaryBlock.cjs");
9
+ Object.defineProperty(exports, "SharedSummaryBlock", { enumerable: true, get: function () { return sharedSummaryBlock_1.SharedSummaryBlock; } });
10
+ var sharedSummaryBlockFactory_1 = require("./sharedSummaryBlockFactory.cjs");
11
+ Object.defineProperty(exports, "SharedSummaryBlockFactory", { enumerable: true, get: function () { return sharedSummaryBlockFactory_1.SharedSummaryBlockFactory; } });
12
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,6EAAwE;AAA/D,sIAAA,yBAAyB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { ISharedSummaryBlock } from \"./interfaces\";\nexport { SharedSummaryBlock } from \"./sharedSummaryBlock\";\nexport { SharedSummaryBlockFactory } from \"./sharedSummaryBlockFactory\";\n"]}
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export * from "./interfaces";
6
- export * from "./sharedSummaryBlock";
7
- export * from "./sharedSummaryBlockFactory";
5
+ export { ISharedSummaryBlock } from "./interfaces";
6
+ export { SharedSummaryBlock } from "./sharedSummaryBlock";
7
+ export { SharedSummaryBlockFactory } from "./sharedSummaryBlockFactory";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -4,4 +4,4 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- //# sourceMappingURL=interfaces.js.map
7
+ //# sourceMappingURL=interfaces.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.cjs","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 * @alpha\n */\nexport interface ISharedSummaryBlock extends ISharedObject {\n\t/**\n\t * Retrieves the given key from the map.\n\t * @param key - Key to retrieve from.\n\t * @returns The stored value, or undefined if the key is not set.\n\t *\n\t * @privateRemarks\n\t * The return type is underspecified to allow for the possibility of objects with function or undefined values.\n\t */\n\tget<T>(key: string): Jsonable<T>;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at.\n\t * @param value - Jsonable type value to set.\n\t */\n\tset<T>(key: string, value: Jsonable<T>): void;\n}\n"]}
@@ -9,12 +9,16 @@ 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
+ * @alpha
12
13
  */
13
14
  export interface ISharedSummaryBlock extends ISharedObject {
14
15
  /**
15
16
  * Retrieves the given key from the map.
16
17
  * @param key - Key to retrieve from.
17
18
  * @returns The stored value, or undefined if the key is not set.
19
+ *
20
+ * @privateRemarks
21
+ * The return type is underspecified to allow for the possibility of objects with function or undefined values.
18
22
  */
19
23
  get<T>(key: string): Jsonable<T>;
20
24
  /**
@@ -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;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACtD;;;;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;CACjD"}
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;;;;;;GAMG;AACH,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACzD;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEjC;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC9C"}
@@ -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 = "1.4.0-121020";
12
- //# sourceMappingURL=packageVersion.js.map
11
+ exports.pkgVersion = "2.0.0-dev-rc.1.0.0.224419";
12
+ //# sourceMappingURL=packageVersion.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packageVersion.cjs","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sCAAsC,CAAC;AACjD,QAAA,UAAU,GAAG,2BAA2B,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-dev-rc.1.0.0.224419\";\n"]}
@@ -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 = "1.4.0-121020";
8
+ export declare const pkgVersion = "2.0.0-dev-rc.1.0.0.224419";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,yCAAyC,CAAC;AAC9D,eAAO,MAAM,UAAU,iBAAiB,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,yCAAyC,CAAC;AAC9D,eAAO,MAAM,UAAU,8BAA8B,CAAC"}
@@ -0,0 +1,100 @@
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 { }
@@ -0,0 +1,21 @@
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: SharedSummaryBlock */
18
+
19
+ /* Excluded from this release type: SharedSummaryBlockFactory */
20
+
21
+ export { }
@@ -0,0 +1,21 @@
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: SharedSummaryBlock */
18
+
19
+ /* Excluded from this release type: SharedSummaryBlockFactory */
20
+
21
+ export { }
@@ -0,0 +1,131 @@
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 { }