@fluidframework/container-loader 2.63.0-359734 → 2.63.0
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/CHANGELOG.md +4 -0
- package/api-report/container-loader.legacy.alpha.api.md +31 -0
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +12 -8
- package/dist/container.js.map +1 -1
- package/dist/containerStorageAdapter.d.ts +7 -13
- package/dist/containerStorageAdapter.d.ts.map +1 -1
- package/dist/containerStorageAdapter.js +9 -14
- package/dist/containerStorageAdapter.js.map +1 -1
- package/dist/createAndLoadContainerUtils.d.ts +13 -0
- package/dist/createAndLoadContainerUtils.d.ts.map +1 -1
- package/dist/createAndLoadContainerUtils.js +118 -2
- package/dist/createAndLoadContainerUtils.js.map +1 -1
- package/dist/frozenServices.d.ts +10 -1
- package/dist/frozenServices.d.ts.map +1 -1
- package/dist/frozenServices.js +24 -4
- package/dist/frozenServices.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/legacyAlpha.d.ts +7 -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/serializedStateManager.d.ts +10 -6
- package/dist/serializedStateManager.d.ts.map +1 -1
- package/dist/serializedStateManager.js +76 -77
- package/dist/serializedStateManager.js.map +1 -1
- package/dist/summarizerResultTypes.d.ts +96 -0
- package/dist/summarizerResultTypes.d.ts.map +1 -0
- package/dist/summarizerResultTypes.js +9 -0
- package/dist/summarizerResultTypes.js.map +1 -0
- package/dist/utils.d.ts +4 -5
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +14 -13
- package/dist/utils.js.map +1 -1
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +13 -9
- package/lib/container.js.map +1 -1
- package/lib/containerStorageAdapter.d.ts +7 -13
- package/lib/containerStorageAdapter.d.ts.map +1 -1
- package/lib/containerStorageAdapter.js +10 -15
- package/lib/containerStorageAdapter.js.map +1 -1
- package/lib/createAndLoadContainerUtils.d.ts +13 -0
- package/lib/createAndLoadContainerUtils.d.ts.map +1 -1
- package/lib/createAndLoadContainerUtils.js +117 -2
- package/lib/createAndLoadContainerUtils.js.map +1 -1
- package/lib/frozenServices.d.ts +10 -1
- package/lib/frozenServices.d.ts.map +1 -1
- package/lib/frozenServices.js +20 -1
- package/lib/frozenServices.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/legacyAlpha.d.ts +7 -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/serializedStateManager.d.ts +10 -6
- package/lib/serializedStateManager.d.ts.map +1 -1
- package/lib/serializedStateManager.js +78 -79
- package/lib/serializedStateManager.js.map +1 -1
- package/lib/summarizerResultTypes.d.ts +96 -0
- package/lib/summarizerResultTypes.d.ts.map +1 -0
- package/lib/summarizerResultTypes.js +6 -0
- package/lib/summarizerResultTypes.js.map +1 -0
- package/lib/utils.d.ts +4 -5
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +15 -14
- package/lib/utils.js.map +1 -1
- package/package.json +11 -11
- package/src/container.ts +19 -14
- package/src/containerStorageAdapter.ts +14 -18
- package/src/createAndLoadContainerUtils.ts +176 -2
- package/src/frozenServices.ts +28 -2
- package/src/index.ts +8 -0
- package/src/packageVersion.ts +1 -1
- package/src/serializedStateManager.ts +118 -109
- package/src/summarizerResultTypes.ts +115 -0
- package/src/utils.ts +20 -20
package/lib/container.js
CHANGED
|
@@ -31,7 +31,7 @@ import { pkgVersion } from "./packageVersion.js";
|
|
|
31
31
|
import { ProtocolHandler, protocolHandlerShouldProcessSignal, } from "./protocol.js";
|
|
32
32
|
import { initQuorumValuesFromCodeDetails } from "./quorum.js";
|
|
33
33
|
import { SerializedStateManager, } from "./serializedStateManager.js";
|
|
34
|
-
import { combineAppAndProtocolSummary, combineSnapshotTreeAndSnapshotBlobs, getDetachedContainerStateFromSerializedContainer, getDocumentAttributes, getProtocolSnapshotTree, getISnapshotFromSerializedContainer, runSingle, convertISnapshotToSnapshotWithBlobs, } from "./utils.js";
|
|
34
|
+
import { combineAppAndProtocolSummary, combineSnapshotTreeAndSnapshotBlobs, getDetachedContainerStateFromSerializedContainer, getDocumentAttributes, getProtocolSnapshotTree, getISnapshotFromSerializedContainer, runSingle, convertISnapshotToSnapshotWithBlobs, convertSnapshotInfoToSnapshot, } from "./utils.js";
|
|
35
35
|
const detachedContainerRefSeqNumber = 0;
|
|
36
36
|
const dirtyContainerEvent = "dirty";
|
|
37
37
|
const savedContainerEvent = "saved";
|
|
@@ -643,11 +643,11 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
643
643
|
this.attachState === AttachState.Attached
|
|
644
644
|
? undefined
|
|
645
645
|
: createMemoryDetachedBlobStorage();
|
|
646
|
-
this.storageAdapter = new ContainerStorageAdapter(this.detachedBlobStorage, this.mc.logger, pendingLocalState?.
|
|
646
|
+
this.storageAdapter = new ContainerStorageAdapter(this.detachedBlobStorage, this.mc.logger, pendingLocalState?.loadedGroupIdSnapshots, addProtocolSummaryIfMissing, enableSummarizeProtocolTree);
|
|
647
647
|
const offlineLoadEnabled = this.isInteractiveClient &&
|
|
648
648
|
(this.mc.config.getBoolean("Fluid.Container.enableOfflineLoad") ??
|
|
649
649
|
this.mc.config.getBoolean("Fluid.Container.enableOfflineFull") ??
|
|
650
|
-
options.enableOfflineLoad
|
|
650
|
+
options.enableOfflineLoad !== false);
|
|
651
651
|
this.serializedStateManager = new SerializedStateManager(this.subLogger, this.storageAdapter, offlineLoadEnabled, this, () => this._deltaManager.connectionManager.shouldJoinWrite(), () => this.supportGetSnapshotApi(), this.mc.config.getNumber("Fluid.Container.snapshotRefreshTimeoutMs"));
|
|
652
652
|
const isDomAvailable = typeof document === "object" &&
|
|
653
653
|
document !== null &&
|
|
@@ -1013,7 +1013,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1013
1013
|
};
|
|
1014
1014
|
timings.phase2 = performanceNow();
|
|
1015
1015
|
// Fetch specified snapshot.
|
|
1016
|
-
const { baseSnapshot, version, attributes } = await this.serializedStateManager.fetchSnapshot(specifiedVersion, pendingLocalState);
|
|
1016
|
+
const { snapshot: baseSnapshot, version, attributes, } = await this.serializedStateManager.fetchSnapshot(specifiedVersion, pendingLocalState);
|
|
1017
1017
|
const baseSnapshotTree = getSnapshotTree(baseSnapshot);
|
|
1018
1018
|
this._loadedFromVersion = version;
|
|
1019
1019
|
// If we saved ops, we will replay them and don't need DeltaManager to fetch them
|
|
@@ -1125,12 +1125,16 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
assert(this.detachedBlobStorage !== undefined && this.detachedBlobStorage.size > 0, 0x250 /* "serialized container with attachment blobs must be rehydrated with detached blob storage" */);
|
|
1127
1127
|
}
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1130
|
-
|
|
1128
|
+
const snapshot = convertSnapshotInfoToSnapshot({
|
|
1129
|
+
baseSnapshot,
|
|
1130
|
+
snapshotBlobs,
|
|
1131
|
+
snapshotSequenceNumber: 0,
|
|
1132
|
+
});
|
|
1133
|
+
this.storageAdapter.cacheSnapshotBlobs(snapshot.blobContents);
|
|
1134
|
+
const attributes = await getDocumentAttributes(this.storageAdapter, snapshot.snapshotTree);
|
|
1131
1135
|
await this.attachDeltaManagerOpHandler(attributes);
|
|
1132
1136
|
// Initialize the protocol handler
|
|
1133
|
-
const baseTree = getProtocolSnapshotTree(
|
|
1137
|
+
const baseTree = getProtocolSnapshotTree(snapshot.snapshotTree);
|
|
1134
1138
|
const qValues = await readAndParse(this.storageAdapter, baseTree.blobs.quorumValues);
|
|
1135
1139
|
this.initializeProtocolState(attributes, {
|
|
1136
1140
|
members: [],
|
|
@@ -1138,7 +1142,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
1138
1142
|
values: qValues,
|
|
1139
1143
|
});
|
|
1140
1144
|
const codeDetails = this.getCodeDetailsFromQuorum();
|
|
1141
|
-
await this.instantiateRuntime(codeDetails,
|
|
1145
|
+
await this.instantiateRuntime(codeDetails, combineSnapshotTreeAndSnapshotBlobs(snapshot), pendingRuntimeState, snapshot);
|
|
1142
1146
|
this.setLoaded();
|
|
1143
1147
|
}
|
|
1144
1148
|
async initializeProtocolStateFromSnapshot(attributes, storage, snapshot) {
|