@fluidframework/container-loader 0.52.0-44610 → 0.53.0

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 (55) hide show
  1. package/dist/connectionStateHandler.d.ts +1 -0
  2. package/dist/connectionStateHandler.d.ts.map +1 -1
  3. package/dist/connectionStateHandler.js +6 -0
  4. package/dist/connectionStateHandler.js.map +1 -1
  5. package/dist/container.d.ts +0 -21
  6. package/dist/container.d.ts.map +1 -1
  7. package/dist/container.js +96 -123
  8. package/dist/container.js.map +1 -1
  9. package/dist/containerContext.d.ts +1 -0
  10. package/dist/containerContext.d.ts.map +1 -1
  11. package/dist/containerContext.js +4 -0
  12. package/dist/containerContext.js.map +1 -1
  13. package/dist/deltaManager.d.ts +0 -7
  14. package/dist/deltaManager.d.ts.map +1 -1
  15. package/dist/deltaManager.js +31 -33
  16. package/dist/deltaManager.js.map +1 -1
  17. package/dist/loader.d.ts +5 -0
  18. package/dist/loader.d.ts.map +1 -1
  19. package/dist/loader.js +6 -1
  20. package/dist/loader.js.map +1 -1
  21. package/dist/packageVersion.d.ts +1 -1
  22. package/dist/packageVersion.d.ts.map +1 -1
  23. package/dist/packageVersion.js +1 -1
  24. package/dist/packageVersion.js.map +1 -1
  25. package/lib/connectionStateHandler.d.ts +1 -0
  26. package/lib/connectionStateHandler.d.ts.map +1 -1
  27. package/lib/connectionStateHandler.js +6 -0
  28. package/lib/connectionStateHandler.js.map +1 -1
  29. package/lib/container.d.ts +0 -21
  30. package/lib/container.d.ts.map +1 -1
  31. package/lib/container.js +97 -124
  32. package/lib/container.js.map +1 -1
  33. package/lib/containerContext.d.ts +1 -0
  34. package/lib/containerContext.d.ts.map +1 -1
  35. package/lib/containerContext.js +4 -0
  36. package/lib/containerContext.js.map +1 -1
  37. package/lib/deltaManager.d.ts +0 -7
  38. package/lib/deltaManager.d.ts.map +1 -1
  39. package/lib/deltaManager.js +31 -33
  40. package/lib/deltaManager.js.map +1 -1
  41. package/lib/loader.d.ts +5 -0
  42. package/lib/loader.d.ts.map +1 -1
  43. package/lib/loader.js +6 -1
  44. package/lib/loader.js.map +1 -1
  45. package/lib/packageVersion.d.ts +1 -1
  46. package/lib/packageVersion.d.ts.map +1 -1
  47. package/lib/packageVersion.js +1 -1
  48. package/lib/packageVersion.js.map +1 -1
  49. package/package.json +11 -11
  50. package/src/connectionStateHandler.ts +8 -0
  51. package/src/container.ts +126 -148
  52. package/src/containerContext.ts +4 -0
  53. package/src/deltaManager.ts +35 -35
  54. package/src/loader.ts +29 -19
  55. package/src/packageVersion.ts +1 -1
package/src/loader.ts CHANGED
@@ -41,6 +41,7 @@ import {
41
41
  } from "@fluidframework/driver-utils";
42
42
  import { Container } from "./container";
43
43
  import { IParsedUrl, parseUrl } from "./utils";
44
+ import { pkgVersion } from "./packageVersion";
44
45
 
45
46
  function canUseCache(request: IRequest): boolean {
46
47
  if (request.headers === undefined) {
@@ -124,32 +125,37 @@ export interface ILoaderOptions extends ILoaderOptions1{
124
125
  }
125
126
 
126
127
  /**
128
+ * @deprecated IFluidModuleWithDetails interface is moved to
129
+ * {@link @fluidframework/container-definition#IFluidModuleWithDetails}
130
+ * to have all the code loading modules in one package. #8193
127
131
  * Encapsulates a module entry point with corresponding code details.
128
132
  */
129
- export interface IFluidModuleWithDetails {
130
- /** Fluid code module that implements the runtime factory needed to instantiate the container runtime. */
131
- module: IFluidModule;
132
- /**
133
- * Code details associated with the module. Represents a document schema this module supports.
134
- * If the code loader implements the {@link @fluidframework/core-interfaces#IFluidCodeDetailsComparer} interface,
135
- * it'll be called to determine whether the module code details satisfy the new code proposal in the quorum.
136
- */
137
- details: IFluidCodeDetails;
138
- }
133
+ export interface IFluidModuleWithDetails {
134
+ /** Fluid code module that implements the runtime factory needed to instantiate the container runtime. */
135
+ module: IFluidModule;
136
+ /**
137
+ * Code details associated with the module. Represents a document schema this module supports.
138
+ * If the code loader implements the {@link @fluidframework/core-interfaces#IFluidCodeDetailsComparer} interface,
139
+ * it'll be called to determine whether the module code details satisfy the new code proposal in the quorum.
140
+ */
141
+ details: IFluidCodeDetails;
142
+ }
139
143
 
140
144
  /**
145
+ * @deprecated ICodeDetailsLoader interface is moved to {@link @fluidframework/container-definition#ICodeDetailsLoader}
146
+ * to have code loading modules in one package. #8193
141
147
  * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as
142
148
  * a package name and package version range.
143
149
  */
144
150
  export interface ICodeDetailsLoader
145
- extends Partial<IProvideFluidCodeDetailsComparer> {
146
- /**
147
- * Load the code module (package) that is capable to interact with the document.
148
- *
149
- * @param source - Code proposal that articulates the current schema the document is written in.
150
- * @returns - Code module entry point along with the code details associated with it.
151
- */
152
- load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;
151
+ extends Partial<IProvideFluidCodeDetailsComparer> {
152
+ /**
153
+ * Load the code module (package) that is capable to interact with the document.
154
+ *
155
+ * @param source - Code proposal that articulates the current schema the document is written in.
156
+ * @returns - Code module entry point along with the code details associated with it.
157
+ */
158
+ load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;
153
159
  }
154
160
 
155
161
  /**
@@ -279,13 +285,17 @@ export class Loader implements IHostLoader {
279
285
  if (loaderProps.options?.provideScopeLoader !== false) {
280
286
  scope.ILoader = this;
281
287
  }
288
+ const telemetryProps = {
289
+ loaderId: uuid(),
290
+ loaderVersion: pkgVersion,
291
+ };
282
292
  this.services = {
283
293
  urlResolver: createCachedResolver(MultiUrlResolver.create(loaderProps.urlResolver)),
284
294
  documentServiceFactory: MultiDocumentServiceFactory.create(loaderProps.documentServiceFactory),
285
295
  codeLoader: loaderProps.codeLoader,
286
296
  options: loaderProps.options ?? {},
287
297
  scope,
288
- subLogger: DebugLogger.mixinDebugLogger("fluid:telemetry", loaderProps.logger, { all:{loaderId: uuid()} }),
298
+ subLogger: DebugLogger.mixinDebugLogger("fluid:telemetry", loaderProps.logger, { all: telemetryProps }),
289
299
  proxyLoaderFactories: loaderProps.proxyLoaderFactories ?? new Map<string, IProxyLoaderFactory>(),
290
300
  detachedBlobStorage: loaderProps.detachedBlobStorage,
291
301
  };
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-loader";
9
- export const pkgVersion = "0.52.0-44610";
9
+ export const pkgVersion = "0.53.0";