@fluidframework/fluid-static 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 (100) hide show
  1. package/.eslintrc.js +8 -10
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +225 -53
  4. package/README.md +38 -0
  5. package/api-extractor-lint.json +4 -0
  6. package/api-extractor.json +2 -2
  7. package/api-report/fluid-static.api.md +141 -0
  8. package/dist/fluid-static-alpha.d.ts +408 -0
  9. package/dist/fluid-static-beta.d.ts +412 -0
  10. package/dist/fluid-static-public.d.ts +412 -0
  11. package/dist/fluid-static-untrimmed.d.ts +452 -0
  12. package/dist/{fluidContainer.js → fluidContainer.cjs} +39 -12
  13. package/dist/fluidContainer.cjs.map +1 -0
  14. package/dist/fluidContainer.d.ts +95 -142
  15. package/dist/fluidContainer.d.ts.map +1 -1
  16. package/dist/index.cjs +19 -0
  17. package/dist/index.cjs.map +1 -0
  18. package/dist/index.d.ts +4 -4
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/{rootDataObject.js → rootDataObject.cjs} +59 -23
  21. package/dist/rootDataObject.cjs.map +1 -0
  22. package/dist/rootDataObject.d.ts +9 -59
  23. package/dist/rootDataObject.d.ts.map +1 -1
  24. package/dist/{serviceAudience.js → serviceAudience.cjs} +44 -20
  25. package/dist/serviceAudience.cjs.map +1 -0
  26. package/dist/serviceAudience.d.ts +7 -54
  27. package/dist/serviceAudience.d.ts.map +1 -1
  28. package/dist/tsdoc-metadata.json +11 -0
  29. package/dist/{types.js → types.cjs} +1 -1
  30. package/dist/types.cjs.map +1 -0
  31. package/dist/types.d.ts +130 -80
  32. package/dist/types.d.ts.map +1 -1
  33. package/dist/{utils.js → utils.cjs} +7 -9
  34. package/dist/utils.cjs.map +1 -0
  35. package/dist/utils.d.ts +10 -2
  36. package/dist/utils.d.ts.map +1 -1
  37. package/lib/fluid-static-alpha.d.mts +408 -0
  38. package/lib/fluid-static-beta.d.mts +412 -0
  39. package/lib/fluid-static-public.d.mts +412 -0
  40. package/lib/fluid-static-untrimmed.d.mts +452 -0
  41. package/lib/fluidContainer.d.mts +188 -0
  42. package/lib/fluidContainer.d.mts.map +1 -0
  43. package/lib/{fluidContainer.js → fluidContainer.mjs} +36 -13
  44. package/lib/fluidContainer.mjs.map +1 -0
  45. package/lib/index.d.mts +9 -0
  46. package/lib/index.d.mts.map +1 -0
  47. package/lib/index.mjs +8 -0
  48. package/lib/index.mjs.map +1 -0
  49. package/lib/rootDataObject.d.mts +20 -0
  50. package/lib/rootDataObject.d.mts.map +1 -0
  51. package/lib/{rootDataObject.js → rootDataObject.mjs} +61 -28
  52. package/lib/rootDataObject.mjs.map +1 -0
  53. package/lib/serviceAudience.d.mts +15 -0
  54. package/lib/serviceAudience.d.mts.map +1 -0
  55. package/lib/{serviceAudience.js → serviceAudience.mjs} +42 -18
  56. package/lib/serviceAudience.mjs.map +1 -0
  57. package/lib/types.d.mts +223 -0
  58. package/lib/types.d.mts.map +1 -0
  59. package/lib/{types.js → types.mjs} +1 -1
  60. package/lib/types.mjs.map +1 -0
  61. package/lib/{utils.d.ts → utils.d.mts} +11 -3
  62. package/lib/utils.d.mts.map +1 -0
  63. package/lib/{utils.js → utils.mjs} +7 -9
  64. package/lib/utils.mjs.map +1 -0
  65. package/package.json +130 -61
  66. package/prettier.config.cjs +8 -0
  67. package/src/fluidContainer.ts +316 -250
  68. package/src/index.ts +25 -4
  69. package/src/rootDataObject.ts +203 -157
  70. package/src/serviceAudience.ts +152 -124
  71. package/src/types.ts +190 -132
  72. package/src/utils.ts +44 -39
  73. package/tsc-multi.test.json +4 -0
  74. package/tsconfig.json +12 -16
  75. package/dist/fluidContainer.js.map +0 -1
  76. package/dist/index.js +0 -26
  77. package/dist/index.js.map +0 -1
  78. package/dist/rootDataObject.js.map +0 -1
  79. package/dist/serviceAudience.js.map +0 -1
  80. package/dist/types.js.map +0 -1
  81. package/dist/utils.js.map +0 -1
  82. package/lib/fluidContainer.d.ts +0 -235
  83. package/lib/fluidContainer.d.ts.map +0 -1
  84. package/lib/fluidContainer.js.map +0 -1
  85. package/lib/index.d.ts +0 -14
  86. package/lib/index.d.ts.map +0 -1
  87. package/lib/index.js +0 -14
  88. package/lib/index.js.map +0 -1
  89. package/lib/rootDataObject.d.ts +0 -70
  90. package/lib/rootDataObject.d.ts.map +0 -1
  91. package/lib/rootDataObject.js.map +0 -1
  92. package/lib/serviceAudience.d.ts +0 -62
  93. package/lib/serviceAudience.d.ts.map +0 -1
  94. package/lib/serviceAudience.js.map +0 -1
  95. package/lib/types.d.ts +0 -173
  96. package/lib/types.d.ts.map +0 -1
  97. package/lib/types.js.map +0 -1
  98. package/lib/utils.d.ts.map +0 -1
  99. package/lib/utils.js.map +0 -1
  100. package/tsconfig.esnext.json +0 -7
package/.eslintrc.js CHANGED
@@ -4,13 +4,11 @@
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
- "rules": {
14
- "@typescript-eslint/strict-boolean-expressions": "off"
15
- }
16
- }
7
+ extends: [require.resolve("@fluidframework/eslint-config-fluid/minimal"), "prettier"],
8
+ parserOptions: {
9
+ project: ["./tsconfig.json", "./src/test/tsconfig.json"],
10
+ },
11
+ rules: {
12
+ "@typescript-eslint/strict-boolean-expressions": "off",
13
+ },
14
+ };
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 CHANGED
@@ -1,29 +1,206 @@
1
- # Changes across versions for the Fluid-Static
2
-
3
- - [Changes across versions for the Fluid-Static](#changes-across-versions-for-the-fluid-static)
4
- - [0.39.0](#0390)
5
- - [[BREAKING] `'FluidStatic' instances have been moved to service specific packages`]
6
- (#fluidstatic-instances-have-been-moved-to-service-specific-packages)
7
- - [Example](#example-4)
8
- - [[BREAKING] `'ContainerConfig' has been renamed to 'ContainerSchema'`](#containerconfig-has-been-renamed-to-containerschema)
9
- - [0.38.0](#0380)
10
- - [DDS object types are now supported](#dds-object-types-are-now-supported)
11
- - [Example](#example)
12
- - [`initialObjects` are avaiable as an object on the FluidContainer](#initialobjects-are-avaiable-as-an-object-on-the-fluidcontainer)
13
- - [Example](#example-1)
14
- - [[BREAKING] `ContainerConfig` has renames](#breaking-containerconfig-has-renames)
15
- - [Example](#example-2)
16
- - [[BREAKING] `CreateContainerConfig` has been removed](#breaking-createcontainerconfig-has-been-removed)
17
- - [[BREAKING] `getDataObject` is no longer avaiable](#breaking-getdataobject-is-no-longer-avaiable)
18
- - [[BREAKING] `createDataObject` is replaced by `create`](#breaking-createdataobject-is-replaced-by-create)
19
- - [Example](#example-3)
1
+ # @fluidframework/fluid-static
2
+
3
+ ## 2.0.0-internal.8.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - azure-client: Removed deprecated FluidStatic classes [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
8
+
9
+ Several FluidStatic classes were unnecessarily exposed and were deprecated in an earlier release. They have been replaced with creation functions. This helps us
10
+ keep implementations decoupled from usage which is easier to maintain and extend. It has very minimal impact on the
11
+ public surface area of downstream packages. The removed classes are as follows:
12
+
13
+ - `AzureAudience` (use `IAzureAudience` instead)
14
+ - `TinyliciousAudience` (use `ITinyliciousAudience` instead)
15
+ - `DOProviderContainerRuntimeFactory`
16
+ - `FluidContainer`
17
+ - `ServiceAudience`
18
+
19
+ ## 2.0.0-internal.7.4.0
20
+
21
+ ### Minor Changes
22
+
23
+ - azure-client: Deprecated FluidStatic Classes ([#18402](https://github.com/microsoft/FluidFramework/issues/18402)) [589ec39de5](https://github.com/microsoft/FluidFramework/commits/589ec39de52116c7f782319e6f6aa61bc5aa9964)
24
+
25
+ Several FluidStatic classes were unnecessarily exposed. They have been replaced with creation functions. This helps us
26
+ keep implementations decoupled from usage which is easier to maintain and extend. It has very minimal impact on the
27
+ public surface area of downstream packages. The deprecated classes are as follows:
28
+
29
+ - `AzureAudience` (use `IAzureAudience` instead)
30
+ - `TinyliciousAudience` (use `ITinyliciousAudience` instead)
31
+ - `DOProviderContainerRuntimeFactory`
32
+ - `FluidContainer`
33
+ - `ServiceAudience`
34
+
35
+ ## 2.0.0-internal.7.3.0
36
+
37
+ Dependency updates only.
38
+
39
+ ## 2.0.0-internal.7.2.0
40
+
41
+ Dependency updates only.
42
+
43
+ ## 2.0.0-internal.7.1.0
44
+
45
+ Dependency updates only.
46
+
47
+ ## 2.0.0-internal.7.0.0
48
+
49
+ ### Major Changes
50
+
51
+ - Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
52
+
53
+ This included the following changes from the protocol-definitions release:
54
+
55
+ - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
56
+ submitted by clients to the server and the resulting signals sent from the server to clients.
57
+ - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
58
+ been added, which will be the typing for signals sent from the client to the server. Both extend a new
59
+ ISignalMessageBase interface that contains common members.
60
+ - The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
61
+
62
+ - Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
63
+
64
+ Dependencies on the following Fluid server package have been updated to version 2.0.1:
65
+
66
+ - @fluidframework/gitresources: 2.0.1
67
+ - @fluidframework/server-kafka-orderer: 2.0.1
68
+ - @fluidframework/server-lambdas: 2.0.1
69
+ - @fluidframework/server-lambdas-driver: 2.0.1
70
+ - @fluidframework/server-local-server: 2.0.1
71
+ - @fluidframework/server-memory-orderer: 2.0.1
72
+ - @fluidframework/protocol-base: 2.0.1
73
+ - @fluidframework/server-routerlicious: 2.0.1
74
+ - @fluidframework/server-routerlicious-base: 2.0.1
75
+ - @fluidframework/server-services: 2.0.1
76
+ - @fluidframework/server-services-client: 2.0.1
77
+ - @fluidframework/server-services-core: 2.0.1
78
+ - @fluidframework/server-services-ordering-kafkanode: 2.0.1
79
+ - @fluidframework/server-services-ordering-rdkafka: 2.0.1
80
+ - @fluidframework/server-services-ordering-zookeeper: 2.0.1
81
+ - @fluidframework/server-services-shared: 2.0.1
82
+ - @fluidframework/server-services-telemetry: 2.0.1
83
+ - @fluidframework/server-services-utils: 2.0.1
84
+ - @fluidframework/server-test-utils: 2.0.1
85
+ - tinylicious: 2.0.1
86
+
87
+ - test-utils: provideEntryPoint is required [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
88
+
89
+ The optional `provideEntryPoint` method has become required on a number of constructors. A value will need to be provided to the following classes:
90
+
91
+ - `BaseContainerRuntimeFactory`
92
+ - `RuntimeFactory`
93
+ - `ContainerRuntime` (constructor and `loadRuntime`)
94
+ - `FluidDataStoreRuntime`
95
+
96
+ See [testContainerRuntimeFactoryWithDefaultDataStore.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/test/test-utils/src/testContainerRuntimeFactoryWithDefaultDataStore.ts) for an example implemtation of `provideEntryPoint` for ContainerRuntime.
97
+ See [pureDataObjectFactory.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/framework/aqueduct/src/data-object-factories/pureDataObjectFactory.ts#L83) for an example implementation of `provideEntryPoint` for DataStoreRuntime.
98
+
99
+ Subsequently, various `entryPoint` and `getEntryPoint()` endpoints have become required. Please see [containerRuntime.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/containerRuntime.ts) for example implementations of these APIs.
100
+
101
+ For more details, see [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md)
102
+
103
+ - Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
104
+
105
+ The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
106
+
107
+ ## 2.0.0-internal.6.4.0
108
+
109
+ Dependency updates only.
110
+
111
+ ## 2.0.0-internal.6.3.0
112
+
113
+ Dependency updates only.
114
+
115
+ ## 2.0.0-internal.6.2.0
116
+
117
+ ### Minor Changes
118
+
119
+ - Remove use of @fluidframework/common-definitions ([#16638](https://github.com/microsoft/FluidFramework/issues/16638)) [a8c81509c9](https://github.com/microsoft/FluidFramework/commits/a8c81509c9bf09cfb2092ebcf7265205f9eb6dbf)
120
+
121
+ The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
122
+ imported from the **@fluidframework/core-interfaces** package:
123
+
124
+ - interface IDisposable
125
+ - interface IErrorEvent
126
+ - interface IErrorEvent
127
+ - interface IEvent
128
+ - interface IEventProvider
129
+ - interface ILoggingError
130
+ - interface ITaggedTelemetryPropertyType
131
+ - interface ITelemetryBaseEvent
132
+ - interface ITelemetryBaseLogger
133
+ - interface ITelemetryErrorEvent
134
+ - interface ITelemetryGenericEvent
135
+ - interface ITelemetryLogger
136
+ - interface ITelemetryPerformanceEvent
137
+ - interface ITelemetryProperties
138
+ - type ExtendEventProvider
139
+ - type IEventThisPlaceHolder
140
+ - type IEventTransformer
141
+ - type ReplaceIEventThisPlaceHolder
142
+ - type ReplaceIEventThisPlaceHolder
143
+ - type TelemetryEventCategory
144
+ - type TelemetryEventPropertyType
145
+
146
+ ## 2.0.0-internal.6.1.0
147
+
148
+ Dependency updates only.
149
+
150
+ ## 2.0.0-internal.6.0.0
151
+
152
+ ### Major Changes
153
+
154
+ - RootDataObject and RootDataObjectProps no longer exported from fluid-static or fluid-framework packages [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
155
+
156
+ RootDataObject and RootDataObjectProps are internal implementations and not intended for direct use. Instead use IRootDataObject to refer to the root data object.
157
+
158
+ - Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
159
+
160
+ 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.
161
+
162
+ ## 2.0.0-internal.5.4.0
163
+
164
+ Dependency updates only.
165
+
166
+ ## 2.0.0-internal.5.3.0
167
+
168
+ Dependency updates only.
169
+
170
+ ## 2.0.0-internal.5.2.0
171
+
172
+ Dependency updates only.
173
+
174
+ ## 2.0.0-internal.5.1.0
175
+
176
+ Dependency updates only.
177
+
178
+ ## 2.0.0-internal.5.0.0
179
+
180
+ ### Major Changes
181
+
182
+ - The following functions and classes were deprecated in previous releases and have been removed: [8b242fdc79](https://github.com/microsoft/FluidFramework/commits/8b242fdc796714cf1da9ad3f90d02efb122af0c2)
183
+
184
+ - `PureDataObject.getFluidObjectFromDirectory`
185
+ - `IProvideContainerRuntime` and its `IContainerRuntime` member.
186
+ - `ContainerRuntime`'s `IProvideContainerRuntime` has also been removed.
187
+
188
+ ## 2.0.0-internal.4.4.0
189
+
190
+ Dependency updates only.
191
+
192
+ ## 2.0.0-internal.4.1.0
193
+
194
+ Dependency updates only.
20
195
 
21
196
  ## 0.39.0
22
197
 
23
198
  ### [BREAKING] 'FluidStatic' has been moved to have separate client packages unique to each service
199
+
24
200
  There is no longer a general `FluidStatic` class. It has instead been replaced by implementations that define a unique paradigm for each service that the client is trying to communicate with. For example, when using Tinylicious, please see the details on using the `TinyliciousClient` from the [documentation](../tinylicious-client/README.MD) `@fluidframework/tinylicious-client`.
25
201
 
26
202
  ### [BREAKING] 'ContainerConfig' has been renamed to 'ContainerSchema'
203
+
27
204
  The interface for defining the container's initial object and supported dynamic object types has been renamed to `ContainerSchema` to differentiate it from the config interfaces that will be supplied for each service, i.e. `TinyliciousConnectionConfig` and `TinyliciousContainerConfig` from `@fluidframework/tinylicious-client`.
28
205
 
29
206
  `ContainerSchema` is used uniformly across all different services that are using the container supplied by the `FluidStatic` package, whereas the service configs are unique.
@@ -45,13 +222,12 @@ import { SharedMap } from "@fluidframework/map";
45
222
  // ...
46
223
 
47
224
  const containerConfig = {
48
- name: "my-container",
49
- initialObjects: {
50
- "pair1": KeyValueDataObject,
51
- "map1": SharedMap,
52
- }
53
- }
54
-
225
+ name: "my-container",
226
+ initialObjects: {
227
+ pair1: KeyValueDataObject,
228
+ map1: SharedMap,
229
+ },
230
+ };
55
231
  ```
56
232
 
57
233
  ### `initialObjects` are available as an object on the FluidContainer
@@ -64,12 +240,12 @@ This change also introduces all `initialObjects` as statically loaded when the `
64
240
 
65
241
  ```javascript
66
242
  const config = {
67
- name: "my-container",
68
- initialObjects: {
69
- "map1": SharedMap,
70
- "map2": SharedMap,
71
- }
72
- }
243
+ name: "my-container",
244
+ initialObjects: {
245
+ map1: SharedMap,
246
+ map2: SharedMap,
247
+ },
248
+ };
73
249
 
74
250
  // ...
75
251
 
@@ -85,9 +261,9 @@ const map2 = initialObjects["map2"];
85
261
 
86
262
  ```typescript
87
263
  interface ContainerConfig {
88
- name: string;
89
- initialObjects: LoadableObjectClassRecord;
90
- dynamicObjectTypes?: LoadableObjectClass<any>[];
264
+ name: string;
265
+ initialObjects: LoadableObjectClassRecord;
266
+ dynamicObjectTypes?: LoadableObjectClass<any>[];
91
267
  }
92
268
  ```
93
269
 
@@ -97,23 +273,20 @@ For details of each property above see `ContainerConfig` in [./src/types](./src/
97
273
 
98
274
  ```javascript
99
275
  const config = {
100
- name: "my-container",
101
- initialObjects: {
102
- "pair1": KeyValueDataObject,
103
- "map1": SharedMap,
104
- },
105
- dynamicObjectTypes: [
106
- SharedDirectory,
107
- SharedString,
108
- ],
109
- }
276
+ name: "my-container",
277
+ initialObjects: {
278
+ pair1: KeyValueDataObject,
279
+ map1: SharedMap,
280
+ },
281
+ dynamicObjectTypes: [SharedDirectory, SharedString],
282
+ };
110
283
  ```
111
284
 
112
285
  ### [BREAKING] `CreateContainerConfig` has been removed
113
286
 
114
287
  `CreateContainerConfig` has been merged into `ContainerConfig`.
115
288
 
116
- See **[[BREAKING] `ContainerConfig` has renames](#[BREAKING]-`ContainerConfig`-has-renames)** for more details.
289
+ See **[[BREAKING] `ContainerConfig` has renames](#[BREAKING]-`ContainerConfig`-has-renames)** for more details.
117
290
 
118
291
  ### [BREAKING] `getDataObject` is no longer avaiable
119
292
 
@@ -137,12 +310,12 @@ Because the `FluidContainer` will no longer be maintaining object lifecycle the
137
310
 
138
311
  ```javascript
139
312
  const config = {
140
- name: "my-container",
141
- initialObjects: {
142
- "map1": SharedMap,
143
- },
144
- dynamicObjectTypes: [KeyValueDataObject],
145
- }
313
+ name: "my-container",
314
+ initialObjects: {
315
+ map1: SharedMap,
316
+ },
317
+ dynamicObjectTypes: [KeyValueDataObject],
318
+ };
146
319
 
147
320
  const container = Fluid.getContainer("some-id", config);
148
321
  const map1 = container.initialObjects.map1;
@@ -159,5 +332,4 @@ const map2 = await map2Handle.get();
159
332
 
160
333
  // Alternate syntax
161
334
  const map2 = await map1.get("map2").get();
162
-
163
335
  ```
package/README.md CHANGED
@@ -2,8 +2,46 @@
2
2
 
3
3
  The `fluid-static` package provides a simple and powerful way to consume collaborative Fluid data.
4
4
 
5
+ <!-- AUTO-GENERATED-CONTENT:START (README_DEPENDENCY_GUIDELINES_SECTION:includeHeading=TRUE) -->
6
+
7
+ <!-- prettier-ignore-start -->
8
+ <!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
9
+
10
+ ## Using Fluid Framework libraries
11
+
12
+ When taking a dependency on a Fluid Framework library, we recommend using a `^` (caret) version range, such as `^1.3.4`.
13
+ While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
14
+ library consumers should always prefer `^`.
15
+
16
+ Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
17
+ 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`).
18
+ Standard `^` and `~` ranges will not work as expected.
19
+ See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
20
+ package for more information including tools to convert between version schemes.
21
+
22
+ <!-- prettier-ignore-end -->
23
+
24
+ <!-- AUTO-GENERATED-CONTENT:END -->
25
+
5
26
  ## Using fluid-static
6
27
 
7
28
  The `fluid-static` package contains a container with a pre-created default data object with the ability to create and store additional objects. This is abstracted behind a developer-friendly `FluidContainer` interface that provides configurations for defining the container's initial object and supported dynamic object types, as well as callbacks for creating and fetching DDSes and data objects.
8
29
 
9
30
  This is consumed by separate client packages, such as [TinyliciousClient](../tinylicious-client/README.MD) for the Tinylicious service, to provide an easy way of creating and fetching FluidContainer instances that are backed by data stored on the respective services.
31
+
32
+ <!-- AUTO-GENERATED-CONTENT:START (README_TRADEMARK_SECTION:includeHeading=TRUE) -->
33
+
34
+ <!-- prettier-ignore-start -->
35
+ <!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
36
+
37
+ ## Trademark
38
+
39
+ This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
40
+
41
+ Use of these trademarks or logos must follow Microsoft's [Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
42
+
43
+ Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
44
+
45
+ <!-- prettier-ignore-end -->
46
+
47
+ <!-- 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-strict.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,141 @@
1
+ ## API Report File for "@fluidframework/fluid-static"
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 { AttachState } from '@fluidframework/container-definitions';
8
+ import { ConnectionState } from '@fluidframework/container-definitions';
9
+ import { IChannelFactory } from '@fluidframework/datastore-definitions';
10
+ import { IClient } from '@fluidframework/protocol-definitions';
11
+ import { IContainer } from '@fluidframework/container-definitions';
12
+ import { ICriticalContainerError } from '@fluidframework/container-definitions';
13
+ import { IEvent } from '@fluidframework/core-interfaces';
14
+ import { IEventProvider } from '@fluidframework/core-interfaces';
15
+ import { IFluidLoadable } from '@fluidframework/core-interfaces';
16
+ import { IRuntimeFactory } from '@fluidframework/container-definitions';
17
+
18
+ // @public
19
+ export interface ContainerSchema {
20
+ dynamicObjectTypes?: LoadableObjectClass<any>[];
21
+ initialObjects: LoadableObjectClassRecord;
22
+ }
23
+
24
+ // @internal (undocumented)
25
+ export function createDOProviderContainerRuntimeFactory(props: {
26
+ schema: ContainerSchema;
27
+ }): IRuntimeFactory;
28
+
29
+ // @internal (undocumented)
30
+ export function createFluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema>(props: {
31
+ container: IContainer;
32
+ rootDataObject: IRootDataObject;
33
+ }): IFluidContainer<TContainerSchema>;
34
+
35
+ // @internal (undocumented)
36
+ export function createServiceAudience<M extends IMember = IMember>(props: {
37
+ container: IContainer;
38
+ createServiceMember: (audienceMember: IClient) => M;
39
+ }): IServiceAudience<M>;
40
+
41
+ // @public
42
+ export type DataObjectClass<T extends IFluidLoadable> = {
43
+ readonly factory: {
44
+ IFluidDataStoreFactory: DataObjectClass<T>["factory"];
45
+ };
46
+ } & LoadableObjectCtor<T>;
47
+
48
+ // @public
49
+ export interface IConnection {
50
+ id: string;
51
+ mode: "write" | "read";
52
+ }
53
+
54
+ // @public @sealed
55
+ export interface IFluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema> extends IEventProvider<IFluidContainerEvents> {
56
+ attach(): Promise<string>;
57
+ readonly attachState: AttachState;
58
+ connect(): void;
59
+ readonly connectionState: ConnectionState;
60
+ create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T>;
61
+ disconnect(): void;
62
+ dispose(): void;
63
+ readonly disposed: boolean;
64
+ readonly initialObjects: InitialObjects<TContainerSchema>;
65
+ readonly isDirty: boolean;
66
+ }
67
+
68
+ // @public @sealed
69
+ export interface IFluidContainerEvents extends IEvent {
70
+ (event: "connected", listener: () => void): void;
71
+ (event: "disconnected", listener: () => void): void;
72
+ (event: "saved", listener: () => void): void;
73
+ (event: "dirty", listener: () => void): void;
74
+ (event: "disposed", listener: (error?: ICriticalContainerError) => void): any;
75
+ }
76
+
77
+ // @public
78
+ export interface IMember {
79
+ connections: IConnection[];
80
+ userId: string;
81
+ }
82
+
83
+ // @public
84
+ export type InitialObjects<T extends ContainerSchema> = {
85
+ [K in keyof T["initialObjects"]]: T["initialObjects"][K] extends LoadableObjectClass<infer TChannel> ? TChannel : never;
86
+ };
87
+
88
+ // @internal (undocumented)
89
+ export interface IProvideRootDataObject {
90
+ // (undocumented)
91
+ readonly IRootDataObject: IRootDataObject;
92
+ }
93
+
94
+ // @internal
95
+ export interface IRootDataObject extends IProvideRootDataObject {
96
+ create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T>;
97
+ readonly initialObjects: LoadableObjectRecord;
98
+ }
99
+
100
+ // @public
101
+ export interface IServiceAudience<M extends IMember> extends IEventProvider<IServiceAudienceEvents<M>> {
102
+ getMembers(): Map<string, M>;
103
+ getMyself(): Myself<M> | undefined;
104
+ }
105
+
106
+ // @public
107
+ export interface IServiceAudienceEvents<M extends IMember> extends IEvent {
108
+ // @eventProperty
109
+ (event: "membersChanged", listener: () => void): void;
110
+ // @eventProperty
111
+ (event: "memberAdded", listener: MemberChangedListener<M>): void;
112
+ // @eventProperty
113
+ (event: "memberRemoved", listener: MemberChangedListener<M>): void;
114
+ }
115
+
116
+ // @public
117
+ export type LoadableObjectClass<T extends IFluidLoadable> = DataObjectClass<T> | SharedObjectClass<T>;
118
+
119
+ // @public
120
+ export type LoadableObjectClassRecord = Record<string, LoadableObjectClass<any>>;
121
+
122
+ // @public
123
+ export type LoadableObjectCtor<T extends IFluidLoadable> = new (...args: any[]) => T;
124
+
125
+ // @internal
126
+ export type LoadableObjectRecord = Record<string, IFluidLoadable>;
127
+
128
+ // @public
129
+ export type MemberChangedListener<M extends IMember> = (clientId: string, member: M) => void;
130
+
131
+ // @public
132
+ export type Myself<M extends IMember = IMember> = M & {
133
+ currentConnection: string;
134
+ };
135
+
136
+ // @public
137
+ export type SharedObjectClass<T extends IFluidLoadable> = {
138
+ readonly getFactory: () => IChannelFactory;
139
+ } & LoadableObjectCtor<T>;
140
+
141
+ ```