@fluidframework/container-loader 0.52.1 → 0.53.0-46105
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.
- package/dist/connectionStateHandler.d.ts +1 -0
- package/dist/connectionStateHandler.d.ts.map +1 -1
- package/dist/connectionStateHandler.js +6 -0
- package/dist/connectionStateHandler.js.map +1 -1
- package/dist/container.d.ts +0 -21
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +96 -123
- package/dist/container.js.map +1 -1
- package/dist/containerContext.d.ts +1 -0
- package/dist/containerContext.d.ts.map +1 -1
- package/dist/containerContext.js +4 -0
- package/dist/containerContext.js.map +1 -1
- package/dist/deltaManager.d.ts +0 -7
- package/dist/deltaManager.d.ts.map +1 -1
- package/dist/deltaManager.js +31 -32
- package/dist/deltaManager.js.map +1 -1
- package/dist/loader.d.ts +5 -0
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +6 -1
- package/dist/loader.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/connectionStateHandler.d.ts +1 -0
- package/lib/connectionStateHandler.d.ts.map +1 -1
- package/lib/connectionStateHandler.js +6 -0
- package/lib/connectionStateHandler.js.map +1 -1
- package/lib/container.d.ts +0 -21
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +97 -124
- package/lib/container.js.map +1 -1
- package/lib/containerContext.d.ts +1 -0
- package/lib/containerContext.d.ts.map +1 -1
- package/lib/containerContext.js +4 -0
- package/lib/containerContext.js.map +1 -1
- package/lib/deltaManager.d.ts +0 -7
- package/lib/deltaManager.d.ts.map +1 -1
- package/lib/deltaManager.js +31 -32
- package/lib/deltaManager.js.map +1 -1
- package/lib/loader.d.ts +5 -0
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js +6 -1
- package/lib/loader.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +8 -8
- package/src/connectionStateHandler.ts +8 -0
- package/src/container.ts +126 -148
- package/src/containerContext.ts +4 -0
- package/src/deltaManager.ts +35 -34
- package/src/loader.ts +29 -19
- 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
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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:
|
|
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
|
};
|
package/src/packageVersion.ts
CHANGED