@fluidframework/container-definitions 2.0.0-dev.5.3.2.178189 → 2.0.0-dev.6.4.0.191258

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 (63) hide show
  1. package/.eslintrc.js +2 -2
  2. package/CHANGELOG.md +227 -0
  3. package/README.md +4 -3
  4. package/dist/browserPackage.d.ts +1 -1
  5. package/dist/browserPackage.d.ts.map +1 -1
  6. package/dist/browserPackage.js +3 -6
  7. package/dist/browserPackage.js.map +1 -1
  8. package/dist/deltas.d.ts +57 -77
  9. package/dist/deltas.d.ts.map +1 -1
  10. package/dist/deltas.js.map +1 -1
  11. package/dist/error.d.ts +21 -50
  12. package/dist/error.d.ts.map +1 -1
  13. package/dist/error.js +16 -2
  14. package/dist/error.js.map +1 -1
  15. package/dist/fluidPackage.d.ts +1 -1
  16. package/dist/fluidPackage.d.ts.map +1 -1
  17. package/dist/fluidPackage.js +6 -4
  18. package/dist/fluidPackage.js.map +1 -1
  19. package/dist/index.d.ts +20 -3
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +2 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/loader.d.ts +61 -34
  24. package/dist/loader.d.ts.map +1 -1
  25. package/dist/loader.js +5 -1
  26. package/dist/loader.js.map +1 -1
  27. package/dist/runtime.d.ts +15 -24
  28. package/dist/runtime.d.ts.map +1 -1
  29. package/dist/runtime.js.map +1 -1
  30. package/lib/browserPackage.d.ts +1 -1
  31. package/lib/browserPackage.d.ts.map +1 -1
  32. package/lib/browserPackage.js +3 -6
  33. package/lib/browserPackage.js.map +1 -1
  34. package/lib/deltas.d.ts +57 -77
  35. package/lib/deltas.d.ts.map +1 -1
  36. package/lib/deltas.js.map +1 -1
  37. package/lib/error.d.ts +21 -50
  38. package/lib/error.d.ts.map +1 -1
  39. package/lib/error.js +15 -1
  40. package/lib/error.js.map +1 -1
  41. package/lib/fluidPackage.d.ts +1 -1
  42. package/lib/fluidPackage.d.ts.map +1 -1
  43. package/lib/fluidPackage.js +6 -4
  44. package/lib/fluidPackage.js.map +1 -1
  45. package/lib/index.d.ts +20 -3
  46. package/lib/index.d.ts.map +1 -1
  47. package/lib/index.js +1 -1
  48. package/lib/index.js.map +1 -1
  49. package/lib/loader.d.ts +61 -34
  50. package/lib/loader.d.ts.map +1 -1
  51. package/lib/loader.js +5 -1
  52. package/lib/loader.js.map +1 -1
  53. package/lib/runtime.d.ts +15 -24
  54. package/lib/runtime.d.ts.map +1 -1
  55. package/lib/runtime.js.map +1 -1
  56. package/package.json +10 -11
  57. package/src/browserPackage.ts +3 -1
  58. package/src/deltas.ts +63 -85
  59. package/src/error.ts +18 -55
  60. package/src/fluidPackage.ts +4 -2
  61. package/src/index.ts +21 -8
  62. package/src/loader.ts +76 -36
  63. package/src/runtime.ts +17 -25
package/.eslintrc.js CHANGED
@@ -4,8 +4,8 @@
4
4
  */
5
5
 
6
6
  module.exports = {
7
- extends: [require.resolve("@fluidframework/eslint-config-fluid/minimal"), "prettier"],
8
-
7
+ extends: [require.resolve("@fluidframework/eslint-config-fluid/recommended"), "prettier"],
8
+ plugins: ["deprecation"],
9
9
  parserOptions: {
10
10
  project: ["./tsconfig.json", "./src/test/types/tsconfig.json"],
11
11
  },
package/CHANGELOG.md CHANGED
@@ -1,5 +1,232 @@
1
1
  # @fluidframework/container-definitions
2
2
 
3
+ ## 2.0.0-internal.6.3.0
4
+
5
+ Dependency updates only.
6
+
7
+ ## 2.0.0-internal.6.2.0
8
+
9
+ ### Minor Changes
10
+
11
+ - Temporarily restore id property on IContainerContext ([#16846](https://github.com/microsoft/FluidFramework/issues/16846)) [9825a692dd](https://github.com/microsoft/FluidFramework/commits/9825a692dd27eded214e3978a7fd6028b05e6fab)
12
+
13
+ The `id` property on `IContainerContext` has been temporarily restored to ease the transition to `2.0.0-internal.6.x`.
14
+ It will be removed again in `2.0.0-internal.7.0.0`.
15
+
16
+ The original deprecation announcement can be found [here](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.0.0-internal.5.2.0).
17
+
18
+ - Remove use of @fluidframework/common-definitions ([#16638](https://github.com/microsoft/FluidFramework/issues/16638)) [a8c81509c9](https://github.com/microsoft/FluidFramework/commits/a8c81509c9bf09cfb2092ebcf7265205f9eb6dbf)
19
+
20
+ The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
21
+ imported from the **@fluidframework/core-interfaces** package:
22
+
23
+ - interface IDisposable
24
+ - interface IErrorEvent
25
+ - interface IErrorEvent
26
+ - interface IEvent
27
+ - interface IEventProvider
28
+ - interface ILoggingError
29
+ - interface ITaggedTelemetryPropertyType
30
+ - interface ITelemetryBaseEvent
31
+ - interface ITelemetryBaseLogger
32
+ - interface ITelemetryErrorEvent
33
+ - interface ITelemetryGenericEvent
34
+ - interface ITelemetryLogger
35
+ - interface ITelemetryPerformanceEvent
36
+ - interface ITelemetryProperties
37
+ - type ExtendEventProvider
38
+ - type IEventThisPlaceHolder
39
+ - type IEventTransformer
40
+ - type ReplaceIEventThisPlaceHolder
41
+ - type ReplaceIEventThisPlaceHolder
42
+ - type TelemetryEventCategory
43
+ - type TelemetryEventPropertyType
44
+
45
+ ## 2.0.0-internal.6.1.0
46
+
47
+ Dependency updates only.
48
+
49
+ ## 2.0.0-internal.6.0.0
50
+
51
+ ### Major Changes
52
+
53
+ - Removed IContainerContext.existing [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
54
+
55
+ 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.
56
+
57
+ - Remove closeAndGetPendingLocalState from IContainer [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
58
+
59
+ This change removes the deprecated and experimental method closeAndGetPendingLocalState from IContainer. It continues to
60
+ exist on IContainerExperimental.
61
+
62
+ IContainerExperimental is an interface that is easily casted to, which enables partners to access experimental features for testing and evaluation.
63
+ Moving the experimental method off IContainer will reduce exposure and churn on that production interface as we iterate
64
+ on and finalize our experimental features.
65
+
66
+ Experimental features should not be used in production environments.
67
+
68
+ - allSentOpsAckd and processTime events removed from IDeltaManagerEvents [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
69
+
70
+ The "allSentOpsAckd" and "processTime" events on the IDeltaManagerEvents interface were deprecated in 2.0.0-internal.2.2.0 and have now been removed.
71
+
72
+ - IConnectionDetailsInternal and IDeltaHandlerStrategy removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
73
+
74
+ IConnectionDetailsInternal and IDeltaHandlerStrategy from the @fluidframework/container-definitions package were deprecated in 2.0.0-internal.5.2.0 and have now been removed.
75
+
76
+ - Request APIs deprecated from many places [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
77
+
78
+ The `request` API (associated with the `IFluidRouter` interface) has been deprecated on a number of classes and interfaces. The following are impacted:
79
+
80
+ - `IRuntime` and `ContainerRuntime`
81
+ - `IFluidDataStoreRuntime` and `FluidDataStoreRuntime`
82
+ - `IFluidDataStoreChannel`
83
+ - `MockFluidDataStoreRuntime`
84
+ - `TestFluidObject`
85
+
86
+ 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.
87
+
88
+ 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).
89
+
90
+ 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).
91
+
92
+ - IContainer's and IDataStore's IFluidRouter capabilities are deprecated. [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
93
+
94
+ - The `request` function taking an arbitrary URL and headers is deprecated
95
+ - However, an overload taking only `{ url: "/" }` is not, for back-compat purposes during the migration
96
+ from the request pattern to using entryPoint.
97
+
98
+ ### About requesting "/" and using entryPoint
99
+
100
+ Requesting "/" is an idiom some consumers of Fluid Framework have used in their own `requestHandler`s
101
+ (passed to `ContainerRuntime.loadRuntime` and `FluidDataStoreRuntime`'s constructor).
102
+ The ability to access the "root" or "entry point" of a Container / DataStore will presently be provided by
103
+ `IContainer.getEntryPoint` and `IDataStore.entryPoint`. However these are still optional, so a temporary workaround is needed.
104
+
105
+ See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md)
106
+ for more info on this transition from request to entryPoint.
107
+
108
+ ### Present Replacement for requesting an arbitrary URL
109
+
110
+ Suppose you have these variables:
111
+
112
+ ```ts
113
+ const container: IContainer = ...;
114
+ const dataStore: IDataStore = ...;
115
+ ```
116
+
117
+ Before:
118
+
119
+ ```ts
120
+ container.request({ url, headers });
121
+ dataStore.request({ url, headers });
122
+ ```
123
+
124
+ After:
125
+
126
+ ```ts
127
+ // Assume there is an interface like this in the app's Container implementation
128
+ interface CustomUrlRouter {
129
+ doRequestRouting(request: { url: string; headers: Record<string, any>; }): any;
130
+ }
131
+
132
+ // Prerequisite: Pass a requestHandler to ContainerRuntime.loadRuntime that routes "/"
133
+ // to some root object implementing CustomUrlRouter
134
+ const containerRouter: CustomUrlRouter = await container.request({ "/" });
135
+ containerRouter.doRequestRouting({ url, headers });
136
+
137
+ // Prerequisite: Pass a requestHandler to FluidDataStoreRuntime's constructor that routes "/"
138
+ // to some root object implementing CustomUrlRouter
139
+ const dataStoreRouter: CustomUrlRouter = await dataStore.request({ "/" });
140
+ dataStoreRouter.doRequestRouting({ url, headers });
141
+ ```
142
+
143
+ ### Looking ahead to using entryPoint
144
+
145
+ In the next major release, `getEntryPoint` and `entryPoint` should be mandatory and available for use.
146
+ Then you may replace each call `request({ url: "/" })` with a call to get the entryPoint using these functions/properties.
147
+
148
+ - Loader container caching off by default [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
149
+
150
+ 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.
151
+
152
+ 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:
153
+
154
+ - set `ILoaderProps.options.cache` to `true` when constructing a `Loader` object (see the `ILoaderOptions` interface)
155
+ - set `[LoaderHeader.cache]` header to `true` when requesting a container
156
+
157
+ - contextChanged event on IContainerEvents removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
158
+
159
+ The contextChanged event on IContainerEvents was deprecated in 2.0.0-internal.2.2.0 and has now been removed.
160
+
161
+ - ICodeAllowList interface removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
162
+
163
+ The ICodeAllowList interface was deprecated in 2.0.0-internal.3.2.0 and has now been removed.
164
+
165
+ - getPendingLocalState and closeAndGetPendingLocalState are now async [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
166
+
167
+ 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.
168
+
169
+ - Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
170
+
171
+ 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.
172
+
173
+ - `Loader.resolve()` throws if `LoaderHeader.sequenceNumber` and `IContainerLoadMode.opsBeforeReturn` do not match [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
174
+
175
+ 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.
176
+
177
+ - IDeltaManager members disposed and dispose() removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
178
+
179
+ IDeltaManager members disposed and dispose() were deprecated in 2.0.0-internal.5.3.0 and have now been removed.
180
+
181
+ - Request APIs deprecated on ILoader [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
182
+
183
+ The `request` API (associated with the `IFluidRouter` interface) has been deprecated on `ILoader` and `Loader`.
184
+ 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.
185
+
186
+ **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).
187
+
188
+ 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.
189
+ The following is an example of what this change may look like:
190
+
191
+ ```
192
+ // OLD
193
+ const request: IRequest;
194
+ const urlResolver = new YourUrlResolver();
195
+ const loader = new Loader({ urlResolver, ... });
196
+
197
+ await loader.resolve(request);
198
+ const response = loader.request(request);
199
+ ```
200
+
201
+ ```
202
+ // NEW
203
+ const request: IRequest;
204
+ const urlResolver = new YourUrlResolver();
205
+ const loader = new Loader({ urlResolver, ... });
206
+
207
+ const container = await loader.resolve(request);
208
+ const resolvedUrl: IRequest = urlResolver.resolve(request);
209
+
210
+ // Parse the `resolvedUrl.url` property as necessary before passing to `container.request(...)`
211
+ // For an example, see the `Loader.resolveCore(...)` method
212
+ const parsedResolvedUrl = // implement parse logic here
213
+ const response = container.request(parsedResolvedUrl);
214
+ ```
215
+
216
+ 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)
217
+
218
+ - IContainerContext members removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
219
+
220
+ IContainerContext members disposed, dispose(), serviceConfiguration, and id were deprecated in 2.0.0-internal.5.2.0 and have now been removed.
221
+
222
+ ## 2.0.0-internal.5.4.0
223
+
224
+ ### Minor Changes
225
+
226
+ - `ILoaderOptions.cache` has been deprecated ([#16383](https://github.com/microsoft/FluidFramework/issues/16383)) [ef9b00f1bf](https://github.com/microsoft/FluidFramework/commits/ef9b00f1bf538861ecc616c7c9e1d73707ab89fb)
227
+
228
+ `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.
229
+
3
230
  ## 2.0.0-internal.5.3.0
4
231
 
5
232
  ### Minor Changes
package/README.md CHANGED
@@ -21,9 +21,10 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
21
21
  While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
22
22
  library consumers should always prefer `^`.
23
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
25
- scheme, you must use a `>= <` dependency range. Standard `^` and `~` ranges will not work as expected. See the
26
- [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
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)
27
28
  package for more information including tools to convert between version schemes.
28
29
 
29
30
  <!-- prettier-ignore-end -->
@@ -46,5 +46,5 @@ export interface IFluidBrowserPackage extends IFluidPackage {
46
46
  * Determines if any object is an IFluidBrowserPackage
47
47
  * @param maybePkg - The object to check for compatibility with IFluidBrowserPackage
48
48
  */
49
- export declare const isFluidBrowserPackage: (maybePkg: any) => maybePkg is Readonly<IFluidBrowserPackage>;
49
+ export declare const isFluidBrowserPackage: (maybePkg: unknown) => maybePkg is Readonly<IFluidBrowserPackage>;
50
50
  //# sourceMappingURL=browserPackage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browserPackage.d.ts","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAkB,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAEzF;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;IAChF;;;OAGG;IACH,GAAG,EAAE;QACJ;;;WAGG;QACH,KAAK,EAAE,MAAM,EAAE,CAAC;QAEhB;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IAC1D;;OAEG;IACH,KAAK,EAAE;QACN;;WAEG;QACH,OAAO,EAAE,+BAA+B,CAAC;QACzC;;WAEG;QACH,CAAC,WAAW,EAAE,MAAM,GAAG,wBAAwB,CAAC;KAChD,CAAC;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,aAAc,GAAG,+CAGC,CAAC"}
1
+ {"version":3,"file":"browserPackage.d.ts","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAkB,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAEzF;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;IAChF;;;OAGG;IACH,GAAG,EAAE;QACJ;;;WAGG;QACH,KAAK,EAAE,MAAM,EAAE,CAAC;QAEhB;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IAC1D;;OAEG;IACH,KAAK,EAAE;QACN;;WAEG;QACH,OAAO,EAAE,+BAA+B,CAAC;QACzC;;WAEG;QACH,CAAC,WAAW,EAAE,MAAM,GAAG,wBAAwB,CAAC;KAChD,CAAC;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,aACvB,OAAO,+CAIkC,CAAC"}
@@ -10,11 +10,8 @@ const fluidPackage_1 = require("./fluidPackage");
10
10
  * Determines if any object is an IFluidBrowserPackage
11
11
  * @param maybePkg - The object to check for compatibility with IFluidBrowserPackage
12
12
  */
13
- const isFluidBrowserPackage = (maybePkg) => {
14
- var _a, _b, _c, _d, _e, _f;
15
- return (0, fluidPackage_1.isFluidPackage)(maybePkg) &&
16
- typeof ((_c = (_b = (_a = maybePkg === null || maybePkg === void 0 ? void 0 : maybePkg.fluid) === null || _a === void 0 ? void 0 : _a.browser) === null || _b === void 0 ? void 0 : _b.umd) === null || _c === void 0 ? void 0 : _c.library) === "string" &&
17
- Array.isArray((_f = (_e = (_d = maybePkg === null || maybePkg === void 0 ? void 0 : maybePkg.fluid) === null || _d === void 0 ? void 0 : _d.browser) === null || _e === void 0 ? void 0 : _e.umd) === null || _f === void 0 ? void 0 : _f.files);
18
- };
13
+ const isFluidBrowserPackage = (maybePkg) => (0, fluidPackage_1.isFluidPackage)(maybePkg) &&
14
+ typeof maybePkg?.fluid?.browser?.umd?.library === "string" &&
15
+ Array.isArray(maybePkg?.fluid?.browser?.umd?.files);
19
16
  exports.isFluidBrowserPackage = isFluidBrowserPackage;
20
17
  //# sourceMappingURL=browserPackage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browserPackage.js","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAAyF;AA4CzF;;;GAGG;AACI,MAAM,qBAAqB,GAAG,CAAC,QAAa,EAA8C,EAAE;;IAClG,OAAA,IAAA,6BAAc,EAAC,QAAQ,CAAC;QACxB,OAAO,CAAA,MAAA,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,0CAAE,OAAO,0CAAE,GAAG,0CAAE,OAAO,CAAA,KAAK,QAAQ;QAC1D,KAAK,CAAC,OAAO,CAAC,MAAA,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,0CAAE,OAAO,0CAAE,GAAG,0CAAE,KAAK,CAAC,CAAA;CAAA,CAAC;AAHxC,QAAA,qBAAqB,yBAGmB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidPackage, isFluidPackage, IFluidPackageEnvironment } from \"./fluidPackage\";\n\n/**\n * A specific Fluid package environment for browsers\n */\nexport interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment {\n\t/**\n\t * The Universal Module Definition (umd) target specifics the scripts necessary for\n\t * loading a packages in a browser environment and finding its entry point.\n\t */\n\tumd: {\n\t\t/**\n\t\t * The bundled js files for loading this package.\n\t\t * These files will be loaded and executed in order.\n\t\t */\n\t\tfiles: string[];\n\n\t\t/**\n\t\t * The global name that the script entry points will be exposed.\n\t\t * This entry point should be an {@link @fluidframework/container-definitions#IFluidModule}.\n\t\t */\n\t\tlibrary: string;\n\t};\n}\n\n/**\n * A Fluid package for specification for browser environments\n */\nexport interface IFluidBrowserPackage extends IFluidPackage {\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidPackage.fluid}\n\t */\n\tfluid: {\n\t\t/**\n\t\t * The browser specific package information for this package\n\t\t */\n\t\tbrowser: IFluidBrowserPackageEnvironment;\n\t\t/**\n\t\t * {@inheritDoc @fluidframework/core-interfaces#IFluidPackage.fluid.environment}\n\t\t */\n\t\t[environment: string]: IFluidPackageEnvironment;\n\t};\n}\n\n/**\n * Determines if any object is an IFluidBrowserPackage\n * @param maybePkg - The object to check for compatibility with IFluidBrowserPackage\n */\nexport const isFluidBrowserPackage = (maybePkg: any): maybePkg is Readonly<IFluidBrowserPackage> =>\n\tisFluidPackage(maybePkg) &&\n\ttypeof maybePkg?.fluid?.browser?.umd?.library === \"string\" &&\n\tArray.isArray(maybePkg?.fluid?.browser?.umd?.files);\n"]}
1
+ {"version":3,"file":"browserPackage.js","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAAyF;AA4CzF;;;GAGG;AACI,MAAM,qBAAqB,GAAG,CACpC,QAAiB,EAC4B,EAAE,CAC/C,IAAA,6BAAc,EAAC,QAAQ,CAAC;IACxB,OAAO,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,KAAK,QAAQ;IAC1D,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AALxC,QAAA,qBAAqB,yBAKmB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidPackage, isFluidPackage, IFluidPackageEnvironment } from \"./fluidPackage\";\n\n/**\n * A specific Fluid package environment for browsers\n */\nexport interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment {\n\t/**\n\t * The Universal Module Definition (umd) target specifics the scripts necessary for\n\t * loading a packages in a browser environment and finding its entry point.\n\t */\n\tumd: {\n\t\t/**\n\t\t * The bundled js files for loading this package.\n\t\t * These files will be loaded and executed in order.\n\t\t */\n\t\tfiles: string[];\n\n\t\t/**\n\t\t * The global name that the script entry points will be exposed.\n\t\t * This entry point should be an {@link @fluidframework/container-definitions#IFluidModule}.\n\t\t */\n\t\tlibrary: string;\n\t};\n}\n\n/**\n * A Fluid package for specification for browser environments\n */\nexport interface IFluidBrowserPackage extends IFluidPackage {\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidPackage.fluid}\n\t */\n\tfluid: {\n\t\t/**\n\t\t * The browser specific package information for this package\n\t\t */\n\t\tbrowser: IFluidBrowserPackageEnvironment;\n\t\t/**\n\t\t * {@inheritDoc @fluidframework/core-interfaces#IFluidPackage.fluid.environment}\n\t\t */\n\t\t[environment: string]: IFluidPackageEnvironment;\n\t};\n}\n\n/**\n * Determines if any object is an IFluidBrowserPackage\n * @param maybePkg - The object to check for compatibility with IFluidBrowserPackage\n */\nexport const isFluidBrowserPackage = (\n\tmaybePkg: unknown,\n): maybePkg is Readonly<IFluidBrowserPackage> =>\n\tisFluidPackage(maybePkg) &&\n\ttypeof maybePkg?.fluid?.browser?.umd?.library === \"string\" &&\n\tArray.isArray(maybePkg?.fluid?.browser?.umd?.files);\n"]}
package/dist/deltas.d.ts CHANGED
@@ -2,10 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IEventProvider, IEvent, IErrorEvent } from "@fluidframework/common-definitions";
6
- import { IDisposable } from "@fluidframework/core-interfaces";
5
+ import { IDisposable, IEventProvider, IEvent, IErrorEvent } from "@fluidframework/core-interfaces";
7
6
  import { IAnyDriverError } from "@fluidframework/driver-definitions";
8
- import { ConnectionMode, IClientConfiguration, IClientDetails, IDocumentMessage, ISequencedDocumentMessage, ISignalClient, ISignalMessage, ITokenClaims } from "@fluidframework/protocol-definitions";
7
+ import { IClientConfiguration, IClientDetails, IDocumentMessage, ISequencedDocumentMessage, ISignalMessage, ITokenClaims } from "@fluidframework/protocol-definitions";
9
8
  /**
10
9
  * Contract representing the result of a newly established connection to the server for syncing deltas.
11
10
  */
@@ -25,44 +24,6 @@ export interface IConnectionDetails {
25
24
  */
26
25
  checkpointSequenceNumber: number | undefined;
27
26
  }
28
- /**
29
- * Internal version of IConnectionDetails with props are only exposed internally
30
- * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.
31
- */
32
- export interface IConnectionDetailsInternal extends IConnectionDetails {
33
- /**
34
- * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.
35
- */
36
- mode: ConnectionMode;
37
- /**
38
- * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.
39
- */
40
- version: string;
41
- /**
42
- * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.
43
- */
44
- initialClients: ISignalClient[];
45
- /**
46
- * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.
47
- */
48
- reason: string;
49
- }
50
- /**
51
- * Interface used to define a strategy for handling incoming delta messages
52
- * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.
53
- */
54
- export interface IDeltaHandlerStrategy {
55
- /**
56
- * Processes the message.
57
- * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.
58
- */
59
- process: (message: ISequencedDocumentMessage) => void;
60
- /**
61
- * Processes the signal.
62
- * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.
63
- */
64
- processSignal: (message: ISignalMessage) => void;
65
- }
66
27
  /**
67
28
  * Contract supporting delivery of outbound messages to the server
68
29
  */
@@ -100,18 +61,10 @@ export interface IDeltaManagerEvents extends IEvent {
100
61
  * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.
101
62
  */
102
63
  (event: "op", listener: (message: ISequencedDocumentMessage, processingTime: number) => void): any;
103
- /**
104
- * @deprecated No replacement API recommended.
105
- */
106
- (event: "allSentOpsAckd", listener: () => void): any;
107
64
  /**
108
65
  * Emitted periodically with latest information on network roundtrip latency
109
66
  */
110
67
  (event: "pong", listener: (latency: number) => void): any;
111
- /**
112
- * @deprecated No replacement API recommended.
113
- */
114
- (event: "processTime", listener: (latency: number) => void): any;
115
68
  /**
116
69
  * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.
117
70
  *
@@ -149,50 +102,68 @@ export interface IDeltaManagerEvents extends IEvent {
149
102
  * Manages the transmission of ops between the runtime and storage.
150
103
  */
151
104
  export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {
152
- /** The queue of inbound delta messages */
105
+ /**
106
+ * The queue of inbound delta messages
107
+ */
153
108
  readonly inbound: IDeltaQueue<T>;
154
- /** The queue of outbound delta messages */
109
+ /**
110
+ * The queue of outbound delta messages
111
+ */
155
112
  readonly outbound: IDeltaQueue<U[]>;
156
- /** The queue of inbound delta signals */
113
+ /**
114
+ * The queue of inbound delta signals
115
+ */
157
116
  readonly inboundSignal: IDeltaQueue<ISignalMessage>;
158
- /** The current minimum sequence number */
117
+ /**
118
+ * The current minimum sequence number
119
+ */
159
120
  readonly minimumSequenceNumber: number;
160
- /** The last sequence number processed by the delta manager */
121
+ /**
122
+ * The last sequence number processed by the delta manager
123
+ */
161
124
  readonly lastSequenceNumber: number;
162
- /** The last message processed by the delta manager */
125
+ /**
126
+ * The last message processed by the delta manager
127
+ */
163
128
  readonly lastMessage: ISequencedDocumentMessage | undefined;
164
- /** The latest sequence number the delta manager is aware of */
129
+ /**
130
+ * The latest sequence number the delta manager is aware of
131
+ */
165
132
  readonly lastKnownSeqNumber: number;
166
- /** The initial sequence number set when attaching the op handler */
133
+ /**
134
+ * The initial sequence number set when attaching the op handler
135
+ */
167
136
  readonly initialSequenceNumber: number;
168
137
  /**
169
138
  * Tells if current connection has checkpoint information.
170
139
  * I.e. we know how far behind the client was at the time of establishing connection
171
140
  */
172
141
  readonly hasCheckpointSequenceNumber: boolean;
173
- /** Details of client */
142
+ /**
143
+ * Details of client
144
+ */
174
145
  readonly clientDetails: IClientDetails;
175
- /** Protocol version being used to communicate with the service */
146
+ /**
147
+ * Protocol version being used to communicate with the service
148
+ */
176
149
  readonly version: string;
177
- /** Max message size allowed to the delta manager */
150
+ /**
151
+ * Max message size allowed to the delta manager
152
+ */
178
153
  readonly maxMessageSize: number;
179
- /** Service configuration provided by the service. */
154
+ /**
155
+ * Service configuration provided by the service.
156
+ */
180
157
  readonly serviceConfiguration: IClientConfiguration | undefined;
181
- /** Flag to indicate whether the client can write or not. */
182
- readonly active: boolean;
183
- readonly readOnlyInfo: ReadOnlyInfo;
184
- /** Submit a signal to the service to be broadcast to other connected clients, but not persisted */
185
- submitSignal(content: any): void;
186
158
  /**
187
- * @deprecated - 2.0.0-internal.5.3.0 - The IDeltaManager's dispose state is not recommended for observation
188
- * and will be removed in an upcoming release.
159
+ * Flag to indicate whether the client can write or not.
189
160
  */
190
- readonly disposed: boolean;
161
+ readonly active: boolean;
162
+ readonly readOnlyInfo: ReadOnlyInfo;
191
163
  /**
192
- * @deprecated - 2.0.0-internal.5.3.0 - Disposing the IDeltaManager results in inconsistent system state.
193
- * This member will be removed in an upcoming release.
164
+ * Submit a signal to the service to be broadcast to other connected clients, but not persisted
194
165
  */
195
- dispose(error?: Error): void;
166
+ submitSignal(content: any): void;
196
167
  }
197
168
  /**
198
169
  * Events emitted by {@link IDeltaQueue}.
@@ -281,14 +252,23 @@ export declare type ReadOnlyInfo = {
281
252
  readonly readonly: false | undefined;
282
253
  } | {
283
254
  readonly readonly: true;
284
- /** read-only because forceReadOnly() was called */
255
+ /**
256
+ * Read-only because `forceReadOnly()` was called.
257
+ */
285
258
  readonly forced: boolean;
286
- /** read-only because client does not have write permissions for document */
259
+ /**
260
+ * Read-only because client does not have write permissions for document.
261
+ */
287
262
  readonly permissions: boolean | undefined;
288
- /** read-only with no delta stream connection */
263
+ /**
264
+ * Read-only with no delta stream connection.
265
+ */
289
266
  readonly storageOnly: boolean;
290
- /** extra info on why connection to delta stream is not possible. This info might be provided
291
- * if storageOnly is set to true */
267
+ /**
268
+ * Extra info on why connection to delta stream is not possible.
269
+ *
270
+ * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.
271
+ */
292
272
  readonly storageOnlyReason?: string;
293
273
  };
294
274
  //# sourceMappingURL=deltas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deltas.d.ts","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EACN,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,oBAAoB,EAAE,oBAAoB,CAAC;IAE3C;;;;;;;;;OASG;IACH,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA2B,SAAQ,kBAAkB;IACrE;;OAEG;IACH,IAAI,EAAE,c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AEG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW;IACxF;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;;OAIG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,MAAM,IAAI,IAAI,CAAC;IAEf;;OAEG;IACH,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC;IAEtB;;OAEG;IACH,OAAO,IAAI,CAAC,EAAE,CAAC;IAEf;;;OAGG;IACH,sBAAsB,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACvE;AAED,oBAAY,YAAY,GACrB;IACA,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;CACpC,GACD;IACA,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IAE1C;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.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 { IEventProvider, IEvent, IErrorEvent } from \"@fluidframework/common-definitions\";\nimport { IDisposable } from \"@fluidframework/core-interfaces\";\nimport { IAnyDriverError } from \"@fluidframework/driver-definitions\";\nimport {\n\tConnectionMode,\n\tIClientConfiguration,\n\tIClientDetails,\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\n\tISignalClient,\n\tISignalMessage,\n\tITokenClaims,\n} from \"@fluidframework/protocol-definitions\";\n\n/**\n * Contract representing the result of a newly established connection to the server for syncing deltas.\n */\nexport interface IConnectionDetails {\n\tclientId: string;\n\tclaims: ITokenClaims;\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection.\n\t *\n\t * @remarks\n\t *\n\t * It may lap actual last sequence number (quite a bit, if container is very active).\n\t * But it's the best information for client to figure out how far it is behind, at least\n\t * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n\t * that is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber: number | undefined;\n}\n\n/**\n * Internal version of IConnectionDetails with props are only exposed internally\n * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.\n */\nexport interface IConnectionDetailsInternal extends IConnectionDetails {\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.\n\t */\n\tmode: ConnectionMode;\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.\n\t */\n\tversion: string;\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.\n\t */\n\tinitialClients: ISignalClient[];\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.\n\t */\n\treason: string;\n}\n\n/**\n * Interface used to define a strategy for handling incoming delta messages\n * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.\n */\nexport interface IDeltaHandlerStrategy {\n\t/**\n\t * Processes the message.\n\t * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.\n\t */\n\tprocess: (message: ISequencedDocumentMessage) => void;\n\n\t/**\n\t * Processes the signal.\n\t * @deprecated 2.0.0-internal.5.2.0 - Intended for internal use only and will be removed in an upcoming relase.\n\t */\n\tprocessSignal: (message: ISignalMessage) => void;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n */\nexport interface IDeltaSender {\n\t/**\n\t * Flush all pending messages through the outbound queue\n\t */\n\tflush(): void;\n}\n\n/**\n * Events emitted by {@link IDeltaManager}.\n */\nexport interface IDeltaManagerEvents extends IEvent {\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaManager}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t *\n\t * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.\n\t */\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage, processingTime: number) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"allSentOpsAckd\", listener: () => void);\n\n\t/**\n\t * Emitted periodically with latest information on network roundtrip latency\n\t */\n\t(event: \"pong\", listener: (latency: number) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"processTime\", listener: (latency: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.\n\t *\n\t * @remarks\n\t * This occurs once we've received the connect_document_success message from the server,\n\t * and happens prior to the client's join message (if there is a join message).\n\t *\n\t * Listener parameters:\n\t *\n\t * - `details`: Connection metadata.\n\t *\n\t * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.\n\t * Will not be specified if an estimate cannot be determined.\n\t */\n\t(event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `reason`: Describes the reason for which the delta manager was disconnected.\n\t * - `error` : error if any for the disconnect.\n\t */\n\t(event: \"disconnect\", listener: (reason: string, error?: IAnyDriverError) => void);\n\n\t/**\n\t * Emitted when read/write permissions change.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the delta manager is now read-only.\n\t */\n\t(event: \"readonly\", listener: (readonly: boolean) => void);\n}\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n */\nexport interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {\n\t/** The queue of inbound delta messages */\n\treadonly inbound: IDeltaQueue<T>;\n\n\t/** The queue of outbound delta messages */\n\treadonly outbound: IDeltaQueue<U[]>;\n\n\t/** The queue of inbound delta signals */\n\treadonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\t/** The current minimum sequence number */\n\treadonly minimumSequenceNumber: number;\n\n\t/** The last sequence number processed by the delta manager */\n\treadonly lastSequenceNumber: number;\n\n\t/** The last message processed by the delta manager */\n\treadonly lastMessage: ISequencedDocumentMessage | undefined;\n\n\t/** The latest sequence number the delta manager is aware of */\n\treadonly lastKnownSeqNumber: number;\n\n\t/** The initial sequence number set when attaching the op handler */\n\treadonly initialSequenceNumber: number;\n\n\t/**\n\t * Tells if current connection has checkpoint information.\n\t * I.e. we know how far behind the client was at the time of establishing connection\n\t */\n\treadonly hasCheckpointSequenceNumber: boolean;\n\n\t/** Details of client */\n\treadonly clientDetails: IClientDetails;\n\n\t/** Protocol version being used to communicate with the service */\n\treadonly version: string;\n\n\t/** Max message size allowed to the delta manager */\n\treadonly maxMessageSize: number;\n\n\t/** Service configuration provided by the service. */\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\n\t/** Flag to indicate whether the client can write or not. */\n\treadonly active: boolean;\n\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/** Submit a signal to the service to be broadcast to other connected clients, but not persisted */\n\tsubmitSignal(content: any): void;\n\n\t/**\n\t * @deprecated - 2.0.0-internal.5.3.0 - The IDeltaManager's dispose state is not recommended for observation\n\t * and will be removed in an upcoming release.\n\t */\n\treadonly disposed: boolean;\n\n\t/**\n\t * @deprecated - 2.0.0-internal.5.3.0 - Disposing the IDeltaManager results in inconsistent system state.\n\t * This member will be removed in an upcoming release.\n\t */\n\tdispose(error?: Error): void;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n\t/**\n\t * Emitted when a task is enqueued.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `task`: The task being enqueued.\n\t */\n\t(event: \"push\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted immediately after processing an enqueued task and removing it from the queue.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaQueue}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `task`: The task that was processed.\n\t */\n\t(event: \"op\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted when the queue of tasks to process is emptied.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `count`: The number of events (`T`) processed before becoming idle.\n\t *\n\t * - `duration`: The amount of time it took to process elements (in milliseconds).\n\t *\n\t * @see {@link IDeltaQueue.idle}\n\t */\n\t(event: \"idle\", listener: (count: number, duration: number) => void);\n}\n\n/**\n * Queue of ops to be sent to or processed from storage\n */\nexport interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {\n\t/**\n\t * Flag indicating whether or not the queue was paused\n\t */\n\tpaused: boolean;\n\n\t/**\n\t * The number of messages remaining in the queue\n\t */\n\tlength: number;\n\n\t/**\n\t * Flag indicating whether or not the queue is idle.\n\t * I.e. there are no remaining messages to processes.\n\t */\n\tidle: boolean;\n\n\t/**\n\t * Pauses processing on the queue.\n\t *\n\t * @returns A promise which resolves when processing has been paused.\n\t */\n\tpause(): Promise<void>;\n\n\t/**\n\t * Resumes processing on the queue\n\t */\n\tresume(): void;\n\n\t/**\n\t * Peeks at the next message in the queue\n\t */\n\tpeek(): T | undefined;\n\n\t/**\n\t * Returns all the items in the queue as an array. Does not remove them from the queue.\n\t */\n\ttoArray(): T[];\n\n\t/**\n\t * returns number of ops processed and time it took to process these ops.\n\t * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)\n\t */\n\twaitTillProcessingDone(): Promise<{ count: number; duration: number }>;\n}\n\nexport type ReadOnlyInfo =\n\t| {\n\t\t\treadonly readonly: false | undefined;\n\t }\n\t| {\n\t\t\treadonly readonly: true;\n\t\t\t/** read-only because forceReadOnly() was called */\n\t\t\treadonly forced: boolean;\n\t\t\t/** read-only because client does not have write permissions for document */\n\t\t\treadonly permissions: boolean | undefined;\n\t\t\t/** read-only with no delta stream connection */\n\t\t\treadonly storageOnly: boolean;\n\t\t\t/** extra info on why connection to delta stream is not possible. This info might be provided\n\t\t\t * if storageOnly is set to true */\n\t\t\treadonly storageOnlyReason?: string;\n\t };\n"]}
1
+ {"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.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 { IDisposable, IEventProvider, IEvent, IErrorEvent } from \"@fluidframework/core-interfaces\";\nimport { IAnyDriverError } from \"@fluidframework/driver-definitions\";\nimport {\n\tIClientConfiguration,\n\tIClientDetails,\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\n\tISignalMessage,\n\tITokenClaims,\n} from \"@fluidframework/protocol-definitions\";\n\n/**\n * Contract representing the result of a newly established connection to the server for syncing deltas.\n */\nexport interface IConnectionDetails {\n\tclientId: string;\n\tclaims: ITokenClaims;\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection.\n\t *\n\t * @remarks\n\t *\n\t * It may lap actual last sequence number (quite a bit, if container is very active).\n\t * But it's the best information for client to figure out how far it is behind, at least\n\t * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n\t * that is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber: number | undefined;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n */\nexport interface IDeltaSender {\n\t/**\n\t * Flush all pending messages through the outbound queue\n\t */\n\tflush(): void;\n}\n\n/**\n * Events emitted by {@link IDeltaManager}.\n */\nexport interface IDeltaManagerEvents extends IEvent {\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaManager}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t *\n\t * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.\n\t */\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage, processingTime: number) => void);\n\n\t/**\n\t * Emitted periodically with latest information on network roundtrip latency\n\t */\n\t(event: \"pong\", listener: (latency: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.\n\t *\n\t * @remarks\n\t * This occurs once we've received the connect_document_success message from the server,\n\t * and happens prior to the client's join message (if there is a join message).\n\t *\n\t * Listener parameters:\n\t *\n\t * - `details`: Connection metadata.\n\t *\n\t * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.\n\t * Will not be specified if an estimate cannot be determined.\n\t */\n\t(event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `reason`: Describes the reason for which the delta manager was disconnected.\n\t * - `error` : error if any for the disconnect.\n\t */\n\t(event: \"disconnect\", listener: (reason: string, error?: IAnyDriverError) => void);\n\n\t/**\n\t * Emitted when read/write permissions change.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the delta manager is now read-only.\n\t */\n\t(event: \"readonly\", listener: (readonly: boolean) => void);\n}\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n */\nexport interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {\n\t/**\n\t * The queue of inbound delta messages\n\t */\n\treadonly inbound: IDeltaQueue<T>;\n\n\t/**\n\t * The queue of outbound delta messages\n\t */\n\treadonly outbound: IDeltaQueue<U[]>;\n\n\t/**\n\t * The queue of inbound delta signals\n\t */\n\treadonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\t/**\n\t * The current minimum sequence number\n\t */\n\treadonly minimumSequenceNumber: number;\n\n\t/**\n\t * The last sequence number processed by the delta manager\n\t */\n\treadonly lastSequenceNumber: number;\n\n\t/**\n\t * The last message processed by the delta manager\n\t */\n\treadonly lastMessage: ISequencedDocumentMessage | undefined;\n\n\t/**\n\t * The latest sequence number the delta manager is aware of\n\t */\n\treadonly lastKnownSeqNumber: number;\n\n\t/**\n\t * The initial sequence number set when attaching the op handler\n\t */\n\treadonly initialSequenceNumber: number;\n\n\t/**\n\t * Tells if current connection has checkpoint information.\n\t * I.e. we know how far behind the client was at the time of establishing connection\n\t */\n\treadonly hasCheckpointSequenceNumber: boolean;\n\n\t/**\n\t * Details of client\n\t */\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Protocol version being used to communicate with the service\n\t */\n\treadonly version: string;\n\n\t/**\n\t * Max message size allowed to the delta manager\n\t */\n\treadonly maxMessageSize: number;\n\n\t/**\n\t * Service configuration provided by the service.\n\t */\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\n\t/**\n\t * Flag to indicate whether the client can write or not.\n\t */\n\treadonly active: boolean;\n\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Submit a signal to the service to be broadcast to other connected clients, but not persisted\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(content: any): void;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n\t/**\n\t * Emitted when a task is enqueued.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `task`: The task being enqueued.\n\t */\n\t(event: \"push\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted immediately after processing an enqueued task and removing it from the queue.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaQueue}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `task`: The task that was processed.\n\t */\n\t(event: \"op\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted when the queue of tasks to process is emptied.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `count`: The number of events (`T`) processed before becoming idle.\n\t *\n\t * - `duration`: The amount of time it took to process elements (in milliseconds).\n\t *\n\t * @see {@link IDeltaQueue.idle}\n\t */\n\t(event: \"idle\", listener: (count: number, duration: number) => void);\n}\n\n/**\n * Queue of ops to be sent to or processed from storage\n */\nexport interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {\n\t/**\n\t * Flag indicating whether or not the queue was paused\n\t */\n\tpaused: boolean;\n\n\t/**\n\t * The number of messages remaining in the queue\n\t */\n\tlength: number;\n\n\t/**\n\t * Flag indicating whether or not the queue is idle.\n\t * I.e. there are no remaining messages to processes.\n\t */\n\tidle: boolean;\n\n\t/**\n\t * Pauses processing on the queue.\n\t *\n\t * @returns A promise which resolves when processing has been paused.\n\t */\n\tpause(): Promise<void>;\n\n\t/**\n\t * Resumes processing on the queue\n\t */\n\tresume(): void;\n\n\t/**\n\t * Peeks at the next message in the queue\n\t */\n\tpeek(): T | undefined;\n\n\t/**\n\t * Returns all the items in the queue as an array. Does not remove them from the queue.\n\t */\n\ttoArray(): T[];\n\n\t/**\n\t * returns number of ops processed and time it took to process these ops.\n\t * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)\n\t */\n\twaitTillProcessingDone(): Promise<{ count: number; duration: number }>;\n}\n\nexport type ReadOnlyInfo =\n\t| {\n\t\t\treadonly readonly: false | undefined;\n\t }\n\t| {\n\t\t\treadonly readonly: true;\n\n\t\t\t/**\n\t\t\t * Read-only because `forceReadOnly()` was called.\n\t\t\t */\n\t\t\treadonly forced: boolean;\n\n\t\t\t/**\n\t\t\t * Read-only because client does not have write permissions for document.\n\t\t\t */\n\t\t\treadonly permissions: boolean | undefined;\n\n\t\t\t/**\n\t\t\t * Read-only with no delta stream connection.\n\t\t\t */\n\t\t\treadonly storageOnly: boolean;\n\n\t\t\t/**\n\t\t\t * Extra info on why connection to delta stream is not possible.\n\t\t\t *\n\t\t\t * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.\n\t\t\t */\n\t\t\treadonly storageOnlyReason?: string;\n\t };\n"]}