@fluidframework/container-loader 2.0.0-internal.1.1.1 → 2.0.0-internal.1.1.3

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.
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/container-loader";
8
- export declare const pkgVersion = "2.0.0-internal.1.1.1";
8
+ export declare const pkgVersion = "2.0.0-internal.1.1.3";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/container-loader";
8
- export const pkgVersion = "2.0.0-internal.1.1.1";
8
+ export const pkgVersion = "2.0.0-internal.1.1.3";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,kCAAkC,CAAC;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.0.0-internal.1.1.1\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,kCAAkC,CAAC;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.0.0-internal.1.1.3\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-loader",
3
- "version": "2.0.0-internal.1.1.1",
3
+ "version": "2.0.0-internal.1.1.3",
4
4
  "description": "Fluid container loader",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -63,14 +63,14 @@
63
63
  "dependencies": {
64
64
  "@fluidframework/common-definitions": "^0.20.1",
65
65
  "@fluidframework/common-utils": "^1.0.0",
66
- "@fluidframework/container-definitions": "^2.0.0-internal.1.1.1",
67
- "@fluidframework/container-utils": "^2.0.0-internal.1.1.1",
68
- "@fluidframework/core-interfaces": "^2.0.0-internal.1.1.1",
69
- "@fluidframework/driver-definitions": "^2.0.0-internal.1.1.1",
70
- "@fluidframework/driver-utils": "^2.0.0-internal.1.1.1",
66
+ "@fluidframework/container-definitions": "^2.0.0-internal.1.1.3",
67
+ "@fluidframework/container-utils": "^2.0.0-internal.1.1.3",
68
+ "@fluidframework/core-interfaces": "^2.0.0-internal.1.1.3",
69
+ "@fluidframework/driver-definitions": "^2.0.0-internal.1.1.3",
70
+ "@fluidframework/driver-utils": "^2.0.0-internal.1.1.3",
71
71
  "@fluidframework/protocol-base": "^0.1037.1000",
72
72
  "@fluidframework/protocol-definitions": "^1.0.0",
73
- "@fluidframework/telemetry-utils": "^2.0.0-internal.1.1.1",
73
+ "@fluidframework/telemetry-utils": "^2.0.0-internal.1.1.3",
74
74
  "abort-controller": "^3.0.0",
75
75
  "double-ended-queue": "^2.1.0-0",
76
76
  "lodash": "^4.17.21",
@@ -82,8 +82,8 @@
82
82
  "@fluidframework/build-tools": "^0.3.1000",
83
83
  "@fluidframework/container-loader-previous": "npm:@fluidframework/container-loader@^1.0.0",
84
84
  "@fluidframework/eslint-config-fluid": "^0.28.2000",
85
- "@fluidframework/mocha-test-setup": "^2.0.0-internal.1.1.1",
86
- "@fluidframework/test-loader-utils": "^2.0.0-internal.1.1.1",
85
+ "@fluidframework/mocha-test-setup": "^2.0.0-internal.1.1.3",
86
+ "@fluidframework/test-loader-utils": "^2.0.0-internal.1.1.3",
87
87
  "@microsoft/api-extractor": "^7.22.2",
88
88
  "@rushstack/eslint-config": "^2.5.1",
89
89
  "@types/double-ended-queue": "^2.1.0",
package/src/container.ts CHANGED
@@ -1192,12 +1192,13 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
1192
1192
 
1193
1193
  // ...load in the existing quorum
1194
1194
  // Initialize the protocol handler
1195
- this._protocolHandler = pendingLocalState === undefined
1196
- ? await this.initializeProtocolStateFromSnapshot(
1195
+ if (pendingLocalState === undefined) {
1196
+ await this.initializeProtocolStateFromSnapshot(
1197
1197
  attributes,
1198
1198
  this.storageService,
1199
- snapshot,
1200
- ) : await this.initializeProtocolState(
1199
+ snapshot);
1200
+ } else {
1201
+ this.initializeProtocolState(
1201
1202
  attributes,
1202
1203
  {
1203
1204
  members: pendingLocalState.protocol.members,
@@ -1205,6 +1206,7 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
1205
1206
  values: pendingLocalState.protocol.values,
1206
1207
  }, // pending IQuorumSnapshot
1207
1208
  );
1209
+ }
1208
1210
 
1209
1211
  const codeDetails = this.getCodeDetailsFromQuorum();
1210
1212
  await this.instantiateContext(
@@ -1279,7 +1281,7 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
1279
1281
 
1280
1282
  // Need to just seed the source data in the code quorum. Quorum itself is empty
1281
1283
  const qValues = initQuorumValuesFromCodeDetails(source);
1282
- this._protocolHandler = await this.initializeProtocolState(
1284
+ this.initializeProtocolState(
1283
1285
  attributes,
1284
1286
  {
1285
1287
  members: [],
@@ -1316,15 +1318,14 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
1316
1318
  baseTree.blobs.quorumValues,
1317
1319
  );
1318
1320
  const codeDetails = getCodeDetailsFromQuorumValues(qValues);
1319
- this._protocolHandler =
1320
- await this.initializeProtocolState(
1321
- attributes,
1322
- {
1323
- members: [],
1324
- proposals: [],
1325
- values: codeDetails !== undefined ? initQuorumValuesFromCodeDetails(codeDetails) : [],
1326
- }, // IQuorumSnapShot
1327
- );
1321
+ this.initializeProtocolState(
1322
+ attributes,
1323
+ {
1324
+ members: [],
1325
+ proposals: [],
1326
+ values: codeDetails !== undefined ? initQuorumValuesFromCodeDetails(codeDetails) : [],
1327
+ }, // IQuorumSnapShot
1328
+ );
1328
1329
 
1329
1330
  await this.instantiateContextDetached(
1330
1331
  true, // existing
@@ -1387,7 +1388,7 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
1387
1388
  attributes: IDocumentAttributes,
1388
1389
  storage: IDocumentStorageService,
1389
1390
  snapshot: ISnapshotTree | undefined,
1390
- ): Promise<IProtocolHandler> {
1391
+ ): Promise<void> {
1391
1392
  const quorumSnapshot: IQuorumSnapshot = {
1392
1393
  members: [],
1393
1394
  proposals: [],
@@ -1403,14 +1404,13 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
1403
1404
  ]);
1404
1405
  }
1405
1406
 
1406
- const protocolHandler = await this.initializeProtocolState(attributes, quorumSnapshot);
1407
- return protocolHandler;
1407
+ this.initializeProtocolState(attributes, quorumSnapshot);
1408
1408
  }
1409
1409
 
1410
- private async initializeProtocolState(
1410
+ private initializeProtocolState(
1411
1411
  attributes: IDocumentAttributes,
1412
1412
  quorumSnapshot: IQuorumSnapshot,
1413
- ): Promise<IProtocolHandler> {
1413
+ ): void {
1414
1414
  const protocolHandlerBuilder =
1415
1415
  this.protocolHandlerBuilder ?? ((...args) => new ProtocolHandler(...args, new Audience()));
1416
1416
  const protocol = protocolHandlerBuilder(
@@ -1452,8 +1452,11 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
1452
1452
  });
1453
1453
  }
1454
1454
  });
1455
-
1456
- return protocol;
1455
+ // we need to make sure this member get set in a synchronous context,
1456
+ // or other things can happen after the object that will be set is created, but not yet set
1457
+ // this was breaking this._initialClients handling
1458
+ //
1459
+ this._protocolHandler = protocol;
1457
1460
  }
1458
1461
 
1459
1462
  private captureProtocolSummary(): ISummaryTree {
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-loader";
9
- export const pkgVersion = "2.0.0-internal.1.1.1";
9
+ export const pkgVersion = "2.0.0-internal.1.1.3";