@fluidframework/container-definitions 1.4.0-115997 → 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 (106) hide show
  1. package/.eslintrc.js +19 -25
  2. package/CHANGELOG.md +437 -0
  3. package/README.md +26 -5
  4. package/api-extractor-lint.json +4 -0
  5. package/api-extractor.json +2 -2
  6. package/api-report/container-definitions.api.md +514 -0
  7. package/dist/audience.d.ts +16 -1
  8. package/dist/audience.d.ts.map +1 -1
  9. package/dist/audience.js.map +1 -1
  10. package/dist/browserPackage.d.ts +8 -5
  11. package/dist/browserPackage.d.ts.map +1 -1
  12. package/dist/browserPackage.js +4 -6
  13. package/dist/browserPackage.js.map +1 -1
  14. package/dist/container-definitions-alpha.d.ts +1319 -0
  15. package/dist/container-definitions-beta.d.ts +538 -0
  16. package/dist/container-definitions-public.d.ts +538 -0
  17. package/dist/container-definitions-untrimmed.d.ts +1413 -0
  18. package/dist/deltas.d.ts +183 -57
  19. package/dist/deltas.d.ts.map +1 -1
  20. package/dist/deltas.js.map +1 -1
  21. package/dist/error.d.ts +42 -51
  22. package/dist/error.d.ts.map +1 -1
  23. package/dist/error.js +19 -3
  24. package/dist/error.js.map +1 -1
  25. package/dist/fluidModule.d.ts +3 -0
  26. package/dist/fluidModule.d.ts.map +1 -1
  27. package/dist/fluidModule.js.map +1 -1
  28. package/dist/fluidPackage.d.ts +29 -9
  29. package/dist/fluidPackage.d.ts.map +1 -1
  30. package/dist/fluidPackage.js +15 -6
  31. package/dist/fluidPackage.js.map +1 -1
  32. package/dist/index.d.ts +26 -10
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +15 -24
  35. package/dist/index.js.map +1 -1
  36. package/dist/loader.d.ts +285 -108
  37. package/dist/loader.d.ts.map +1 -1
  38. package/dist/loader.js +7 -1
  39. package/dist/loader.js.map +1 -1
  40. package/dist/runtime.d.ts +75 -29
  41. package/dist/runtime.d.ts.map +1 -1
  42. package/dist/runtime.js +6 -9
  43. package/dist/runtime.js.map +1 -1
  44. package/dist/tsdoc-metadata.json +11 -0
  45. package/lib/audience.d.ts +16 -1
  46. package/lib/audience.d.ts.map +1 -1
  47. package/lib/audience.js +2 -1
  48. package/lib/audience.js.map +1 -1
  49. package/lib/browserPackage.d.ts +8 -5
  50. package/lib/browserPackage.d.ts.map +1 -1
  51. package/lib/browserPackage.js +9 -7
  52. package/lib/browserPackage.js.map +1 -1
  53. package/lib/container-definitions-alpha.d.ts +1319 -0
  54. package/lib/container-definitions-beta.d.ts +538 -0
  55. package/lib/container-definitions-public.d.ts +538 -0
  56. package/lib/container-definitions-untrimmed.d.ts +1413 -0
  57. package/lib/deltas.d.ts +183 -57
  58. package/lib/deltas.d.ts.map +1 -1
  59. package/lib/deltas.js +2 -1
  60. package/lib/deltas.js.map +1 -1
  61. package/lib/error.d.ts +42 -51
  62. package/lib/error.d.ts.map +1 -1
  63. package/lib/error.js +22 -3
  64. package/lib/error.js.map +1 -1
  65. package/lib/fluidModule.d.ts +3 -0
  66. package/lib/fluidModule.d.ts.map +1 -1
  67. package/lib/fluidModule.js +2 -1
  68. package/lib/fluidModule.js.map +1 -1
  69. package/lib/fluidPackage.d.ts +29 -9
  70. package/lib/fluidPackage.d.ts.map +1 -1
  71. package/lib/fluidPackage.js +22 -8
  72. package/lib/fluidPackage.js.map +1 -1
  73. package/lib/index.d.ts +26 -10
  74. package/lib/index.d.ts.map +1 -1
  75. package/lib/index.js +17 -14
  76. package/lib/index.js.map +1 -1
  77. package/lib/loader.d.ts +285 -108
  78. package/lib/loader.d.ts.map +1 -1
  79. package/lib/loader.js +11 -2
  80. package/lib/loader.js.map +1 -1
  81. package/lib/runtime.d.ts +75 -29
  82. package/lib/runtime.d.ts.map +1 -1
  83. package/lib/runtime.js +10 -10
  84. package/lib/runtime.js.map +1 -1
  85. package/package.json +83 -44
  86. package/{lib/tokenProvider.js → prettier.config.cjs} +4 -2
  87. package/src/audience.ts +36 -13
  88. package/src/browserPackage.ts +39 -35
  89. package/src/deltas.ts +315 -166
  90. package/src/error.ts +67 -83
  91. package/src/fluidModule.ts +4 -1
  92. package/src/fluidPackage.ts +108 -86
  93. package/src/index.ts +78 -10
  94. package/src/loader.ts +577 -384
  95. package/src/runtime.ts +207 -154
  96. package/tsconfig.esnext.json +5 -6
  97. package/tsconfig.json +10 -15
  98. package/BREAKING.md +0 -41
  99. package/dist/tokenProvider.d.ts +0 -14
  100. package/dist/tokenProvider.d.ts.map +0 -1
  101. package/dist/tokenProvider.js +0 -9
  102. package/dist/tokenProvider.js.map +0 -1
  103. package/lib/tokenProvider.d.ts +0 -14
  104. package/lib/tokenProvider.d.ts.map +0 -1
  105. package/lib/tokenProvider.js.map +0 -1
  106. package/src/tokenProvider.ts +0 -14
package/.eslintrc.js CHANGED
@@ -4,29 +4,23 @@
4
4
  */
5
5
 
6
6
  module.exports = {
7
- extends: [require.resolve("@fluidframework/eslint-config-fluid")],
8
- parserOptions: {
9
- project: ["./tsconfig.json", "./src/test/types/tsconfig.json"],
10
- },
11
- rules: {
12
- // This library is used in the browser, so we don't want dependencies on most node libraries.
13
- "import/no-nodejs-modules": ["error", { allow: ["events"] }],
14
- },
15
- overrides: [
16
- {
17
- // Rules only for test files
18
- files: ["*.spec.ts", "src/test/**"],
19
- rules: {
20
- // This library is used in the browser, so we don't want dependencies on most node libraries.
21
- "import/no-nodejs-modules": ["error", { allow: ["assert","events"] }],
22
- },
23
- },
24
- {
25
- // Rules only for type validation files
26
- files: ["**/types/*validate*Previous*.ts"],
27
- rules: {
28
- "@typescript-eslint/comma-spacing": "off",
29
- },
30
- },
31
- ],
7
+ extends: [require.resolve("@fluidframework/eslint-config-fluid/recommended"), "prettier"],
8
+ plugins: ["deprecation"],
9
+ parserOptions: {
10
+ project: ["./tsconfig.json", "./src/test/types/tsconfig.json"],
11
+ },
12
+ rules: {
13
+ // This library is used in the browser, so we don't want dependencies on most node libraries.
14
+ "import/no-nodejs-modules": ["error", { allow: ["events"] }],
15
+ },
16
+ overrides: [
17
+ {
18
+ // Rules only for test files
19
+ files: ["*.spec.ts", "src/test/**"],
20
+ rules: {
21
+ // Test files are run in node only so additional node libraries can be used.
22
+ "import/no-nodejs-modules": ["error", { allow: ["assert", "events"] }],
23
+ },
24
+ },
25
+ ],
32
26
  };
package/CHANGELOG.md ADDED
@@ -0,0 +1,437 @@
1
+ # @fluidframework/container-definitions
2
+
3
+ ## 2.0.0-internal.8.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - container-definitions: Removed request(...) and IFluidRouter from IContainer [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
8
+
9
+ The `request(...)` method and `IFluidRouter` property have been removed from `IContainer`. Please use the
10
+ `IContainer.getEntryPoint()` method to get the container's entry point.
11
+
12
+ See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
13
+
14
+ - container-loader: Removed request(...) and IFluidRouter from ILoader and Loader [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
15
+
16
+ The `request(...)` method and `IFluidRouter` property have been removed from `ILoader` and `Loader`. Instead, after
17
+ calling `ILoader.resolve(...)`, call the `getEntryPoint()` method on the returned `IContainer`.
18
+
19
+ See
20
+ [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md)
21
+ for more details.
22
+
23
+ - container-runtime: Removed IPendingLocalState and IRuntime.notifyAttaching [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
24
+
25
+ The deprecated `IPendingLocalState` and `IRuntime.notifyAttaching` APIs are removed. There is no replacement as they are
26
+ not longer used.
27
+
28
+ - container-runtime: Removed request pattern from ContainerRuntime, IRuntime, and IContainerRuntimeBase [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
29
+
30
+ The `request(...)` method and `IFluidRouter` property have been removed from the following places:
31
+
32
+ - `ContainerRuntime`
33
+ - `IRuntime`
34
+ - `IContainerRuntimeBase`
35
+
36
+ Please use the `IRuntime.getEntryPoint()` method to get the runtime's entry point.
37
+
38
+ See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
39
+
40
+ - container-definitions: Fix ISnapshotTreeWithBlobContents and mark internal [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
41
+
42
+ `ISnapshotTreeWithBlobContents` is an internal type that should not be used externally. Additionally, the type didn't
43
+ match the usage, specifically in runtime-utils where an `any` cast was used to work around undefined blobContents. The
44
+ type has been updated to reflect that blobContents can be undefined.
45
+
46
+ ## 2.0.0-internal.7.4.0
47
+
48
+ Dependency updates only.
49
+
50
+ ## 2.0.0-internal.7.3.0
51
+
52
+ Dependency updates only.
53
+
54
+ ## 2.0.0-internal.7.2.0
55
+
56
+ Dependency updates only.
57
+
58
+ ## 2.0.0-internal.7.1.0
59
+
60
+ Dependency updates only.
61
+
62
+ ## 2.0.0-internal.7.0.0
63
+
64
+ ### Major Changes
65
+
66
+ - odsp-driver: Load container in readonly mode when driver throws DriverErrorType.outOfStorage [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
67
+
68
+ Handle DriverErrorType.outOfStorage error from driver and load the container in readonly mode. Currently there is no
69
+ handling and when the join session throws this error, the container will get closed. With this we use NoDeltaStream
70
+ object as connection and load the container in read mode, so that it loads properly. We also notify the that the
71
+ container is "readonly" through the event on delta manager so that apps can listen to this and show any UX etc. The app
72
+ can listen to the event like this:
73
+
74
+ ```ts
75
+ container.deltaManager.on(
76
+ "readonly",
77
+ (readonly?: boolean, readonlyConnectionReason?: { text: string; error?: IErrorBase }) => {
78
+ // error?.errorType will be equal to DriverErrorType.outOfStorage in this case
79
+ // App logic
80
+ },
81
+ );
82
+ ```
83
+
84
+ - Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
85
+
86
+ This included the following changes from the protocol-definitions release:
87
+
88
+ - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
89
+ submitted by clients to the server and the resulting signals sent from the server to clients.
90
+ - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
91
+ been added, which will be the typing for signals sent from the client to the server. Both extend a new
92
+ ISignalMessageBase interface that contains common members.
93
+ - The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
94
+
95
+ - container-definitions: IContainer's and IDataStore's IFluidRouter capabilities are deprecated [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
96
+
97
+ `IFluidRouter` and `request({ url: "/" })` on `IContainer` and `IDataStore` are deprecated and will be removed in a future major release. Please migrate all usage to the appropriate `getEntryPoint()` or `entryPoint` APIs.
98
+
99
+ See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
100
+
101
+ - Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
102
+
103
+ Dependencies on the following Fluid server package have been updated to version 2.0.1:
104
+
105
+ - @fluidframework/gitresources: 2.0.1
106
+ - @fluidframework/server-kafka-orderer: 2.0.1
107
+ - @fluidframework/server-lambdas: 2.0.1
108
+ - @fluidframework/server-lambdas-driver: 2.0.1
109
+ - @fluidframework/server-local-server: 2.0.1
110
+ - @fluidframework/server-memory-orderer: 2.0.1
111
+ - @fluidframework/protocol-base: 2.0.1
112
+ - @fluidframework/server-routerlicious: 2.0.1
113
+ - @fluidframework/server-routerlicious-base: 2.0.1
114
+ - @fluidframework/server-services: 2.0.1
115
+ - @fluidframework/server-services-client: 2.0.1
116
+ - @fluidframework/server-services-core: 2.0.1
117
+ - @fluidframework/server-services-ordering-kafkanode: 2.0.1
118
+ - @fluidframework/server-services-ordering-rdkafka: 2.0.1
119
+ - @fluidframework/server-services-ordering-zookeeper: 2.0.1
120
+ - @fluidframework/server-services-shared: 2.0.1
121
+ - @fluidframework/server-services-telemetry: 2.0.1
122
+ - @fluidframework/server-services-utils: 2.0.1
123
+ - @fluidframework/server-test-utils: 2.0.1
124
+ - tinylicious: 2.0.1
125
+
126
+ - test-utils: provideEntryPoint is required [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
127
+
128
+ The optional `provideEntryPoint` method has become required on a number of constructors. A value will need to be provided to the following classes:
129
+
130
+ - `BaseContainerRuntimeFactory`
131
+ - `RuntimeFactory`
132
+ - `ContainerRuntime` (constructor and `loadRuntime`)
133
+ - `FluidDataStoreRuntime`
134
+
135
+ 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.
136
+ 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.
137
+
138
+ 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.
139
+
140
+ For more details, see [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md)
141
+
142
+ - Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
143
+
144
+ The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
145
+
146
+ ## 2.0.0-internal.6.4.0
147
+
148
+ Dependency updates only.
149
+
150
+ ## 2.0.0-internal.6.3.0
151
+
152
+ Dependency updates only.
153
+
154
+ ## 2.0.0-internal.6.2.0
155
+
156
+ ### Minor Changes
157
+
158
+ - Temporarily restore id property on IContainerContext ([#16846](https://github.com/microsoft/FluidFramework/issues/16846)) [9825a692dd](https://github.com/microsoft/FluidFramework/commits/9825a692dd27eded214e3978a7fd6028b05e6fab)
159
+
160
+ The `id` property on `IContainerContext` has been temporarily restored to ease the transition to `2.0.0-internal.6.x`.
161
+ It will be removed again in `2.0.0-internal.7.0.0`.
162
+
163
+ The original deprecation announcement can be found [here](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.0.0-internal.5.2.0).
164
+
165
+ - Remove use of @fluidframework/common-definitions ([#16638](https://github.com/microsoft/FluidFramework/issues/16638)) [a8c81509c9](https://github.com/microsoft/FluidFramework/commits/a8c81509c9bf09cfb2092ebcf7265205f9eb6dbf)
166
+
167
+ The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
168
+ imported from the **@fluidframework/core-interfaces** package:
169
+
170
+ - interface IDisposable
171
+ - interface IErrorEvent
172
+ - interface IErrorEvent
173
+ - interface IEvent
174
+ - interface IEventProvider
175
+ - interface ILoggingError
176
+ - interface ITaggedTelemetryPropertyType
177
+ - interface ITelemetryBaseEvent
178
+ - interface ITelemetryBaseLogger
179
+ - interface ITelemetryErrorEvent
180
+ - interface ITelemetryGenericEvent
181
+ - interface ITelemetryLogger
182
+ - interface ITelemetryPerformanceEvent
183
+ - interface ITelemetryProperties
184
+ - type ExtendEventProvider
185
+ - type IEventThisPlaceHolder
186
+ - type IEventTransformer
187
+ - type ReplaceIEventThisPlaceHolder
188
+ - type ReplaceIEventThisPlaceHolder
189
+ - type TelemetryEventCategory
190
+ - type TelemetryEventPropertyType
191
+
192
+ ## 2.0.0-internal.6.1.0
193
+
194
+ Dependency updates only.
195
+
196
+ ## 2.0.0-internal.6.0.0
197
+
198
+ ### Major Changes
199
+
200
+ - Removed IContainerContext.existing [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
201
+
202
+ The recommended means of checking for existing changed to the instantiateRuntime param in 2021, and the IContainerContext.existing member was formally deprecated in 2.0.0-internal.2.0.0. This member is now removed.
203
+
204
+ - Remove closeAndGetPendingLocalState from IContainer [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
205
+
206
+ This change removes the deprecated and experimental method closeAndGetPendingLocalState from IContainer. It continues to
207
+ exist on IContainerExperimental.
208
+
209
+ IContainerExperimental is an interface that is easily casted to, which enables partners to access experimental features for testing and evaluation.
210
+ Moving the experimental method off IContainer will reduce exposure and churn on that production interface as we iterate
211
+ on and finalize our experimental features.
212
+
213
+ Experimental features should not be used in production environments.
214
+
215
+ - allSentOpsAckd and processTime events removed from IDeltaManagerEvents [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
216
+
217
+ The "allSentOpsAckd" and "processTime" events on the IDeltaManagerEvents interface were deprecated in 2.0.0-internal.2.2.0 and have now been removed.
218
+
219
+ - IConnectionDetailsInternal and IDeltaHandlerStrategy removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
220
+
221
+ IConnectionDetailsInternal and IDeltaHandlerStrategy from the @fluidframework/container-definitions package were deprecated in 2.0.0-internal.5.2.0 and have now been removed.
222
+
223
+ - Request APIs deprecated from many places [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
224
+
225
+ The `request` API (associated with the `IFluidRouter` interface) has been deprecated on a number of classes and interfaces. The following are impacted:
226
+
227
+ - `IRuntime` and `ContainerRuntime`
228
+ - `IFluidDataStoreRuntime` and `FluidDataStoreRuntime`
229
+ - `IFluidDataStoreChannel`
230
+ - `MockFluidDataStoreRuntime`
231
+ - `TestFluidObject`
232
+
233
+ Please migrate usage to the corresponding `entryPoint` or `getEntryPoint()` of the object. The value for these "entryPoint" related APIs is determined from factories (for `IRuntime` and `IFluidDataStoreRuntime`) via the `initializeEntryPoint` method. If no method is passed to the factory, the corresponding `entryPoint` and `getEntryPoint()` will be undefined.
234
+
235
+ For an example implementation of `initializeEntryPoint`, see [pureDataObjectFactory.ts](https://github.com/microsoft/FluidFramework/blob/next/packages/framework/aqueduct/src/data-object-factories/pureDataObjectFactory.ts#L84).
236
+
237
+ More information of the migration off the request pattern, and current status of its removal, is documented in [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md).
238
+
239
+ - IContainer's and IDataStore's IFluidRouter capabilities are deprecated. [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
240
+
241
+ - The `request` function taking an arbitrary URL and headers is deprecated
242
+ - However, an overload taking only `{ url: "/" }` is not, for back-compat purposes during the migration
243
+ from the request pattern to using entryPoint.
244
+
245
+ ### About requesting "/" and using entryPoint
246
+
247
+ Requesting "/" is an idiom some consumers of Fluid Framework have used in their own `requestHandler`s
248
+ (passed to `ContainerRuntime.loadRuntime` and `FluidDataStoreRuntime`'s constructor).
249
+ The ability to access the "root" or "entry point" of a Container / DataStore will presently be provided by
250
+ `IContainer.getEntryPoint` and `IDataStore.entryPoint`. However these are still optional, so a temporary workaround is needed.
251
+
252
+ See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md)
253
+ for more info on this transition from request to entryPoint.
254
+
255
+ ### Present Replacement for requesting an arbitrary URL
256
+
257
+ Suppose you have these variables:
258
+
259
+ ```ts
260
+ const container: IContainer = ...;
261
+ const dataStore: IDataStore = ...;
262
+ ```
263
+
264
+ Before:
265
+
266
+ ```ts
267
+ container.request({ url, headers });
268
+ dataStore.request({ url, headers });
269
+ ```
270
+
271
+ After:
272
+
273
+ ```ts
274
+ // Assume there is an interface like this in the app's Container implementation
275
+ interface CustomUrlRouter {
276
+ doRequestRouting(request: { url: string; headers: Record<string, any>; }): any;
277
+ }
278
+
279
+ // Prerequisite: Pass a requestHandler to ContainerRuntime.loadRuntime that routes "/"
280
+ // to some root object implementing CustomUrlRouter
281
+ const containerRouter: CustomUrlRouter = await container.request({ "/" });
282
+ containerRouter.doRequestRouting({ url, headers });
283
+
284
+ // Prerequisite: Pass a requestHandler to FluidDataStoreRuntime's constructor that routes "/"
285
+ // to some root object implementing CustomUrlRouter
286
+ const dataStoreRouter: CustomUrlRouter = await dataStore.request({ "/" });
287
+ dataStoreRouter.doRequestRouting({ url, headers });
288
+ ```
289
+
290
+ ### Looking ahead to using entryPoint
291
+
292
+ In the next major release, `getEntryPoint` and `entryPoint` should be mandatory and available for use.
293
+ Then you may replace each call `request({ url: "/" })` with a call to get the entryPoint using these functions/properties.
294
+
295
+ - Loader container caching off by default [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
296
+
297
+ Loader container caching will now be off by default and the ability to control it is deprecated. Loader caching is deprecated and will be removed in a future release, as well as all caching functionality of containers. Please try not to rely on caching and inform us if you cannot do so.
298
+
299
+ If you run into trouble with this behavior, please report it ASAP to the FluidFramework team and use the following options (available in this release only) to unblock you:
300
+
301
+ - set `ILoaderProps.options.cache` to `true` when constructing a `Loader` object (see the `ILoaderOptions` interface)
302
+ - set `[LoaderHeader.cache]` header to `true` when requesting a container
303
+
304
+ - contextChanged event on IContainerEvents removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
305
+
306
+ The contextChanged event on IContainerEvents was deprecated in 2.0.0-internal.2.2.0 and has now been removed.
307
+
308
+ - ICodeAllowList interface removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
309
+
310
+ The ICodeAllowList interface was deprecated in 2.0.0-internal.3.2.0 and has now been removed.
311
+
312
+ - getPendingLocalState and closeAndGetPendingLocalState are now async [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
313
+
314
+ getPendingLocalState and closeAndGetPendingLocalState are now async to allow uploading blobs to attach to a DDS (in closing scenario). There is a new parameter in those methods at the container/runtime layer "notifyImminentClosure" which is true only when closing and ensures uploading blobs fast resolve and get attached. Once we apply stashed ops to new container, blob will try to reupload and we will know where to place its references.
315
+
316
+ - Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
317
+
318
+ 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.
319
+
320
+ - `Loader.resolve()` throws if `LoaderHeader.sequenceNumber` and `IContainerLoadMode.opsBeforeReturn` do not match [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
321
+
322
+ Calling `Loader.resolve()` will now throw an error if `LoaderHeader.sequenceNumber` is defined but `IContainerLoadMode.opsBeforeReturn` is not set to "sequenceNumber". Vice versa, `Loader.resolve()` will also throw an error if `IContainerLoadMode.opsBeforeReturn` is set to "sequenceNumber" but `LoaderHeader.sequenceNumber` is not defined.
323
+
324
+ - IDeltaManager members disposed and dispose() removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
325
+
326
+ IDeltaManager members disposed and dispose() were deprecated in 2.0.0-internal.5.3.0 and have now been removed.
327
+
328
+ - Request APIs deprecated on ILoader [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
329
+
330
+ The `request` API (associated with the `IFluidRouter` interface) has been deprecated on `ILoader` and `Loader`.
331
+ Please migrate all usage to using the `IContainer.request(...)` method if using a dynamic request URL, or to the `IContainer.getEntryPoint()` method if trying to obtain the application-specified root object.
332
+
333
+ **Note:** The `IContainer.request(...)` method will be deprecated in an upcoming release, so do not rely on this method for a long-term solution (the APIs around `entryPoint` and `getEntryPoint()` will become required and available for usage in its place).
334
+
335
+ After calling `ILoader.resolve(...)`, call the `request(...)` method on the returned `IContainer` with a corresponding request URL. For converting a request URL from `Loader` to `Container`, use the `IUrlResolver` passed into the `Loader`'s constructor.
336
+ The following is an example of what this change may look like:
337
+
338
+ ```
339
+ // OLD
340
+ const request: IRequest;
341
+ const urlResolver = new YourUrlResolver();
342
+ const loader = new Loader({ urlResolver, ... });
343
+
344
+ await loader.resolve(request);
345
+ const response = loader.request(request);
346
+ ```
347
+
348
+ ```
349
+ // NEW
350
+ const request: IRequest;
351
+ const urlResolver = new YourUrlResolver();
352
+ const loader = new Loader({ urlResolver, ... });
353
+
354
+ const container = await loader.resolve(request);
355
+ const resolvedUrl: IRequest = urlResolver.resolve(request);
356
+
357
+ // Parse the `resolvedUrl.url` property as necessary before passing to `container.request(...)`
358
+ // For an example, see the `Loader.resolveCore(...)` method
359
+ const parsedResolvedUrl = // implement parse logic here
360
+ const response = container.request(parsedResolvedUrl);
361
+ ```
362
+
363
+ Status on removal of the request pattern is tracked in [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md)
364
+
365
+ - IContainerContext members removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
366
+
367
+ IContainerContext members disposed, dispose(), serviceConfiguration, and id were deprecated in 2.0.0-internal.5.2.0 and have now been removed.
368
+
369
+ ## 2.0.0-internal.5.4.0
370
+
371
+ ### Minor Changes
372
+
373
+ - `ILoaderOptions.cache` has been deprecated ([#16383](https://github.com/microsoft/FluidFramework/issues/16383)) [ef9b00f1bf](https://github.com/microsoft/FluidFramework/commits/ef9b00f1bf538861ecc616c7c9e1d73707ab89fb)
374
+
375
+ `ILoaderOptions.cache` has been deprecated and will be removed in a future release, as well as all caching functionality of containers. Cache support will be removed soon, please try not to rely on caching, and inform us if you cannot do so.
376
+
377
+ ## 2.0.0-internal.5.3.0
378
+
379
+ ### Minor Changes
380
+
381
+ - Move closeAndGetPendingLocalState to IContainerExperimental ([#16302](https://github.com/microsoft/FluidFramework/issues/16302)) [93151af787](https://github.com/microsoft/FluidFramework/commits/93151af787b76e547cf3460df47f81832131db8c)
382
+
383
+ This change deprecates the experimental method closeAndGetPendingLocalState on IContainer and moves it to IContainerExperimental.
384
+ IContainerExperimental is an interface that is easily casted to, which enables partners to access experimental features for testing and evaluation.
385
+ Moving the experimental method off IContainer will reduce exposure and churn on that production interface as we iterate on and finalize our experimental features.
386
+ Experimental features should not be used in production environments.
387
+
388
+ - IDeltaManager members disposed and dispose() deprecated ([#16224](https://github.com/microsoft/FluidFramework/issues/16224)) [85b30b686a](https://github.com/microsoft/FluidFramework/commits/85b30b686a47563baf00ded97986610f1f3e77ed)
389
+
390
+ Directly calling dispose() on the IDeltaManager puts the system in an inconsistent state, and inspecting the disposed state of the IDeltaManager is not recommended (instead, prefer to inspect either the IContainer.disposed, IContainerRuntime.disposed, or IFluidDataStoreRuntime.disposed depending on your scenario). These members have been deprecated from the interface and will be removed in an upcoming release.
391
+
392
+ ## 2.0.0-internal.5.2.0
393
+
394
+ ### Minor Changes
395
+
396
+ - IContainerContext members deprecated ([#16180](https://github.com/microsoft/FluidFramework/issues/16180)) [bf6a26cfe6](https://github.com/microsoft/FluidFramework/commits/bf6a26cfe6ac58386f2c9af260603a15b03ba84f)
397
+
398
+ IContainerContext members disposed, dispose(), serviceConfiguration, and id have been deprecated and will be removed in an upcoming release.
399
+
400
+ disposed - The disposed state on the IContainerContext is not meaningful to the runtime.
401
+
402
+ dispose() - The runtime is not permitted to dispose the IContainerContext, this results in an inconsistent system state.
403
+
404
+ serviceConfiguration - This property is redundant, and is unused by the runtime. The same information can be found via `deltaManager.serviceConfiguration` on this object if it is necessary.
405
+
406
+ id - The docId is already logged by the IContainerContext.taggedLogger for telemetry purposes, so this is generally unnecessary for telemetry. If the id is needed for other purposes it should be passed to the consumer explicitly.
407
+
408
+ - IConnectionDetailsInternal and IDeltaHandlerStrategy deprecated ([#16081](https://github.com/microsoft/FluidFramework/issues/16081)) [279dcd5563](https://github.com/microsoft/FluidFramework/commits/279dcd55635b650494cf2347f21cf0e2b979413a)
409
+
410
+ The IConnectionDetailsInternal and IDeltaHandlerStrategy interfaces from the @fluidframework/container-definitions package have been deprecated and will be removed in a future release. These are internal-only interfaces and should not be used.
411
+
412
+ ## 2.0.0-internal.5.1.0
413
+
414
+ Dependency updates only.
415
+
416
+ ## 2.0.0-internal.5.0.0
417
+
418
+ ### Major Changes
419
+
420
+ - Calling `IContainer.close(...)` will no longer dispose the container runtime, document service, or document storage service. [8b242fdc79](https://github.com/microsoft/FluidFramework/commits/8b242fdc796714cf1da9ad3f90d02efb122af0c2)
421
+
422
+ If the container is not expected to be used after the `close(...)` call, replace it instead with a
423
+ `IContainer.dispose(...)` call (this should be the most common case). Using `IContainer.dispose(...)` will no longer
424
+ switch the container to "readonly" mode and relevant code should instead listen to the Container's "disposed" event.
425
+
426
+ If you intend to pass your own critical error to the container, use `IContainer.close(...)`. Once you are done using the
427
+ container, call `IContainer.dispose(...)`.
428
+
429
+ See the [Closure](packages/loader/container-loader/README.md#Closure) section of Loader README.md for more details.
430
+
431
+ ## 2.0.0-internal.4.4.0
432
+
433
+ Dependency updates only.
434
+
435
+ ## 2.0.0-internal.4.1.0
436
+
437
+ Dependency updates only.
package/README.md CHANGED
@@ -4,8 +4,29 @@ This package contains the interfaces and types concerning the Loader and loading
4
4
 
5
5
  Some important interfaces in here include:
6
6
 
7
- * **ILoader, IContainer** - Interfaces allowing the Host to load and interact with a Container
8
- * **IContainerContext** - Proxy between the Host and the running instance of a Container,
9
- which allows the code supporting the running Container to be swapped out during a session.
10
- * **IRuntime / IRuntimeFactory** - Contract necessary for the ContainerContext to "boot" a Container at runtime.
11
- * **IDeltaManager / IDeltaQueue** - Abstraction over the Container's view of the ops being transmitted to/from storage.
7
+ - **ILoader, IContainer** - Interfaces allowing the Host to load and interact with a Container
8
+ - **IContainerContext** - Proxy between the Host and the running instance of a Container,
9
+ which allows the code supporting the running Container to be swapped out during a session.
10
+ - **IRuntime / IRuntimeFactory** - Contract necessary for the ContainerContext to "boot" a Container at runtime.
11
+ - **IDeltaManager / IDeltaQueue** - Abstraction over the Container's view of the ops being transmitted to/from storage.
12
+
13
+ <!-- AUTO-GENERATED-CONTENT:START (README_DEPENDENCY_GUIDELINES_SECTION:includeHeading=TRUE) -->
14
+
15
+ <!-- prettier-ignore-start -->
16
+ <!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
17
+
18
+ ## Using Fluid Framework libraries
19
+
20
+ When taking a dependency on a Fluid Framework library, we recommend using a `^` (caret) version range, such as `^1.3.4`.
21
+ While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
22
+ library consumers should always prefer `^`.
23
+
24
+ Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
25
+ 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`).
26
+ Standard `^` and `~` ranges will not work as expected.
27
+ See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
28
+ package for more information including tools to convert between version schemes.
29
+
30
+ <!-- prettier-ignore-end -->
31
+
32
+ <!-- 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
  }