@fluidframework/container-loader 2.0.2 → 2.1.0-276326
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/.eslintrc.cjs +2 -5
- package/api-extractor/api-extractor.legacy.json +4 -0
- package/api-report/container-loader.beta.api.md +0 -27
- package/api-report/{container-loader.alpha.api.md → container-loader.legacy.alpha.api.md} +0 -27
- package/api-report/container-loader.public.api.md +0 -27
- package/dist/attachment.d.ts +2 -1
- package/dist/attachment.d.ts.map +1 -1
- package/dist/attachment.js.map +1 -1
- package/dist/audience.d.ts.map +1 -1
- package/dist/audience.js +4 -4
- package/dist/audience.js.map +1 -1
- package/dist/catchUpMonitor.d.ts +15 -4
- package/dist/catchUpMonitor.d.ts.map +1 -1
- package/dist/catchUpMonitor.js +12 -3
- package/dist/catchUpMonitor.js.map +1 -1
- package/dist/connectionManager.d.ts +24 -8
- package/dist/connectionManager.d.ts.map +1 -1
- package/dist/connectionManager.js +36 -23
- package/dist/connectionManager.js.map +1 -1
- package/dist/connectionStateHandler.d.ts +30 -20
- package/dist/connectionStateHandler.d.ts.map +1 -1
- package/dist/connectionStateHandler.js +15 -11
- package/dist/connectionStateHandler.js.map +1 -1
- package/dist/container.d.ts +7 -2
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +45 -28
- package/dist/container.js.map +1 -1
- package/dist/containerContext.d.ts +8 -4
- package/dist/containerContext.d.ts.map +1 -1
- package/dist/containerContext.js +3 -1
- package/dist/containerContext.js.map +1 -1
- package/dist/containerStorageAdapter.d.ts +1 -1
- package/dist/containerStorageAdapter.d.ts.map +1 -1
- package/dist/containerStorageAdapter.js +12 -6
- package/dist/containerStorageAdapter.js.map +1 -1
- package/dist/contracts.d.ts +17 -8
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +4 -2
- package/dist/contracts.js.map +1 -1
- package/dist/debugLogger.js +3 -3
- package/dist/debugLogger.js.map +1 -1
- package/dist/deltaManager.d.ts +13 -9
- package/dist/deltaManager.d.ts.map +1 -1
- package/dist/deltaManager.js +32 -23
- package/dist/deltaManager.js.map +1 -1
- package/dist/deltaQueue.d.ts +1 -4
- package/dist/deltaQueue.d.ts.map +1 -1
- package/dist/deltaQueue.js +2 -2
- package/dist/deltaQueue.js.map +1 -1
- package/dist/disposal.d.ts +1 -1
- package/dist/disposal.d.ts.map +1 -1
- package/dist/disposal.js.map +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js.map +1 -1
- package/dist/legacy.d.ts +1 -1
- package/dist/loadPaused.d.ts +2 -2
- package/dist/loadPaused.d.ts.map +1 -1
- package/dist/loadPaused.js +7 -3
- package/dist/loadPaused.js.map +1 -1
- package/dist/loader.d.ts +10 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +11 -1
- package/dist/loader.js.map +1 -1
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts +2 -1
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.js +3 -1
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.js.map +1 -1
- package/dist/memoryBlobStorage.d.ts.map +1 -1
- package/dist/memoryBlobStorage.js +4 -2
- package/dist/memoryBlobStorage.js.map +1 -1
- package/dist/noopHeuristic.js +1 -1
- package/dist/noopHeuristic.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/protocol/protocol.d.ts +4 -3
- package/dist/protocol/protocol.d.ts.map +1 -1
- package/dist/protocol/protocol.js +6 -5
- package/dist/protocol/protocol.js.map +1 -1
- package/dist/protocol/quorum.d.ts +11 -8
- package/dist/protocol/quorum.d.ts.map +1 -1
- package/dist/protocol/quorum.js +8 -8
- package/dist/protocol/quorum.js.map +1 -1
- package/dist/protocol.d.ts +2 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +7 -2
- package/dist/protocol.js.map +1 -1
- package/dist/protocolTreeDocumentStorageService.d.ts +2 -2
- package/dist/protocolTreeDocumentStorageService.d.ts.map +1 -1
- package/dist/protocolTreeDocumentStorageService.js.map +1 -1
- package/dist/retriableDocumentStorageService.d.ts.map +1 -1
- package/dist/retriableDocumentStorageService.js +4 -1
- package/dist/retriableDocumentStorageService.js.map +1 -1
- package/dist/serializedStateManager.d.ts +29 -12
- package/dist/serializedStateManager.d.ts.map +1 -1
- package/dist/serializedStateManager.js +55 -24
- package/dist/serializedStateManager.js.map +1 -1
- package/dist/utils.d.ts +4 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +15 -6
- package/dist/utils.js.map +1 -1
- package/lib/attachment.d.ts +2 -1
- package/lib/attachment.d.ts.map +1 -1
- package/lib/attachment.js.map +1 -1
- package/lib/audience.d.ts.map +1 -1
- package/lib/audience.js +4 -4
- package/lib/audience.js.map +1 -1
- package/lib/catchUpMonitor.d.ts +15 -4
- package/lib/catchUpMonitor.d.ts.map +1 -1
- package/lib/catchUpMonitor.js +12 -3
- package/lib/catchUpMonitor.js.map +1 -1
- package/lib/connectionManager.d.ts +24 -8
- package/lib/connectionManager.d.ts.map +1 -1
- package/lib/connectionManager.js +36 -23
- package/lib/connectionManager.js.map +1 -1
- package/lib/connectionStateHandler.d.ts +30 -20
- package/lib/connectionStateHandler.d.ts.map +1 -1
- package/lib/connectionStateHandler.js +14 -12
- package/lib/connectionStateHandler.js.map +1 -1
- package/lib/container.d.ts +7 -2
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +45 -28
- package/lib/container.js.map +1 -1
- package/lib/containerContext.d.ts +8 -4
- package/lib/containerContext.d.ts.map +1 -1
- package/lib/containerContext.js +3 -1
- package/lib/containerContext.js.map +1 -1
- package/lib/containerStorageAdapter.d.ts +1 -1
- package/lib/containerStorageAdapter.d.ts.map +1 -1
- package/lib/containerStorageAdapter.js +12 -6
- package/lib/containerStorageAdapter.js.map +1 -1
- package/lib/contracts.d.ts +17 -8
- package/lib/contracts.d.ts.map +1 -1
- package/lib/contracts.js +4 -2
- package/lib/contracts.js.map +1 -1
- package/lib/debugLogger.js +3 -3
- package/lib/debugLogger.js.map +1 -1
- package/lib/deltaManager.d.ts +13 -9
- package/lib/deltaManager.d.ts.map +1 -1
- package/lib/deltaManager.js +32 -23
- package/lib/deltaManager.js.map +1 -1
- package/lib/deltaQueue.d.ts +1 -4
- package/lib/deltaQueue.d.ts.map +1 -1
- package/lib/deltaQueue.js +2 -2
- package/lib/deltaQueue.js.map +1 -1
- package/lib/disposal.d.ts +1 -1
- package/lib/disposal.d.ts.map +1 -1
- package/lib/disposal.js.map +1 -1
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/legacy.d.ts +1 -1
- package/lib/loadPaused.d.ts +2 -2
- package/lib/loadPaused.d.ts.map +1 -1
- package/lib/loadPaused.js +8 -4
- package/lib/loadPaused.js.map +1 -1
- package/lib/loader.d.ts +10 -1
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js +11 -1
- package/lib/loader.js.map +1 -1
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts +2 -1
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.js +3 -1
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.js.map +1 -1
- package/lib/memoryBlobStorage.d.ts.map +1 -1
- package/lib/memoryBlobStorage.js +4 -2
- package/lib/memoryBlobStorage.js.map +1 -1
- package/lib/noopHeuristic.js +1 -1
- package/lib/noopHeuristic.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/protocol/protocol.d.ts +4 -3
- package/lib/protocol/protocol.d.ts.map +1 -1
- package/lib/protocol/protocol.js +6 -5
- package/lib/protocol/protocol.js.map +1 -1
- package/lib/protocol/quorum.d.ts +11 -8
- package/lib/protocol/quorum.d.ts.map +1 -1
- package/lib/protocol/quorum.js +8 -8
- package/lib/protocol/quorum.js.map +1 -1
- package/lib/protocol.d.ts +2 -0
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +7 -2
- package/lib/protocol.js.map +1 -1
- package/lib/protocolTreeDocumentStorageService.d.ts +2 -2
- package/lib/protocolTreeDocumentStorageService.d.ts.map +1 -1
- package/lib/protocolTreeDocumentStorageService.js.map +1 -1
- package/lib/retriableDocumentStorageService.d.ts.map +1 -1
- package/lib/retriableDocumentStorageService.js +4 -1
- package/lib/retriableDocumentStorageService.js.map +1 -1
- package/lib/serializedStateManager.d.ts +29 -12
- package/lib/serializedStateManager.d.ts.map +1 -1
- package/lib/serializedStateManager.js +56 -25
- package/lib/serializedStateManager.js.map +1 -1
- package/lib/utils.d.ts +4 -2
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +16 -7
- package/lib/utils.js.map +1 -1
- package/package.json +21 -17
- package/src/attachment.ts +2 -1
- package/src/audience.ts +4 -4
- package/src/catchUpMonitor.ts +23 -8
- package/src/connectionManager.ts +85 -60
- package/src/connectionStateHandler.ts +85 -63
- package/src/container.ts +118 -84
- package/src/containerContext.ts +5 -3
- package/src/containerStorageAdapter.ts +20 -13
- package/src/contracts.ts +21 -9
- package/src/debugLogger.ts +4 -4
- package/src/deltaManager.ts +75 -56
- package/src/deltaQueue.ts +16 -10
- package/src/disposal.ts +3 -3
- package/src/error.ts +2 -1
- package/src/loadPaused.ts +16 -8
- package/src/loader.ts +20 -2
- package/src/location-redirection-utilities/resolveWithLocationRedirection.ts +7 -3
- package/src/memoryBlobStorage.ts +5 -3
- package/src/noopHeuristic.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/protocol/protocol.ts +12 -11
- package/src/protocol/quorum.ts +49 -40
- package/src/protocol.ts +12 -4
- package/src/protocolTreeDocumentStorageService.ts +3 -2
- package/src/retriableDocumentStorageService.ts +6 -3
- package/src/serializedStateManager.ts +95 -39
- package/src/utils.ts +26 -10
package/lib/container.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
/* eslint-disable unicorn/consistent-function-scoping */
|
|
5
6
|
import { TypedEventEmitter, performance } from "@fluid-internal/client-utils";
|
|
6
7
|
import { AttachState, } from "@fluidframework/container-definitions";
|
|
7
8
|
import { isFluidCodeDetails, } from "@fluidframework/container-definitions/internal";
|
|
@@ -50,6 +51,7 @@ const packageNotFactoryError = "Code package does not implement IRuntimeFactory"
|
|
|
50
51
|
* but it maybe still behind.
|
|
51
52
|
*
|
|
52
53
|
* @throws an error beginning with `"Container closed"` if the container is closed before it catches up.
|
|
54
|
+
* @legacy
|
|
53
55
|
* @alpha
|
|
54
56
|
*/
|
|
55
57
|
export async function waitContainerToCatchUp(container) {
|
|
@@ -62,9 +64,9 @@ export async function waitContainerToCatchUp(container) {
|
|
|
62
64
|
const closedCallback = (err) => {
|
|
63
65
|
container.off("closed", closedCallback);
|
|
64
66
|
const baseMessage = "Container closed while waiting to catch up";
|
|
65
|
-
reject(err
|
|
66
|
-
?
|
|
67
|
-
: new GenericError(baseMessage));
|
|
67
|
+
reject(err === undefined
|
|
68
|
+
? new GenericError(baseMessage)
|
|
69
|
+
: wrapError(err, (innerMessage) => new GenericError(`${baseMessage}: ${innerMessage}`)));
|
|
68
70
|
};
|
|
69
71
|
container.on("closed", closedCallback);
|
|
70
72
|
// Depending on config, transition to "connected" state may include the guarantee
|
|
@@ -388,7 +390,9 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
388
390
|
* disposed: Container has been disposed
|
|
389
391
|
*/
|
|
390
392
|
this._lifecycleState = "loading";
|
|
391
|
-
/**
|
|
393
|
+
/**
|
|
394
|
+
* During initialization we pause the inbound queues. We track this state to ensure we only call resume once
|
|
395
|
+
*/
|
|
392
396
|
this.inboundQueuePausedFromInit = true;
|
|
393
397
|
this.firstConnection = true;
|
|
394
398
|
this.connectionTransitionTimes = [];
|
|
@@ -640,7 +644,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
640
644
|
const offlineLoadEnabled = (this.isInteractiveClient &&
|
|
641
645
|
this.mc.config.getBoolean("Fluid.Container.enableOfflineLoad")) ??
|
|
642
646
|
options.enableOfflineLoad === true;
|
|
643
|
-
this.serializedStateManager = new SerializedStateManager(pendingLocalState, this.subLogger, this.storageAdapter, offlineLoadEnabled, this, () => this._deltaManager.connectionManager.shouldJoinWrite(), () => this.supportGetSnapshotApi());
|
|
647
|
+
this.serializedStateManager = new SerializedStateManager(pendingLocalState, this.subLogger, this.storageAdapter, offlineLoadEnabled, this, () => this._deltaManager.connectionManager.shouldJoinWrite(), () => this.supportGetSnapshotApi(), this.mc.config.getNumber("Fluid.Container.snapshotRefreshTimeoutMs"));
|
|
644
648
|
const isDomAvailable = typeof document === "object" &&
|
|
645
649
|
document !== null &&
|
|
646
650
|
typeof document.addEventListener === "function" &&
|
|
@@ -705,8 +709,8 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
705
709
|
this._protocolHandler?.close();
|
|
706
710
|
this.connectionStateHandler.dispose();
|
|
707
711
|
}
|
|
708
|
-
catch (
|
|
709
|
-
this.mc.logger.sendErrorEvent({ eventName: "ContainerCloseException" },
|
|
712
|
+
catch (newError) {
|
|
713
|
+
this.mc.logger.sendErrorEvent({ eventName: "ContainerCloseException" }, newError);
|
|
710
714
|
}
|
|
711
715
|
this.emit("closed", error);
|
|
712
716
|
if (this.visibilityEventHandler !== undefined) {
|
|
@@ -740,7 +744,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
740
744
|
}
|
|
741
745
|
this._protocolHandler?.close();
|
|
742
746
|
this.connectionStateHandler.dispose();
|
|
743
|
-
const maybeError = error
|
|
747
|
+
const maybeError = error === undefined ? undefined : new Error(error.message);
|
|
744
748
|
this._runtime?.dispose(maybeError);
|
|
745
749
|
this.storageAdapter.dispose();
|
|
746
750
|
// Notify storage about critical errors. They may be due to disconnect between client & server knowledge
|
|
@@ -748,8 +752,8 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
748
752
|
// Driver need to ensure all caches are cleared on critical errors
|
|
749
753
|
this.service?.dispose(error);
|
|
750
754
|
}
|
|
751
|
-
catch (
|
|
752
|
-
this.mc.logger.sendErrorEvent({ eventName: "ContainerDisposeException" },
|
|
755
|
+
catch (error_) {
|
|
756
|
+
this.mc.logger.sendErrorEvent({ eventName: "ContainerDisposeException" }, error_);
|
|
753
757
|
}
|
|
754
758
|
this.emit("disposed", error);
|
|
755
759
|
this.removeAllListeners();
|
|
@@ -807,7 +811,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
807
811
|
const combinedSummary = attachingData?.summary ??
|
|
808
812
|
combineAppAndProtocolSummary(this.runtime.createSummary(), this.captureProtocolSummary());
|
|
809
813
|
const { baseSnapshot, snapshotBlobs } = getSnapshotTreeAndBlobsFromSerializedContainer(combinedSummary);
|
|
810
|
-
const pendingRuntimeState = attachingData
|
|
814
|
+
const pendingRuntimeState = attachingData === undefined ? undefined : this.runtime.getPendingLocalState();
|
|
811
815
|
assert(!isPromiseLike(pendingRuntimeState), 0x8e3 /* should not be a promise */);
|
|
812
816
|
const detachedContainerState = {
|
|
813
817
|
attached: false,
|
|
@@ -1007,17 +1011,20 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1007
1011
|
// Attach op handlers to finish initialization and be able to start processing ops
|
|
1008
1012
|
// Kick off any ops fetching if required.
|
|
1009
1013
|
switch (loadMode.opsBeforeReturn) {
|
|
1010
|
-
case undefined:
|
|
1014
|
+
case undefined: {
|
|
1011
1015
|
// Start prefetch, but not set opsBeforeReturnP - boot is not blocked by it!
|
|
1012
1016
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
1013
|
-
this.attachDeltaManagerOpHandler(attributes, loadMode.deltaConnection
|
|
1017
|
+
this.attachDeltaManagerOpHandler(attributes, loadMode.deltaConnection === "none" ? "none" : "all", lastProcessedSequenceNumber);
|
|
1014
1018
|
break;
|
|
1019
|
+
}
|
|
1015
1020
|
case "cached":
|
|
1016
|
-
case "all":
|
|
1021
|
+
case "all": {
|
|
1017
1022
|
opsBeforeReturnP = this.attachDeltaManagerOpHandler(attributes, loadMode.opsBeforeReturn, lastProcessedSequenceNumber);
|
|
1018
1023
|
break;
|
|
1019
|
-
|
|
1024
|
+
}
|
|
1025
|
+
default: {
|
|
1020
1026
|
unreachableCase(loadMode.opsBeforeReturn);
|
|
1027
|
+
}
|
|
1021
1028
|
}
|
|
1022
1029
|
// ...load in the existing quorum
|
|
1023
1030
|
// Initialize the protocol handler
|
|
@@ -1139,7 +1146,9 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1139
1146
|
this.initializeProtocolState(attributes, quorumSnapshot);
|
|
1140
1147
|
}
|
|
1141
1148
|
initializeProtocolState(attributes, quorumSnapshot) {
|
|
1142
|
-
const protocol = this.protocolHandlerBuilder(attributes, quorumSnapshot, (key, value) =>
|
|
1149
|
+
const protocol = this.protocolHandlerBuilder(attributes, quorumSnapshot, (key, value) =>
|
|
1150
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
1151
|
+
this.submitMessage(MessageType.Propose, JSON.stringify({ key, value })));
|
|
1143
1152
|
const protocolLogger = createChildLogger({
|
|
1144
1153
|
logger: this.subLogger,
|
|
1145
1154
|
namespace: "ProtocolHandler",
|
|
@@ -1203,9 +1212,8 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1203
1212
|
return pkg;
|
|
1204
1213
|
}
|
|
1205
1214
|
static setupClient(containerId, loaderOptionsClient, clientDetailsOverride) {
|
|
1206
|
-
const client = loaderOptionsClient
|
|
1207
|
-
?
|
|
1208
|
-
: {
|
|
1215
|
+
const client = loaderOptionsClient === undefined
|
|
1216
|
+
? {
|
|
1209
1217
|
details: {
|
|
1210
1218
|
capabilities: { interactive: true },
|
|
1211
1219
|
},
|
|
@@ -1213,7 +1221,8 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1213
1221
|
permission: [],
|
|
1214
1222
|
scopes: [],
|
|
1215
1223
|
user: { id: "" },
|
|
1216
|
-
}
|
|
1224
|
+
}
|
|
1225
|
+
: structuredClone(loaderOptionsClient);
|
|
1217
1226
|
if (clientDetailsOverride !== undefined) {
|
|
1218
1227
|
client.details = {
|
|
1219
1228
|
...client.details,
|
|
@@ -1356,7 +1365,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1356
1365
|
autoReconnect,
|
|
1357
1366
|
opsBehind,
|
|
1358
1367
|
online: OnlineStatus[isOnline()],
|
|
1359
|
-
lastVisible: this.lastVisible
|
|
1368
|
+
lastVisible: this.lastVisible === undefined ? undefined : performance.now() - this.lastVisible,
|
|
1360
1369
|
checkpointSequenceNumber,
|
|
1361
1370
|
quorumSize: this._protocolHandler?.quorum.getMembers().size,
|
|
1362
1371
|
isDirty: this.isDirty,
|
|
@@ -1387,10 +1396,12 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1387
1396
|
// back-compat: ADO #1385: Remove in the future, summary op should come through submitSummaryMessage()
|
|
1388
1397
|
submitContainerMessage(type, contents, batch, metadata) {
|
|
1389
1398
|
switch (type) {
|
|
1390
|
-
case MessageType.Operation:
|
|
1399
|
+
case MessageType.Operation: {
|
|
1391
1400
|
return this.submitMessage(type, JSON.stringify(contents), batch, metadata);
|
|
1392
|
-
|
|
1401
|
+
}
|
|
1402
|
+
case MessageType.Summarize: {
|
|
1393
1403
|
return this.submitSummaryMessage(contents);
|
|
1404
|
+
}
|
|
1394
1405
|
default: {
|
|
1395
1406
|
const newError = new GenericError("invalidContainerSubmitOpType", undefined /* error */, { messageType: type });
|
|
1396
1407
|
this.close(newError);
|
|
@@ -1398,7 +1409,9 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1398
1409
|
}
|
|
1399
1410
|
}
|
|
1400
1411
|
}
|
|
1401
|
-
/**
|
|
1412
|
+
/**
|
|
1413
|
+
* Gets the `clientSequenceNumber` of last message in a batch.
|
|
1414
|
+
*/
|
|
1402
1415
|
submitBatch(batch, referenceSequenceNumber) {
|
|
1403
1416
|
let clientSequenceNumber = -1;
|
|
1404
1417
|
for (const message of batch) {
|
|
@@ -1524,22 +1537,26 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1524
1537
|
// and runtime implementation may miss such events.
|
|
1525
1538
|
assert(this.loaded, 0x96f /* has to be called after container transitions to loaded state */);
|
|
1526
1539
|
switch (deltaConnectionArg) {
|
|
1527
|
-
case undefined:
|
|
1540
|
+
case undefined: {
|
|
1528
1541
|
if (connectionArgs) {
|
|
1529
1542
|
// connect to delta stream now since we did not before
|
|
1530
1543
|
this.connectToDeltaStream(connectionArgs);
|
|
1531
1544
|
}
|
|
1545
|
+
}
|
|
1532
1546
|
// intentional fallthrough
|
|
1533
|
-
case "delayed":
|
|
1547
|
+
case "delayed": {
|
|
1534
1548
|
assert(this.inboundQueuePausedFromInit, 0x346 /* inboundQueuePausedFromInit should be true */);
|
|
1535
1549
|
this.inboundQueuePausedFromInit = false;
|
|
1536
1550
|
this._deltaManager.inbound.resume();
|
|
1537
1551
|
this._deltaManager.inboundSignal.resume();
|
|
1538
1552
|
break;
|
|
1539
|
-
|
|
1553
|
+
}
|
|
1554
|
+
case "none": {
|
|
1540
1555
|
break;
|
|
1541
|
-
|
|
1556
|
+
}
|
|
1557
|
+
default: {
|
|
1542
1558
|
unreachableCase(deltaConnectionArg);
|
|
1559
|
+
}
|
|
1543
1560
|
}
|
|
1544
1561
|
}
|
|
1545
1562
|
}
|