@fluidframework/container-loader 0.57.1 → 0.58.0-55561
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/connectionManager.d.ts +2 -2
- package/dist/connectionManager.d.ts.map +1 -1
- package/dist/connectionManager.js +8 -12
- package/dist/connectionManager.js.map +1 -1
- package/dist/connectionStateHandler.d.ts +2 -3
- package/dist/connectionStateHandler.d.ts.map +1 -1
- package/dist/connectionStateHandler.js +9 -10
- package/dist/connectionStateHandler.js.map +1 -1
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +10 -9
- package/dist/container.js.map +1 -1
- package/dist/containerContext.d.ts +0 -6
- package/dist/containerContext.d.ts.map +1 -1
- package/dist/containerContext.js +0 -8
- package/dist/containerContext.js.map +1 -1
- package/dist/deltaManager.d.ts.map +1 -1
- package/dist/deltaManager.js +13 -23
- package/dist/deltaManager.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/dist/retriableDocumentStorageService.js +1 -1
- package/dist/retriableDocumentStorageService.js.map +1 -1
- package/lib/connectionManager.d.ts +2 -2
- package/lib/connectionManager.d.ts.map +1 -1
- package/lib/connectionManager.js +8 -12
- package/lib/connectionManager.js.map +1 -1
- package/lib/connectionStateHandler.d.ts +2 -3
- package/lib/connectionStateHandler.d.ts.map +1 -1
- package/lib/connectionStateHandler.js +9 -10
- package/lib/connectionStateHandler.js.map +1 -1
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +10 -9
- package/lib/container.js.map +1 -1
- package/lib/containerContext.d.ts +0 -6
- package/lib/containerContext.d.ts.map +1 -1
- package/lib/containerContext.js +0 -8
- package/lib/containerContext.js.map +1 -1
- package/lib/deltaManager.d.ts.map +1 -1
- package/lib/deltaManager.js +14 -24
- package/lib/deltaManager.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/lib/retriableDocumentStorageService.js +1 -1
- package/lib/retriableDocumentStorageService.js.map +1 -1
- package/package.json +9 -9
- package/src/connectionManager.ts +8 -15
- package/src/connectionStateHandler.ts +11 -12
- package/src/container.ts +10 -9
- package/src/containerContext.ts +0 -9
- package/src/deltaManager.ts +14 -26
- package/src/packageVersion.ts +1 -1
- package/src/retriableDocumentStorageService.ts +1 -1
package/lib/container.js
CHANGED
|
@@ -153,6 +153,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
153
153
|
error: {
|
|
154
154
|
// load information to associate errors with the specific load point
|
|
155
155
|
dmInitialSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.initialSequenceNumber; },
|
|
156
|
+
dmLastProcessedSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.lastSequenceNumber; },
|
|
156
157
|
dmLastKnownSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.lastKnownSeqNumber; },
|
|
157
158
|
containerLoadedFromVersionId: () => { var _a; return (_a = this.loadedFromVersion) === null || _a === void 0 ? void 0 : _a.id; },
|
|
158
159
|
containerLoadedFromVersionDate: () => { var _a; return (_a = this.loadedFromVersion) === null || _a === void 0 ? void 0 : _a.date; },
|
|
@@ -168,7 +169,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
168
169
|
const summarizeProtocolTree = (_c = this.mc.config.getBoolean("Fluid.Container.summarizeProtocolTree")) !== null && _c !== void 0 ? _c : this.loader.services.options.summarizeProtocolTree;
|
|
169
170
|
this.options = Object.assign(Object.assign({}, this.loader.services.options), { summarizeProtocolTree });
|
|
170
171
|
this.connectionStateHandler = new ConnectionStateHandler({
|
|
171
|
-
|
|
172
|
+
quorumClients: () => { var _a; return (_a = this._protocolHandler) === null || _a === void 0 ? void 0 : _a.quorum; },
|
|
172
173
|
logConnectionStateChangeTelemetry: (value, oldState, reason) => this.logConnectionStateChangeTelemetry(value, oldState, reason),
|
|
173
174
|
shouldClientJoinWrite: () => this._deltaManager.connectionManager.shouldJoinWrite(),
|
|
174
175
|
maxClientLeaveWaitTime: this.loader.services.options.maxClientLeaveWaitTime,
|
|
@@ -274,7 +275,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
274
275
|
assert(pendingLocalState === undefined || loadOptions.loadMode === undefined, 0x1e1 /* "pending state requires immediate connection!" */);
|
|
275
276
|
const mode = (_a = loadOptions.loadMode) !== null && _a !== void 0 ? _a : defaultMode;
|
|
276
277
|
const onClosed = (err) => {
|
|
277
|
-
reject(err !== null && err !== void 0 ? err : new GenericError("
|
|
278
|
+
reject(err !== null && err !== void 0 ? err : new GenericError("Container closed without error during load"));
|
|
278
279
|
};
|
|
279
280
|
container.on("closed", onClosed);
|
|
280
281
|
container.load(version, mode, pendingLocalState)
|
|
@@ -510,7 +511,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
510
511
|
async attach(request) {
|
|
511
512
|
await PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: "Attach" }, async () => {
|
|
512
513
|
if (this._lifecycleState !== "loaded") {
|
|
513
|
-
throw new UsageError(`
|
|
514
|
+
throw new UsageError(`The Container is not in a valid state for attach [${this._lifecycleState}]`);
|
|
514
515
|
}
|
|
515
516
|
// If container is already attached or attach is in progress, throw an error.
|
|
516
517
|
assert(this._attachState === AttachState.Detached && !this.attachStarted, 0x205 /* "attach() called more than once" */);
|
|
@@ -689,7 +690,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
689
690
|
this.deltaManager.inboundSignal.resume();
|
|
690
691
|
return;
|
|
691
692
|
}
|
|
692
|
-
this.close(new GenericError("
|
|
693
|
+
this.close(new GenericError("Existing context does not satisfy incoming proposal"));
|
|
693
694
|
}
|
|
694
695
|
async getVersion(version) {
|
|
695
696
|
const versions = await this.storageService.getVersions(version, 1);
|
|
@@ -1146,16 +1147,16 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1146
1147
|
// Check and report if we're getting messages from a clientId that we previously
|
|
1147
1148
|
// flagged as shouldHaveLeft, or from a client that's not in the quorum but should be
|
|
1148
1149
|
if (message.clientId != null) {
|
|
1149
|
-
let
|
|
1150
|
+
let errorMsg;
|
|
1150
1151
|
const client = this.getQuorum().getMember(message.clientId);
|
|
1151
1152
|
if (client === undefined && message.type !== MessageType.ClientJoin) {
|
|
1152
|
-
|
|
1153
|
+
errorMsg = "Remote message's clientId is missing from the quorum";
|
|
1153
1154
|
}
|
|
1154
1155
|
else if ((client === null || client === void 0 ? void 0 : client.shouldHaveLeft) === true && message.type !== MessageType.NoOp) {
|
|
1155
|
-
|
|
1156
|
+
errorMsg = "Remote message's clientId already should have left";
|
|
1156
1157
|
}
|
|
1157
|
-
if (
|
|
1158
|
-
const error = new DataCorruptionError(
|
|
1158
|
+
if (errorMsg !== undefined) {
|
|
1159
|
+
const error = new DataCorruptionError(errorMsg, extractSafePropertiesFromMessage(message));
|
|
1159
1160
|
this.close(normalizeError(error));
|
|
1160
1161
|
}
|
|
1161
1162
|
}
|