@fluidframework/container-loader 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.217212
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/api-extractor-lint.json +13 -0
- package/api-extractor.json +0 -4
- package/api-report/container-loader.api.md +17 -17
- package/dist/connectionState.cjs +3 -0
- package/dist/connectionState.cjs.map +1 -1
- package/dist/connectionState.d.ts +3 -0
- package/dist/connectionState.d.ts.map +1 -1
- package/dist/container-loader-alpha.d.ts +25 -294
- package/dist/container-loader-beta.d.ts +67 -301
- package/dist/container-loader-public.d.ts +67 -301
- package/dist/container-loader-untrimmed.d.ts +23 -5
- package/dist/container.cjs +11 -8
- package/dist/container.cjs.map +1 -1
- package/dist/container.d.ts +4 -6
- package/dist/container.d.ts.map +1 -1
- package/dist/deltaManager.cjs +18 -1
- package/dist/deltaManager.cjs.map +1 -1
- package/dist/deltaManager.d.ts.map +1 -1
- package/dist/loader.cjs +2 -0
- package/dist/loader.cjs.map +1 -1
- package/dist/loader.d.ts +10 -0
- package/dist/loader.d.ts.map +1 -1
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.cjs +2 -0
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.cjs.map +1 -1
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts +2 -0
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
- package/dist/packageVersion.cjs +1 -1
- package/dist/packageVersion.cjs.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/protocol.cjs.map +1 -1
- package/dist/protocol.d.ts +4 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/utils.cjs +1 -0
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +2 -0
- package/dist/utils.d.ts.map +1 -1
- package/lib/connectionState.d.ts +3 -0
- package/lib/connectionState.d.ts.map +1 -1
- package/lib/connectionState.mjs +3 -0
- package/lib/connectionState.mjs.map +1 -1
- package/lib/container-loader-alpha.d.ts +25 -294
- package/lib/container-loader-beta.d.ts +67 -301
- package/lib/container-loader-public.d.ts +67 -301
- package/lib/container-loader-untrimmed.d.ts +23 -5
- package/lib/container.d.ts +4 -6
- package/lib/container.d.ts.map +1 -1
- package/lib/container.mjs +11 -8
- package/lib/container.mjs.map +1 -1
- package/lib/deltaManager.d.ts.map +1 -1
- package/lib/deltaManager.mjs +18 -1
- package/lib/deltaManager.mjs.map +1 -1
- package/lib/loader.d.ts +10 -0
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.mjs +2 -0
- package/lib/loader.mjs.map +1 -1
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts +2 -0
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.mjs +2 -0
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.mjs.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.mjs +1 -1
- package/lib/packageVersion.mjs.map +1 -1
- package/lib/protocol.d.ts +4 -0
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.mjs.map +1 -1
- package/lib/utils.d.ts +2 -0
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.mjs +1 -0
- package/lib/utils.mjs.map +1 -1
- package/package.json +12 -11
- package/src/connectionState.ts +3 -0
- package/src/container.ts +24 -13
- package/src/deltaManager.ts +25 -1
- package/src/loader.ts +10 -0
- package/src/location-redirection-utilities/resolveWithLocationRedirection.ts +2 -0
- package/src/packageVersion.ts +1 -1
- package/src/protocol.ts +4 -0
- package/src/utils.ts +2 -0
package/lib/container.mjs
CHANGED
|
@@ -44,6 +44,7 @@ const hasBlobsSummaryTree = ".hasAttachmentBlobs";
|
|
|
44
44
|
* but it maybe still behind.
|
|
45
45
|
*
|
|
46
46
|
* @throws an error beginning with `"Container closed"` if the container is closed before it catches up.
|
|
47
|
+
* @internal
|
|
47
48
|
*/
|
|
48
49
|
export async function waitContainerToCatchUp(container) {
|
|
49
50
|
// Make sure we stop waiting if container is closed.
|
|
@@ -412,11 +413,12 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
412
413
|
...createParamOverrides,
|
|
413
414
|
});
|
|
414
415
|
};
|
|
416
|
+
this._containerId = uuid();
|
|
417
|
+
this.client = Container.setupClient(this._containerId, this.options, this.clientDetailsOverride);
|
|
415
418
|
// Create logger for data stores to use
|
|
416
419
|
const type = this.client.details.type;
|
|
417
420
|
const interactive = this.client.details.capabilities.interactive;
|
|
418
421
|
const clientType = `${interactive ? "interactive" : "noninteractive"}${type !== undefined && type !== "" ? `/${type}` : ""}`;
|
|
419
|
-
this._containerId = uuid();
|
|
420
422
|
// Need to use the property getter for docId because for detached flow we don't have the docId initially.
|
|
421
423
|
// We assign the id later so property getter is used.
|
|
422
424
|
this.subLogger = createChildLogger({
|
|
@@ -1248,9 +1250,10 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1248
1250
|
const pkg = getCodeProposal(quorum);
|
|
1249
1251
|
return pkg;
|
|
1250
1252
|
}
|
|
1251
|
-
|
|
1252
|
-
const
|
|
1253
|
-
|
|
1253
|
+
static setupClient(containerId, options, clientDetailsOverride) {
|
|
1254
|
+
const loaderOptionsClient = structuredClone(options?.client);
|
|
1255
|
+
const client = loaderOptionsClient !== undefined
|
|
1256
|
+
? loaderOptionsClient
|
|
1254
1257
|
: {
|
|
1255
1258
|
details: {
|
|
1256
1259
|
capabilities: { interactive: true },
|
|
@@ -1260,20 +1263,20 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1260
1263
|
scopes: [],
|
|
1261
1264
|
user: { id: "" },
|
|
1262
1265
|
};
|
|
1263
|
-
if (
|
|
1266
|
+
if (clientDetailsOverride !== undefined) {
|
|
1264
1267
|
client.details = {
|
|
1265
1268
|
...client.details,
|
|
1266
|
-
...
|
|
1269
|
+
...clientDetailsOverride,
|
|
1267
1270
|
capabilities: {
|
|
1268
1271
|
...client.details.capabilities,
|
|
1269
|
-
...
|
|
1272
|
+
...clientDetailsOverride?.capabilities,
|
|
1270
1273
|
},
|
|
1271
1274
|
};
|
|
1272
1275
|
}
|
|
1273
1276
|
client.details.environment = [
|
|
1274
1277
|
client.details.environment,
|
|
1275
1278
|
` loaderVersion:${pkgVersion}`,
|
|
1276
|
-
` containerId:${
|
|
1279
|
+
` containerId:${containerId}`,
|
|
1277
1280
|
].join(";");
|
|
1278
1281
|
return client;
|
|
1279
1282
|
}
|