@fluid-experimental/tree 2.0.0-rc.2.0.1 → 2.0.0-rc.3.0.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 +23 -0
- package/api-report/experimental-tree.api.md +2 -2
- package/dist/ChangeCompression.d.ts +2 -2
- package/dist/ChangeCompression.d.ts.map +1 -1
- package/dist/ChangeCompression.js +1 -1
- package/dist/ChangeCompression.js.map +1 -1
- package/dist/ChangeTypes.d.ts +1 -1
- package/dist/ChangeTypes.d.ts.map +1 -1
- package/dist/ChangeTypes.js +4 -4
- package/dist/ChangeTypes.js.map +1 -1
- package/dist/Checkout.d.ts +3 -3
- package/dist/Checkout.d.ts.map +1 -1
- package/dist/Checkout.js +17 -17
- package/dist/Checkout.js.map +1 -1
- package/dist/EditLog.d.ts +1 -1
- package/dist/EditLog.d.ts.map +1 -1
- package/dist/EditLog.js +9 -9
- package/dist/EditLog.js.map +1 -1
- package/dist/EditUtilities.d.ts +3 -3
- package/dist/EditUtilities.d.ts.map +1 -1
- package/dist/EditUtilities.js +6 -6
- package/dist/EditUtilities.js.map +1 -1
- package/dist/Forest.d.ts.map +1 -1
- package/dist/Forest.js +23 -23
- package/dist/Forest.js.map +1 -1
- package/dist/HistoryEditFactory.d.ts +1 -1
- package/dist/HistoryEditFactory.d.ts.map +1 -1
- package/dist/HistoryEditFactory.js +7 -7
- package/dist/HistoryEditFactory.js.map +1 -1
- package/dist/IdConversion.d.ts.map +1 -1
- package/dist/IdConversion.js.map +1 -1
- package/dist/LogViewer.d.ts +2 -2
- package/dist/LogViewer.d.ts.map +1 -1
- package/dist/LogViewer.js +7 -7
- package/dist/LogViewer.js.map +1 -1
- package/dist/MergeHealth.d.ts.map +1 -1
- package/dist/MergeHealth.js +1 -1
- package/dist/MergeHealth.js.map +1 -1
- package/dist/NodeIdUtilities.d.ts +1 -1
- package/dist/NodeIdUtilities.d.ts.map +1 -1
- package/dist/NodeIdUtilities.js +1 -1
- package/dist/NodeIdUtilities.js.map +1 -1
- package/dist/PayloadUtilities.d.ts.map +1 -1
- package/dist/PayloadUtilities.js +2 -2
- package/dist/PayloadUtilities.js.map +1 -1
- package/dist/ReconciliationPath.d.ts +1 -1
- package/dist/ReconciliationPath.d.ts.map +1 -1
- package/dist/ReconciliationPath.js.map +1 -1
- package/dist/RevisionValueCache.d.ts.map +1 -1
- package/dist/RevisionValueCache.js +2 -2
- package/dist/RevisionValueCache.js.map +1 -1
- package/dist/RevisionView.d.ts +2 -2
- package/dist/RevisionView.d.ts.map +1 -1
- package/dist/RevisionView.js.map +1 -1
- package/dist/SerializationUtilities.d.ts +1 -1
- package/dist/SerializationUtilities.d.ts.map +1 -1
- package/dist/SerializationUtilities.js.map +1 -1
- package/dist/SharedTree.d.ts +8 -7
- package/dist/SharedTree.d.ts.map +1 -1
- package/dist/SharedTree.js +78 -78
- package/dist/SharedTree.js.map +1 -1
- package/dist/SharedTreeEncoder.d.ts +1 -1
- package/dist/SharedTreeEncoder.d.ts.map +1 -1
- package/dist/SharedTreeEncoder.js +31 -31
- package/dist/SharedTreeEncoder.js.map +1 -1
- package/dist/Summary.d.ts +2 -2
- package/dist/Summary.d.ts.map +1 -1
- package/dist/Summary.js +2 -2
- package/dist/Summary.js.map +1 -1
- package/dist/SummaryBackCompatibility.d.ts.map +1 -1
- package/dist/SummaryBackCompatibility.js.map +1 -1
- package/dist/SummaryTestUtilities.d.ts +1 -1
- package/dist/SummaryTestUtilities.d.ts.map +1 -1
- package/dist/SummaryTestUtilities.js.map +1 -1
- package/dist/Transaction.d.ts +3 -3
- package/dist/Transaction.d.ts.map +1 -1
- package/dist/Transaction.js +3 -3
- package/dist/Transaction.js.map +1 -1
- package/dist/TransactionInternal.d.ts +3 -3
- package/dist/TransactionInternal.d.ts.map +1 -1
- package/dist/TransactionInternal.js +6 -6
- package/dist/TransactionInternal.js.map +1 -1
- package/dist/TreeCompressor.d.ts +5 -1
- package/dist/TreeCompressor.d.ts.map +1 -1
- package/dist/TreeCompressor.js +5 -5
- package/dist/TreeCompressor.js.map +1 -1
- package/dist/TreeNodeHandle.d.ts +1 -1
- package/dist/TreeNodeHandle.d.ts.map +1 -1
- package/dist/TreeNodeHandle.js.map +1 -1
- package/dist/TreeView.d.ts +1 -1
- package/dist/TreeView.d.ts.map +1 -1
- package/dist/TreeView.js +2 -3
- package/dist/TreeView.js.map +1 -1
- package/dist/UuidUtilities.d.ts.map +1 -1
- package/dist/UuidUtilities.js.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.d.ts.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.js +3 -3
- package/dist/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/dist/id-compressor/IdCompressor.d.ts +1 -1
- package/dist/id-compressor/IdCompressor.d.ts.map +1 -1
- package/dist/id-compressor/IdCompressor.js +25 -26
- package/dist/id-compressor/IdCompressor.js.map +1 -1
- package/dist/id-compressor/IdRange.d.ts.map +1 -1
- package/dist/id-compressor/IdRange.js +2 -2
- package/dist/id-compressor/IdRange.js.map +1 -1
- package/dist/id-compressor/NumericUuid.d.ts.map +1 -1
- package/dist/id-compressor/NumericUuid.js +2 -1
- package/dist/id-compressor/NumericUuid.js.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.js +8 -9
- package/dist/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.d.ts +1 -1
- package/dist/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.js +11 -11
- package/dist/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/dist/migration-shim/migrationShim.d.ts +8 -4
- package/dist/migration-shim/migrationShim.d.ts.map +1 -1
- package/dist/migration-shim/migrationShim.js +13 -13
- package/dist/migration-shim/migrationShim.js.map +1 -1
- package/dist/migration-shim/migrationShimFactory.d.ts +2 -2
- package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/migrationShimFactory.js +2 -2
- package/dist/migration-shim/migrationShimFactory.js.map +1 -1
- package/dist/migration-shim/packageVersion.d.ts +0 -2
- package/dist/migration-shim/packageVersion.d.ts.map +1 -1
- package/dist/migration-shim/packageVersion.js +0 -2
- package/dist/migration-shim/packageVersion.js.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.js +8 -8
- package/dist/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/dist/migration-shim/sharedTreeShim.d.ts +2 -2
- package/dist/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShim.js +8 -4
- package/dist/migration-shim/sharedTreeShim.js.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.js +2 -2
- package/dist/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/dist/migration-shim/shimChannelServices.d.ts +1 -1
- package/dist/migration-shim/shimChannelServices.d.ts.map +1 -1
- package/dist/migration-shim/shimChannelServices.js.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.d.ts +1 -1
- package/dist/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.js +2 -2
- package/dist/migration-shim/shimDeltaConnection.js.map +1 -1
- package/dist/migration-shim/shimHandle.d.ts.map +1 -1
- package/dist/migration-shim/shimHandle.js.map +1 -1
- package/dist/migration-shim/types.d.ts +1 -1
- package/dist/migration-shim/types.d.ts.map +1 -1
- package/dist/migration-shim/types.js.map +1 -1
- package/dist/migration-shim/utils.d.ts +1 -1
- package/dist/migration-shim/utils.d.ts.map +1 -1
- package/dist/migration-shim/utils.js.map +1 -1
- package/dist/persisted-types/0.0.2.d.ts +1 -1
- package/dist/persisted-types/0.0.2.d.ts.map +1 -1
- package/dist/persisted-types/0.0.2.js.map +1 -1
- package/dist/persisted-types/0.1.1.d.ts +1 -1
- package/dist/persisted-types/0.1.1.d.ts.map +1 -1
- package/dist/persisted-types/0.1.1.js +3 -3
- package/dist/persisted-types/0.1.1.js.map +1 -1
- package/lib/ChangeCompression.d.ts +2 -2
- package/lib/ChangeCompression.d.ts.map +1 -1
- package/lib/ChangeCompression.js +1 -1
- package/lib/ChangeCompression.js.map +1 -1
- package/lib/ChangeTypes.d.ts +1 -1
- package/lib/ChangeTypes.d.ts.map +1 -1
- package/lib/ChangeTypes.js +2 -2
- package/lib/ChangeTypes.js.map +1 -1
- package/lib/Checkout.d.ts +3 -3
- package/lib/Checkout.d.ts.map +1 -1
- package/lib/Checkout.js +4 -4
- package/lib/Checkout.js.map +1 -1
- package/lib/EditLog.d.ts +1 -1
- package/lib/EditLog.d.ts.map +1 -1
- package/lib/EditLog.js +2 -2
- package/lib/EditLog.js.map +1 -1
- package/lib/EditUtilities.d.ts +3 -3
- package/lib/EditUtilities.d.ts.map +1 -1
- package/lib/EditUtilities.js +5 -5
- package/lib/EditUtilities.js.map +1 -1
- package/lib/Forest.d.ts.map +1 -1
- package/lib/Forest.js +2 -2
- package/lib/Forest.js.map +1 -1
- package/lib/HistoryEditFactory.d.ts +1 -1
- package/lib/HistoryEditFactory.d.ts.map +1 -1
- package/lib/HistoryEditFactory.js +5 -5
- package/lib/HistoryEditFactory.js.map +1 -1
- package/lib/IdConversion.d.ts.map +1 -1
- package/lib/IdConversion.js.map +1 -1
- package/lib/LogViewer.d.ts +2 -2
- package/lib/LogViewer.d.ts.map +1 -1
- package/lib/LogViewer.js +3 -3
- package/lib/LogViewer.js.map +1 -1
- package/lib/MergeHealth.d.ts.map +1 -1
- package/lib/MergeHealth.js +1 -1
- package/lib/MergeHealth.js.map +1 -1
- package/lib/NodeIdUtilities.d.ts +1 -1
- package/lib/NodeIdUtilities.d.ts.map +1 -1
- package/lib/NodeIdUtilities.js +1 -1
- package/lib/NodeIdUtilities.js.map +1 -1
- package/lib/PayloadUtilities.d.ts.map +1 -1
- package/lib/PayloadUtilities.js +1 -1
- package/lib/PayloadUtilities.js.map +1 -1
- package/lib/ReconciliationPath.d.ts +1 -1
- package/lib/ReconciliationPath.d.ts.map +1 -1
- package/lib/ReconciliationPath.js.map +1 -1
- package/lib/RevisionValueCache.d.ts.map +1 -1
- package/lib/RevisionValueCache.js +2 -2
- package/lib/RevisionValueCache.js.map +1 -1
- package/lib/RevisionView.d.ts +2 -2
- package/lib/RevisionView.d.ts.map +1 -1
- package/lib/RevisionView.js.map +1 -1
- package/lib/SerializationUtilities.d.ts +1 -1
- package/lib/SerializationUtilities.d.ts.map +1 -1
- package/lib/SerializationUtilities.js.map +1 -1
- package/lib/SharedTree.d.ts +8 -7
- package/lib/SharedTree.d.ts.map +1 -1
- package/lib/SharedTree.js +13 -13
- package/lib/SharedTree.js.map +1 -1
- package/lib/SharedTreeEncoder.d.ts +1 -1
- package/lib/SharedTreeEncoder.d.ts.map +1 -1
- package/lib/SharedTreeEncoder.js +5 -5
- package/lib/SharedTreeEncoder.js.map +1 -1
- package/lib/Summary.d.ts +2 -2
- package/lib/Summary.d.ts.map +1 -1
- package/lib/Summary.js +1 -1
- package/lib/Summary.js.map +1 -1
- package/lib/SummaryBackCompatibility.d.ts.map +1 -1
- package/lib/SummaryBackCompatibility.js.map +1 -1
- package/lib/SummaryTestUtilities.d.ts +1 -1
- package/lib/SummaryTestUtilities.d.ts.map +1 -1
- package/lib/SummaryTestUtilities.js.map +1 -1
- package/lib/Transaction.d.ts +3 -3
- package/lib/Transaction.d.ts.map +1 -1
- package/lib/Transaction.js +3 -3
- package/lib/Transaction.js.map +1 -1
- package/lib/TransactionInternal.d.ts +3 -3
- package/lib/TransactionInternal.d.ts.map +1 -1
- package/lib/TransactionInternal.js +3 -3
- package/lib/TransactionInternal.js.map +1 -1
- package/lib/TreeCompressor.d.ts +5 -1
- package/lib/TreeCompressor.d.ts.map +1 -1
- package/lib/TreeCompressor.js +2 -2
- package/lib/TreeCompressor.js.map +1 -1
- package/lib/TreeNodeHandle.d.ts +1 -1
- package/lib/TreeNodeHandle.d.ts.map +1 -1
- package/lib/TreeNodeHandle.js.map +1 -1
- package/lib/TreeView.d.ts +1 -1
- package/lib/TreeView.d.ts.map +1 -1
- package/lib/TreeView.js +1 -2
- package/lib/TreeView.js.map +1 -1
- package/lib/UuidUtilities.d.ts.map +1 -1
- package/lib/UuidUtilities.js +1 -1
- package/lib/UuidUtilities.js.map +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.d.ts.map +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/lib/id-compressor/IdCompressor.d.ts +1 -1
- package/lib/id-compressor/IdCompressor.d.ts.map +1 -1
- package/lib/id-compressor/IdCompressor.js +4 -5
- package/lib/id-compressor/IdCompressor.js.map +1 -1
- package/lib/id-compressor/IdRange.d.ts.map +1 -1
- package/lib/id-compressor/IdRange.js +1 -1
- package/lib/id-compressor/IdRange.js.map +1 -1
- package/lib/id-compressor/NumericUuid.d.ts.map +1 -1
- package/lib/id-compressor/NumericUuid.js +2 -1
- package/lib/id-compressor/NumericUuid.js.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.js +1 -2
- package/lib/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.d.ts +1 -1
- package/lib/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.js +1 -1
- package/lib/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/lib/migration-shim/migrationShim.d.ts +8 -4
- package/lib/migration-shim/migrationShim.d.ts.map +1 -1
- package/lib/migration-shim/migrationShim.js +3 -3
- package/lib/migration-shim/migrationShim.js.map +1 -1
- package/lib/migration-shim/migrationShimFactory.d.ts +2 -2
- package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/migrationShimFactory.js +1 -1
- package/lib/migration-shim/migrationShimFactory.js.map +1 -1
- package/lib/migration-shim/packageVersion.d.ts +0 -2
- package/lib/migration-shim/packageVersion.d.ts.map +1 -1
- package/lib/migration-shim/packageVersion.js +0 -2
- package/lib/migration-shim/packageVersion.js.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/lib/migration-shim/sharedTreeShim.d.ts +2 -2
- package/lib/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShim.js +6 -2
- package/lib/migration-shim/sharedTreeShim.js.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.js +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/lib/migration-shim/shimChannelServices.d.ts +1 -1
- package/lib/migration-shim/shimChannelServices.d.ts.map +1 -1
- package/lib/migration-shim/shimChannelServices.js.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.d.ts +1 -1
- package/lib/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.js +1 -1
- package/lib/migration-shim/shimDeltaConnection.js.map +1 -1
- package/lib/migration-shim/shimHandle.d.ts.map +1 -1
- package/lib/migration-shim/shimHandle.js.map +1 -1
- package/lib/migration-shim/types.d.ts +1 -1
- package/lib/migration-shim/types.d.ts.map +1 -1
- package/lib/migration-shim/types.js.map +1 -1
- package/lib/migration-shim/utils.d.ts +1 -1
- package/lib/migration-shim/utils.d.ts.map +1 -1
- package/lib/migration-shim/utils.js.map +1 -1
- package/lib/persisted-types/0.0.2.d.ts +1 -1
- package/lib/persisted-types/0.0.2.d.ts.map +1 -1
- package/lib/persisted-types/0.0.2.js.map +1 -1
- package/lib/persisted-types/0.1.1.d.ts +1 -1
- package/lib/persisted-types/0.1.1.d.ts.map +1 -1
- package/lib/persisted-types/0.1.1.js +1 -1
- package/lib/persisted-types/0.1.1.js.map +1 -1
- package/package.json +33 -32
- package/src/ChangeCompression.ts +8 -8
- package/src/ChangeTypes.ts +5 -4
- package/src/Checkout.ts +9 -7
- package/src/EditLog.ts +4 -3
- package/src/EditUtilities.ts +9 -8
- package/src/Forest.ts +3 -2
- package/src/HistoryEditFactory.ts +12 -11
- package/src/IdConversion.ts +2 -2
- package/src/LogViewer.ts +5 -4
- package/src/MergeHealth.ts +2 -1
- package/src/NodeIdUtilities.ts +2 -2
- package/src/PayloadUtilities.ts +2 -1
- package/src/ReconciliationPath.ts +1 -1
- package/src/RevisionValueCache.ts +3 -2
- package/src/RevisionView.ts +3 -3
- package/src/SerializationUtilities.ts +1 -1
- package/src/SharedTree.ts +46 -49
- package/src/SharedTreeEncoder.ts +30 -29
- package/src/Summary.ts +5 -3
- package/src/SummaryBackCompatibility.ts +1 -0
- package/src/SummaryTestUtilities.ts +2 -1
- package/src/Transaction.ts +7 -6
- package/src/TransactionInternal.ts +17 -16
- package/src/TreeCompressor.ts +6 -4
- package/src/TreeNodeHandle.ts +2 -2
- package/src/TreeView.ts +3 -3
- package/src/UuidUtilities.ts +2 -1
- package/src/id-compressor/AppendOnlySortedMap.ts +2 -1
- package/src/id-compressor/IdCompressor.ts +18 -17
- package/src/id-compressor/IdRange.ts +2 -1
- package/src/id-compressor/NumericUuid.ts +1 -1
- package/src/id-compressor/SessionIdNormalizer.ts +3 -3
- package/src/migration-shim/migrationDeltaHandler.ts +3 -2
- package/src/migration-shim/migrationShim.ts +14 -10
- package/src/migration-shim/migrationShimFactory.ts +6 -4
- package/src/migration-shim/packageVersion.ts +0 -2
- package/src/migration-shim/sharedTreeDeltaHandler.ts +3 -2
- package/src/migration-shim/sharedTreeShim.ts +7 -5
- package/src/migration-shim/sharedTreeShimFactory.ts +3 -3
- package/src/migration-shim/shimChannelServices.ts +1 -1
- package/src/migration-shim/shimDeltaConnection.ts +3 -2
- package/src/migration-shim/shimHandle.ts +1 -0
- package/src/migration-shim/types.ts +3 -1
- package/src/migration-shim/utils.ts +2 -1
- package/src/persisted-types/0.0.2.ts +2 -2
- package/src/persisted-types/0.1.1.ts +10 -8
- package/dist/tree-alpha.d.ts +0 -2901
- package/dist/tree-beta.d.ts +0 -348
- package/dist/tree-public.d.ts +0 -348
- package/dist/tree-untrimmed.d.ts +0 -3820
- package/lib/test/AppendOnlySortedMap.perf.tests.d.ts +0 -6
- package/lib/test/AppendOnlySortedMap.perf.tests.d.ts.map +0 -1
- package/lib/test/AppendOnlySortedMap.perf.tests.js +0 -49
- package/lib/test/AppendOnlySortedMap.perf.tests.js.map +0 -1
- package/lib/test/AppendOnlySortedMap.tests.d.ts +0 -6
- package/lib/test/AppendOnlySortedMap.tests.d.ts.map +0 -1
- package/lib/test/AppendOnlySortedMap.tests.js +0 -213
- package/lib/test/AppendOnlySortedMap.tests.js.map +0 -1
- package/lib/test/ChangeCompression.tests.d.ts +0 -6
- package/lib/test/ChangeCompression.tests.d.ts.map +0 -1
- package/lib/test/ChangeCompression.tests.js +0 -154
- package/lib/test/ChangeCompression.tests.js.map +0 -1
- package/lib/test/Checkout.tests.d.ts +0 -10
- package/lib/test/Checkout.tests.d.ts.map +0 -1
- package/lib/test/Checkout.tests.js +0 -460
- package/lib/test/Checkout.tests.js.map +0 -1
- package/lib/test/Common.tests.d.ts +0 -6
- package/lib/test/Common.tests.d.ts.map +0 -1
- package/lib/test/Common.tests.js +0 -102
- package/lib/test/Common.tests.js.map +0 -1
- package/lib/test/EagerCheckout.tests.d.ts +0 -6
- package/lib/test/EagerCheckout.tests.d.ts.map +0 -1
- package/lib/test/EagerCheckout.tests.js +0 -20
- package/lib/test/EagerCheckout.tests.js.map +0 -1
- package/lib/test/Edit.tests.d.ts +0 -6
- package/lib/test/Edit.tests.d.ts.map +0 -1
- package/lib/test/Edit.tests.js +0 -60
- package/lib/test/Edit.tests.js.map +0 -1
- package/lib/test/EditLog.perf.tests.d.ts +0 -6
- package/lib/test/EditLog.perf.tests.d.ts.map +0 -1
- package/lib/test/EditLog.perf.tests.js +0 -41
- package/lib/test/EditLog.perf.tests.js.map +0 -1
- package/lib/test/EditLog.tests.d.ts +0 -6
- package/lib/test/EditLog.tests.d.ts.map +0 -1
- package/lib/test/EditLog.tests.js +0 -355
- package/lib/test/EditLog.tests.js.map +0 -1
- package/lib/test/EditUtilities.tests.d.ts +0 -6
- package/lib/test/EditUtilities.tests.d.ts.map +0 -1
- package/lib/test/EditUtilities.tests.js +0 -512
- package/lib/test/EditUtilities.tests.js.map +0 -1
- package/lib/test/Forest.perf.tests.d.ts +0 -6
- package/lib/test/Forest.perf.tests.d.ts.map +0 -1
- package/lib/test/Forest.perf.tests.js +0 -135
- package/lib/test/Forest.perf.tests.js.map +0 -1
- package/lib/test/Forest.tests.d.ts +0 -6
- package/lib/test/Forest.tests.d.ts.map +0 -1
- package/lib/test/Forest.tests.js +0 -213
- package/lib/test/Forest.tests.js.map +0 -1
- package/lib/test/GenericTransaction.tests.d.ts +0 -6
- package/lib/test/GenericTransaction.tests.d.ts.map +0 -1
- package/lib/test/GenericTransaction.tests.js +0 -31
- package/lib/test/GenericTransaction.tests.js.map +0 -1
- package/lib/test/HistoryEditFactory.tests.d.ts +0 -6
- package/lib/test/HistoryEditFactory.tests.d.ts.map +0 -1
- package/lib/test/HistoryEditFactory.tests.js +0 -170
- package/lib/test/HistoryEditFactory.tests.js.map +0 -1
- package/lib/test/IdCompressor.perf.tests.d.ts +0 -6
- package/lib/test/IdCompressor.perf.tests.d.ts.map +0 -1
- package/lib/test/IdCompressor.perf.tests.js +0 -290
- package/lib/test/IdCompressor.perf.tests.js.map +0 -1
- package/lib/test/IdCompressor.tests.d.ts +0 -6
- package/lib/test/IdCompressor.tests.d.ts.map +0 -1
- package/lib/test/IdCompressor.tests.js +0 -1542
- package/lib/test/IdCompressor.tests.js.map +0 -1
- package/lib/test/IdConversion.tests.d.ts +0 -6
- package/lib/test/IdConversion.tests.d.ts.map +0 -1
- package/lib/test/IdConversion.tests.js +0 -36
- package/lib/test/IdConversion.tests.js.map +0 -1
- package/lib/test/LazyCheckout.tests.d.ts +0 -6
- package/lib/test/LazyCheckout.tests.d.ts.map +0 -1
- package/lib/test/LazyCheckout.tests.js +0 -22
- package/lib/test/LazyCheckout.tests.js.map +0 -1
- package/lib/test/LogViewer.tests.d.ts +0 -6
- package/lib/test/LogViewer.tests.d.ts.map +0 -1
- package/lib/test/LogViewer.tests.js +0 -588
- package/lib/test/LogViewer.tests.js.map +0 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.d.ts +0 -6
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.d.ts.map +0 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js +0 -351
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js.map +0 -1
- package/lib/test/NumericUuid.perf.tests.d.ts +0 -6
- package/lib/test/NumericUuid.perf.tests.d.ts.map +0 -1
- package/lib/test/NumericUuid.perf.tests.js +0 -68
- package/lib/test/NumericUuid.perf.tests.js.map +0 -1
- package/lib/test/NumericUuid.tests.d.ts +0 -6
- package/lib/test/NumericUuid.tests.d.ts.map +0 -1
- package/lib/test/NumericUuid.tests.js +0 -192
- package/lib/test/NumericUuid.tests.js.map +0 -1
- package/lib/test/RevisionValueCache.tests.d.ts +0 -6
- package/lib/test/RevisionValueCache.tests.d.ts.map +0 -1
- package/lib/test/RevisionValueCache.tests.js +0 -106
- package/lib/test/RevisionValueCache.tests.js.map +0 -1
- package/lib/test/RevisionView.tests.d.ts +0 -6
- package/lib/test/RevisionView.tests.d.ts.map +0 -1
- package/lib/test/RevisionView.tests.js +0 -131
- package/lib/test/RevisionView.tests.js.map +0 -1
- package/lib/test/SessionIdNormalizer.tests.d.ts +0 -6
- package/lib/test/SessionIdNormalizer.tests.d.ts.map +0 -1
- package/lib/test/SessionIdNormalizer.tests.js +0 -377
- package/lib/test/SessionIdNormalizer.tests.js.map +0 -1
- package/lib/test/SharedTree.fuzz.tests.d.ts +0 -6
- package/lib/test/SharedTree.fuzz.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.fuzz.tests.js +0 -9
- package/lib/test/SharedTree.fuzz.tests.js.map +0 -1
- package/lib/test/SharedTree.perf.tests.d.ts +0 -6
- package/lib/test/SharedTree.perf.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.perf.tests.js +0 -39
- package/lib/test/SharedTree.perf.tests.js.map +0 -1
- package/lib/test/SharedTree.tests.d.ts +0 -6
- package/lib/test/SharedTree.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.tests.js +0 -22
- package/lib/test/SharedTree.tests.js.map +0 -1
- package/lib/test/StringInterner.tests.d.ts +0 -6
- package/lib/test/StringInterner.tests.d.ts.map +0 -1
- package/lib/test/StringInterner.tests.js +0 -73
- package/lib/test/StringInterner.tests.js.map +0 -1
- package/lib/test/Summary.tests.d.ts +0 -7
- package/lib/test/Summary.tests.d.ts.map +0 -1
- package/lib/test/Summary.tests.js +0 -386
- package/lib/test/Summary.tests.js.map +0 -1
- package/lib/test/Transaction.tests.d.ts +0 -6
- package/lib/test/Transaction.tests.d.ts.map +0 -1
- package/lib/test/Transaction.tests.js +0 -124
- package/lib/test/Transaction.tests.js.map +0 -1
- package/lib/test/TransactionInternal.tests.d.ts +0 -6
- package/lib/test/TransactionInternal.tests.d.ts.map +0 -1
- package/lib/test/TransactionInternal.tests.js +0 -576
- package/lib/test/TransactionInternal.tests.js.map +0 -1
- package/lib/test/TreeCompression.tests.d.ts +0 -6
- package/lib/test/TreeCompression.tests.d.ts.map +0 -1
- package/lib/test/TreeCompression.tests.js +0 -291
- package/lib/test/TreeCompression.tests.js.map +0 -1
- package/lib/test/TreeView.tests.d.ts +0 -6
- package/lib/test/TreeView.tests.d.ts.map +0 -1
- package/lib/test/TreeView.tests.js +0 -178
- package/lib/test/TreeView.tests.js.map +0 -1
- package/lib/test/UndoRedoHandler.tests.d.ts +0 -6
- package/lib/test/UndoRedoHandler.tests.d.ts.map +0 -1
- package/lib/test/UndoRedoHandler.tests.js +0 -37
- package/lib/test/UndoRedoHandler.tests.js.map +0 -1
- package/lib/test/fuzz/Generators.d.ts +0 -8
- package/lib/test/fuzz/Generators.d.ts.map +0 -1
- package/lib/test/fuzz/Generators.js +0 -345
- package/lib/test/fuzz/Generators.js.map +0 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts +0 -23
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts.map +0 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.js +0 -241
- package/lib/test/fuzz/SharedTreeFuzzTests.js.map +0 -1
- package/lib/test/fuzz/Types.d.ts +0 -136
- package/lib/test/fuzz/Types.d.ts.map +0 -1
- package/lib/test/fuzz/Types.js +0 -6
- package/lib/test/fuzz/Types.js.map +0 -1
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts +0 -246
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts.map +0 -1
- package/lib/test/utilities/IdCompressorTestUtilities.js +0 -608
- package/lib/test/utilities/IdCompressorTestUtilities.js.map +0 -1
- package/lib/test/utilities/MockTransaction.d.ts +0 -35
- package/lib/test/utilities/MockTransaction.d.ts.map +0 -1
- package/lib/test/utilities/MockTransaction.js +0 -51
- package/lib/test/utilities/MockTransaction.js.map +0 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts +0 -12
- package/lib/test/utilities/PendingLocalStateTests.d.ts.map +0 -1
- package/lib/test/utilities/PendingLocalStateTests.js +0 -223
- package/lib/test/utilities/PendingLocalStateTests.js.map +0 -1
- package/lib/test/utilities/SharedTreeTests.d.ts +0 -12
- package/lib/test/utilities/SharedTreeTests.d.ts.map +0 -1
- package/lib/test/utilities/SharedTreeTests.js +0 -949
- package/lib/test/utilities/SharedTreeTests.js.map +0 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts +0 -11
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts.map +0 -1
- package/lib/test/utilities/SharedTreeVersioningTests.js +0 -439
- package/lib/test/utilities/SharedTreeVersioningTests.js.map +0 -1
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts +0 -10
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts.map +0 -1
- package/lib/test/utilities/SummaryLoadPerfTests.js +0 -105
- package/lib/test/utilities/SummaryLoadPerfTests.js.map +0 -1
- package/lib/test/utilities/SummarySizeTests.d.ts +0 -11
- package/lib/test/utilities/SummarySizeTests.d.ts.map +0 -1
- package/lib/test/utilities/SummarySizeTests.js +0 -160
- package/lib/test/utilities/SummarySizeTests.js.map +0 -1
- package/lib/test/utilities/TestCommon.d.ts +0 -13
- package/lib/test/utilities/TestCommon.d.ts.map +0 -1
- package/lib/test/utilities/TestCommon.js +0 -19
- package/lib/test/utilities/TestCommon.js.map +0 -1
- package/lib/test/utilities/TestNode.d.ts +0 -140
- package/lib/test/utilities/TestNode.d.ts.map +0 -1
- package/lib/test/utilities/TestNode.js +0 -282
- package/lib/test/utilities/TestNode.js.map +0 -1
- package/lib/test/utilities/TestSerializer.d.ts +0 -24
- package/lib/test/utilities/TestSerializer.d.ts.map +0 -1
- package/lib/test/utilities/TestSerializer.js +0 -40
- package/lib/test/utilities/TestSerializer.js.map +0 -1
- package/lib/test/utilities/TestUtilities.d.ts +0 -212
- package/lib/test/utilities/TestUtilities.d.ts.map +0 -1
- package/lib/test/utilities/TestUtilities.js +0 -413
- package/lib/test/utilities/TestUtilities.js.map +0 -1
- package/lib/test/utilities/UndoRedoTests.d.ts +0 -32
- package/lib/test/utilities/UndoRedoTests.d.ts.map +0 -1
- package/lib/test/utilities/UndoRedoTests.js +0 -317
- package/lib/test/utilities/UndoRedoTests.js.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
package/dist/SharedTree.js
CHANGED
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.SharedTree = exports.SharedTreeFactory = void 0;
|
|
8
|
-
const core_utils_1 = require("@fluidframework/core-utils");
|
|
9
8
|
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
10
9
|
const container_definitions_1 = require("@fluidframework/container-definitions");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
10
|
+
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
11
|
+
const internal_2 = require("@fluidframework/shared-object-base/internal");
|
|
12
|
+
const internal_3 = require("@fluidframework/telemetry-utils/internal");
|
|
13
|
+
const ChangeTypes_js_1 = require("./ChangeTypes.js");
|
|
13
14
|
const Common_js_1 = require("./Common.js");
|
|
14
15
|
const EditLog_js_1 = require("./EditLog.js");
|
|
16
|
+
const EditUtilities_js_1 = require("./EditUtilities.js");
|
|
17
|
+
const EventTypes_js_1 = require("./EventTypes.js");
|
|
18
|
+
const HistoryEditFactory_js_1 = require("./HistoryEditFactory.js");
|
|
19
|
+
const IdConversion_js_1 = require("./IdConversion.js");
|
|
15
20
|
const Identifiers_js_1 = require("./Identifiers.js");
|
|
16
21
|
const InitialTree_js_1 = require("./InitialTree.js");
|
|
17
22
|
const LogViewer_js_1 = require("./LogViewer.js");
|
|
18
|
-
const SummaryBackCompatibility_js_1 = require("./SummaryBackCompatibility.js");
|
|
19
|
-
const index_js_1 = require("./persisted-types/index.js");
|
|
20
|
-
const Summary_js_1 = require("./Summary.js");
|
|
21
|
-
const EditUtilities_js_1 = require("./EditUtilities.js");
|
|
22
23
|
const NodeIdUtilities_js_1 = require("./NodeIdUtilities.js");
|
|
23
|
-
const EventTypes_js_1 = require("./EventTypes.js");
|
|
24
24
|
const RevisionView_js_1 = require("./RevisionView.js");
|
|
25
25
|
const SharedTreeEncoder_js_1 = require("./SharedTreeEncoder.js");
|
|
26
|
-
const HistoryEditFactory_js_1 = require("./HistoryEditFactory.js");
|
|
27
|
-
const ChangeTypes_js_1 = require("./ChangeTypes.js");
|
|
28
|
-
const index_js_2 = require("./id-compressor/index.js");
|
|
29
|
-
const IdConversion_js_1 = require("./IdConversion.js");
|
|
30
26
|
const StringInterner_js_1 = require("./StringInterner.js");
|
|
27
|
+
const Summary_js_1 = require("./Summary.js");
|
|
28
|
+
const SummaryBackCompatibility_js_1 = require("./SummaryBackCompatibility.js");
|
|
31
29
|
const UuidUtilities_js_1 = require("./UuidUtilities.js");
|
|
30
|
+
const index_js_1 = require("./id-compressor/index.js");
|
|
31
|
+
const index_js_2 = require("./persisted-types/index.js");
|
|
32
32
|
/**
|
|
33
33
|
* Factory for SharedTree.
|
|
34
34
|
* Includes history in the summary.
|
|
@@ -78,9 +78,9 @@ class SharedTreeFactory {
|
|
|
78
78
|
createSharedTree(runtime, id) {
|
|
79
79
|
const [writeFormat] = this.args;
|
|
80
80
|
switch (writeFormat) {
|
|
81
|
-
case
|
|
81
|
+
case index_js_2.WriteFormat.v0_0_2:
|
|
82
82
|
return new SharedTree(runtime, id, ...this.args);
|
|
83
|
-
case
|
|
83
|
+
case index_js_2.WriteFormat.v0_1_1:
|
|
84
84
|
return new SharedTree(runtime, id, ...this.args);
|
|
85
85
|
default:
|
|
86
86
|
(0, Common_js_1.fail)('Unknown write format');
|
|
@@ -107,7 +107,7 @@ const snapshotFileName = 'header';
|
|
|
107
107
|
/**
|
|
108
108
|
* Used for version comparison.
|
|
109
109
|
*/
|
|
110
|
-
const sortedWriteVersions = [
|
|
110
|
+
const sortedWriteVersions = [index_js_2.WriteFormat.v0_0_2, index_js_2.WriteFormat.v0_1_1];
|
|
111
111
|
const sharedTreeTelemetryProperties = { all: { isSharedTreeEvent: true } };
|
|
112
112
|
/** The SessionId of the temporary IdCompressor that records stashed ops */
|
|
113
113
|
const stashedSessionId = '8477b8d5-cf6c-4673-8345-8f076a8f9bc6';
|
|
@@ -115,7 +115,7 @@ const stashedSessionId = '8477b8d5-cf6c-4673-8345-8f076a8f9bc6';
|
|
|
115
115
|
* A [distributed tree](../Readme.md).
|
|
116
116
|
* @alpha
|
|
117
117
|
*/
|
|
118
|
-
class SharedTree extends
|
|
118
|
+
class SharedTree extends internal_2.SharedObject {
|
|
119
119
|
/**
|
|
120
120
|
* Create a new SharedTree. It will contain the default value (see initialTree).
|
|
121
121
|
*/
|
|
@@ -124,7 +124,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
124
124
|
}
|
|
125
125
|
static getFactory(...args) {
|
|
126
126
|
const [formatArg, options] = args;
|
|
127
|
-
const writeFormat = formatArg ??
|
|
127
|
+
const writeFormat = formatArg ?? index_js_2.WriteFormat.v0_1_1;
|
|
128
128
|
// On 0.1.1 documents, due to current code limitations, all clients MUST agree on the value of `summarizeHistory`.
|
|
129
129
|
// Note that this means staged rollout changing this value should not be attempted.
|
|
130
130
|
// It is possible to update shared-tree to correctly handle such a staged rollout, but that hasn't been implemented.
|
|
@@ -138,11 +138,11 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
138
138
|
*/
|
|
139
139
|
get attributionId() {
|
|
140
140
|
switch (this.writeFormat) {
|
|
141
|
-
case
|
|
141
|
+
case index_js_2.WriteFormat.v0_0_2:
|
|
142
142
|
return UuidUtilities_js_1.nilUuid;
|
|
143
143
|
default: {
|
|
144
144
|
const { attributionId } = this.idCompressor;
|
|
145
|
-
if (attributionId ===
|
|
145
|
+
if (attributionId === index_js_2.ghostSessionId) {
|
|
146
146
|
return UuidUtilities_js_1.nilUuid;
|
|
147
147
|
}
|
|
148
148
|
return attributionId;
|
|
@@ -195,12 +195,12 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
195
195
|
};
|
|
196
196
|
const historyPolicy = this.getHistoryPolicy(options);
|
|
197
197
|
this.summarizeHistory = historyPolicy.summarizeHistory;
|
|
198
|
-
this.logger = (0,
|
|
198
|
+
this.logger = (0, internal_3.createChildLogger)({
|
|
199
199
|
logger: runtime.logger,
|
|
200
200
|
namespace: 'SharedTree',
|
|
201
201
|
properties: sharedTreeTelemetryProperties,
|
|
202
202
|
});
|
|
203
|
-
this.sequencedEditAppliedLogger = (0,
|
|
203
|
+
this.sequencedEditAppliedLogger = (0, internal_3.createChildLogger)({
|
|
204
204
|
logger: this.logger,
|
|
205
205
|
namespace: 'SequencedEditApplied',
|
|
206
206
|
properties: sharedTreeTelemetryProperties,
|
|
@@ -218,14 +218,14 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
218
218
|
},
|
|
219
219
|
};
|
|
220
220
|
})();
|
|
221
|
-
const idCompressorLoger = (0,
|
|
222
|
-
this.idCompressor = new
|
|
221
|
+
const idCompressorLoger = (0, internal_3.createSampledLogger)(this.logger, idCompressorEventSampler);
|
|
222
|
+
this.idCompressor = new index_js_1.IdCompressor((0, index_js_1.createSessionId)(), index_js_2.reservedIdCount, attributionId, idCompressorLoger);
|
|
223
223
|
this.editLogSize = options.inMemoryHistorySize;
|
|
224
224
|
this.editEvictionFrequency = options.inMemoryHistorySize;
|
|
225
225
|
const { editLog, cachingLogViewer } = this.initializeNewEditLogFromSummary({
|
|
226
226
|
editChunks: [],
|
|
227
227
|
editIds: [],
|
|
228
|
-
}, undefined, this.idCompressor, this.processEditResult, this.processSequencedEditResult,
|
|
228
|
+
}, undefined, this.idCompressor, this.processEditResult, this.processSequencedEditResult, index_js_2.WriteFormat.v0_1_1);
|
|
229
229
|
this.editLog = editLog;
|
|
230
230
|
this.cachingLogViewer = cachingLogViewer;
|
|
231
231
|
this.encoder_0_0_2 = new SharedTreeEncoder_js_1.SharedTreeEncoder_0_0_2(this.summarizeHistory);
|
|
@@ -252,7 +252,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
252
252
|
if (!this.runtime.connected) {
|
|
253
253
|
return false;
|
|
254
254
|
}
|
|
255
|
-
(0,
|
|
255
|
+
(0, internal_1.assert)(this.runtime.clientId !== undefined, 0x62d /* Client id should be set if connected. */);
|
|
256
256
|
const quorum = this.runtime.getQuorum();
|
|
257
257
|
const selfSequencedClient = quorum.getMember(this.runtime.clientId);
|
|
258
258
|
// When in readonly mode our clientId will not be present in the quorum.
|
|
@@ -332,11 +332,11 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
332
332
|
*/
|
|
333
333
|
attributeNodeId(id) {
|
|
334
334
|
switch (this.writeFormat) {
|
|
335
|
-
case
|
|
335
|
+
case index_js_2.WriteFormat.v0_0_2:
|
|
336
336
|
return UuidUtilities_js_1.nilUuid;
|
|
337
337
|
default: {
|
|
338
338
|
const attributionId = this.idCompressor.attributeId(id);
|
|
339
|
-
if (attributionId ===
|
|
339
|
+
if (attributionId === index_js_2.ghostSessionId) {
|
|
340
340
|
return UuidUtilities_js_1.nilUuid;
|
|
341
341
|
}
|
|
342
342
|
return attributionId;
|
|
@@ -353,7 +353,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
353
353
|
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
|
|
354
354
|
*/
|
|
355
355
|
summarizeCore(serializer) {
|
|
356
|
-
return (0,
|
|
356
|
+
return (0, internal_2.createSingleBlobSummary)(snapshotFileName, this.saveSerializedSummary({ serializer }));
|
|
357
357
|
}
|
|
358
358
|
/**
|
|
359
359
|
* {@inheritDoc @fluidframework/datastore-definitions#(IChannel:interface).getAttachSummary}
|
|
@@ -365,7 +365,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
365
365
|
// ever invoked on a DataObject containing local changes when it is attached for the first time. In post-attach flows, an extra
|
|
366
366
|
// instance of the DataObject is created for generating summaries and will never have local edits.
|
|
367
367
|
if (this.editLog.numberOfLocalEdits > 0) {
|
|
368
|
-
if (this.writeFormat ===
|
|
368
|
+
if (this.writeFormat === index_js_2.WriteFormat.v0_1_1) {
|
|
369
369
|
// Since we're the first client to attach, we can safely finalize ourselves since we're the only ones who have made IDs.
|
|
370
370
|
this.idCompressor.finalizeCreationRange(this.idCompressor.takeNextCreationRange());
|
|
371
371
|
for (const edit of this.editLog.getLocalEdits()) {
|
|
@@ -398,7 +398,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
398
398
|
* Saves this SharedTree into a deserialized summary.
|
|
399
399
|
*/
|
|
400
400
|
saveSummary() {
|
|
401
|
-
(0,
|
|
401
|
+
(0, internal_1.assert)(this.editLog.numberOfLocalEdits === 0, 0x62f /* generateSummary must not be called with local edits */);
|
|
402
402
|
return this.generateSummary();
|
|
403
403
|
}
|
|
404
404
|
/**
|
|
@@ -408,9 +408,9 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
408
408
|
generateSummary() {
|
|
409
409
|
try {
|
|
410
410
|
switch (this.writeFormat) {
|
|
411
|
-
case
|
|
411
|
+
case index_js_2.WriteFormat.v0_0_2:
|
|
412
412
|
return this.encoder_0_0_2.encodeSummary(this.editLog, this.currentView, this);
|
|
413
|
-
case
|
|
413
|
+
case index_js_2.WriteFormat.v0_1_1:
|
|
414
414
|
return this.encoder_0_1_1.encodeSummary(this.editLog, this.currentView, this, this.idNormalizer, this.interner, this.idCompressor.serialize(false));
|
|
415
415
|
default:
|
|
416
416
|
(0, Common_js_1.fail)('Unknown version');
|
|
@@ -430,7 +430,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
430
430
|
loadSummary(summary) {
|
|
431
431
|
const { version: loadedSummaryVersion } = summary;
|
|
432
432
|
if (isUpdateRequired(loadedSummaryVersion, this.writeFormat)) {
|
|
433
|
-
this.submitOp({ type:
|
|
433
|
+
this.submitOp({ type: index_js_2.SharedTreeOpType.Update, version: this.writeFormat });
|
|
434
434
|
this.logger.sendTelemetryEvent({
|
|
435
435
|
eventName: 'RequestVersionUpdate',
|
|
436
436
|
versionFrom: loadedSummaryVersion,
|
|
@@ -441,13 +441,13 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
441
441
|
// Write whatever format the loaded summary uses (this is the current agreed-upon format: it may be updated by an update op)
|
|
442
442
|
this.changeWriteFormat(loadedSummaryVersion);
|
|
443
443
|
}
|
|
444
|
-
(0,
|
|
444
|
+
(0, internal_1.assert)(this.idCompressor.getAllIdsFromLocalSession().next().done === true, 0x630 /* Summary load should not be executed after local state is created. */);
|
|
445
445
|
let convertedSummary;
|
|
446
446
|
switch (loadedSummaryVersion) {
|
|
447
|
-
case
|
|
447
|
+
case index_js_2.WriteFormat.v0_0_2:
|
|
448
448
|
convertedSummary = this.encoder_0_0_2.decodeSummary(summary, this.attributionId);
|
|
449
449
|
break;
|
|
450
|
-
case
|
|
450
|
+
case index_js_2.WriteFormat.v0_1_1: {
|
|
451
451
|
const typedSummary = summary;
|
|
452
452
|
// See comment in factory constructor--ensure we write a consistent type of summary as how the document began.
|
|
453
453
|
const loadedSummaryIncludesHistory = typedSummary.currentTree !== undefined;
|
|
@@ -464,11 +464,11 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
464
464
|
const { editHistory, currentTree, idCompressor, interner } = convertedSummary;
|
|
465
465
|
this.interner = interner;
|
|
466
466
|
this.interner.getOrCreateInternedId(InitialTree_js_1.initialTree.definition);
|
|
467
|
-
if (compareSummaryFormatVersions(loadedSummaryVersion,
|
|
467
|
+
if (compareSummaryFormatVersions(loadedSummaryVersion, index_js_2.WriteFormat.v0_1_1) < 0) {
|
|
468
468
|
const { editIds, editChunks } = editHistory;
|
|
469
469
|
this.logger.sendTelemetryEvent({
|
|
470
470
|
eventName: 'SummaryConversion',
|
|
471
|
-
formatVersion:
|
|
471
|
+
formatVersion: index_js_2.WriteFormat.v0_1_1,
|
|
472
472
|
historySize: editIds.length,
|
|
473
473
|
totalNumberOfChunks: editChunks.length,
|
|
474
474
|
});
|
|
@@ -477,9 +477,9 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
477
477
|
}
|
|
478
478
|
static eventFromEditResult(editStatus) {
|
|
479
479
|
switch (editStatus) {
|
|
480
|
-
case
|
|
480
|
+
case index_js_2.EditStatus.Applied:
|
|
481
481
|
return EventTypes_js_1.SharedTreeDiagnosticEvent.AppliedEdit;
|
|
482
|
-
case
|
|
482
|
+
case index_js_2.EditStatus.Invalid:
|
|
483
483
|
return EventTypes_js_1.SharedTreeDiagnosticEvent.DroppedInvalidEdit;
|
|
484
484
|
default:
|
|
485
485
|
return EventTypes_js_1.SharedTreeDiagnosticEvent.DroppedMalformedEdit;
|
|
@@ -536,7 +536,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
536
536
|
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
|
|
537
537
|
*/
|
|
538
538
|
async loadCore(storage) {
|
|
539
|
-
const summaryLoadPerformanceEvent =
|
|
539
|
+
const summaryLoadPerformanceEvent = internal_3.PerformanceEvent.start(this.logger, { eventName: 'SummaryLoad' });
|
|
540
540
|
try {
|
|
541
541
|
const newBlob = await storage.readBlob(snapshotFileName);
|
|
542
542
|
const blobData = (0, client_utils_1.bufferToString)(newBlob, 'utf8');
|
|
@@ -557,29 +557,29 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
557
557
|
const op = typedMessage.contents;
|
|
558
558
|
if (op.version === undefined) {
|
|
559
559
|
// Back-compat: some legacy documents may contain trailing ops with an unstamped version; normalize them.
|
|
560
|
-
op.version =
|
|
560
|
+
op.version = index_js_2.WriteFormat.v0_0_2;
|
|
561
561
|
}
|
|
562
562
|
const { type, version } = op;
|
|
563
563
|
const sameVersion = version === this.writeFormat;
|
|
564
564
|
// Edit and handle ops should only be processed if they're the same version as the tree write version.
|
|
565
565
|
// Update ops should only be processed if they're not the same version.
|
|
566
566
|
if (sameVersion) {
|
|
567
|
-
if (type ===
|
|
567
|
+
if (type === index_js_2.SharedTreeOpType.Handle) {
|
|
568
568
|
// Edit virtualization is no longer supported, log the event and ignore the op.
|
|
569
569
|
this.logger.sendErrorEvent({ eventName: 'UnexpectedHistoryChunk' });
|
|
570
570
|
}
|
|
571
|
-
else if (type ===
|
|
572
|
-
if (op.version ===
|
|
571
|
+
else if (type === index_js_2.SharedTreeOpType.Edit) {
|
|
572
|
+
if (op.version === index_js_2.WriteFormat.v0_1_1) {
|
|
573
573
|
this.idCompressor.finalizeCreationRange(op.idRange);
|
|
574
574
|
}
|
|
575
575
|
const edit = this.parseSequencedEdit(op);
|
|
576
|
-
if (op.version ===
|
|
576
|
+
if (op.version === index_js_2.WriteFormat.v0_1_1) {
|
|
577
577
|
this.internStringsFromEdit(edit);
|
|
578
578
|
}
|
|
579
579
|
this.processSequencedEdit(edit, typedMessage);
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
-
else if (type ===
|
|
582
|
+
else if (type === index_js_2.SharedTreeOpType.Update) {
|
|
583
583
|
this.processVersionUpdate(op.version);
|
|
584
584
|
}
|
|
585
585
|
else if (compareSummaryFormatVersions(version, this.writeFormat) === 1) {
|
|
@@ -610,9 +610,9 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
610
610
|
parseSequencedEdit(op) {
|
|
611
611
|
// TODO:Type Safety: Improve type safety around op sending/parsing (e.g. discriminated union over version field somehow)
|
|
612
612
|
switch (op.version) {
|
|
613
|
-
case
|
|
613
|
+
case index_js_2.WriteFormat.v0_0_2:
|
|
614
614
|
return this.encoder_0_0_2.decodeEditOp(op, (x) => x, this);
|
|
615
|
-
case
|
|
615
|
+
case index_js_2.WriteFormat.v0_1_1:
|
|
616
616
|
return this.encoder_0_1_1.decodeEditOp(op, (x) => x, this.idNormalizer, this.interner);
|
|
617
617
|
default:
|
|
618
618
|
(0, Common_js_1.fail)('Unknown op version');
|
|
@@ -643,8 +643,8 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
643
643
|
*/
|
|
644
644
|
processVersionUpdate(version) {
|
|
645
645
|
if (isUpdateRequired(this.writeFormat, version)) {
|
|
646
|
-
|
|
647
|
-
if (compareSummaryFormatVersions(version,
|
|
646
|
+
internal_3.PerformanceEvent.timedExec(this.logger, { eventName: 'VersionUpdate', version }, () => {
|
|
647
|
+
if (compareSummaryFormatVersions(version, index_js_2.WriteFormat.v0_1_1) >= 0) {
|
|
648
648
|
this.upgradeFrom_0_0_2_to_0_1_1();
|
|
649
649
|
}
|
|
650
650
|
else {
|
|
@@ -668,7 +668,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
668
668
|
this.interner = new StringInterner_js_1.MutableStringInterner([InitialTree_js_1.initialTree.definition]);
|
|
669
669
|
const oldIdCompressor = this.idCompressor;
|
|
670
670
|
// Create the IdCompressor that will be used after the upgrade
|
|
671
|
-
const newIdCompressor = new
|
|
671
|
+
const newIdCompressor = new index_js_1.IdCompressor((0, index_js_1.createSessionId)(), index_js_2.reservedIdCount, this.attributionId, this.logger);
|
|
672
672
|
const newContext = (0, NodeIdUtilities_js_1.getNodeIdContext)(newIdCompressor);
|
|
673
673
|
// Generate all local IDs in the new compressor that were in the old compressor and preserve their UUIDs.
|
|
674
674
|
// This will allow the client to continue to use local IDs that were allocated pre-upgrade
|
|
@@ -682,7 +682,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
682
682
|
}
|
|
683
683
|
};
|
|
684
684
|
// Construct a temporary "ghost" compressor which is used to generate final IDs that will be consistent across all upgrading clients
|
|
685
|
-
const ghostIdCompressor = new
|
|
685
|
+
const ghostIdCompressor = new index_js_1.IdCompressor(index_js_2.ghostSessionId, index_js_2.reservedIdCount);
|
|
686
686
|
const ghostContext = (0, NodeIdUtilities_js_1.getNodeIdContext)(ghostIdCompressor);
|
|
687
687
|
if (this.summarizeHistory) {
|
|
688
688
|
// All clients have the full history, and can therefore all "generate" the same final IDs for every ID in the history
|
|
@@ -769,12 +769,12 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
769
769
|
return {
|
|
770
770
|
source: change.source,
|
|
771
771
|
destination: (0, EditUtilities_js_1.deepCloneStablePlace)(change.destination),
|
|
772
|
-
type:
|
|
772
|
+
type: index_js_2.ChangeTypeInternal.Insert,
|
|
773
773
|
};
|
|
774
774
|
case ChangeTypes_js_1.ChangeType.Detach: {
|
|
775
775
|
const detach = {
|
|
776
776
|
source: (0, EditUtilities_js_1.deepCloneStableRange)(change.source),
|
|
777
|
-
type:
|
|
777
|
+
type: index_js_2.ChangeTypeInternal.Detach,
|
|
778
778
|
};
|
|
779
779
|
(0, Common_js_1.copyPropertyIfDefined)(change, detach, 'destination');
|
|
780
780
|
return detach;
|
|
@@ -785,7 +785,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
785
785
|
return {
|
|
786
786
|
source,
|
|
787
787
|
destination: change.destination,
|
|
788
|
-
type:
|
|
788
|
+
type: index_js_2.ChangeTypeInternal.Build,
|
|
789
789
|
};
|
|
790
790
|
}
|
|
791
791
|
else {
|
|
@@ -793,7 +793,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
793
793
|
return {
|
|
794
794
|
source: [source],
|
|
795
795
|
destination: change.destination,
|
|
796
|
-
type:
|
|
796
|
+
type: index_js_2.ChangeTypeInternal.Build,
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
799
|
}
|
|
@@ -801,13 +801,13 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
801
801
|
return {
|
|
802
802
|
nodeToModify: change.nodeToModify,
|
|
803
803
|
payload: change.payload,
|
|
804
|
-
type:
|
|
804
|
+
type: index_js_2.ChangeTypeInternal.SetValue,
|
|
805
805
|
};
|
|
806
806
|
case ChangeTypes_js_1.ChangeType.Constraint: {
|
|
807
807
|
const constraint = {
|
|
808
808
|
effect: change.effect,
|
|
809
809
|
toConstrain: change.toConstrain,
|
|
810
|
-
type:
|
|
810
|
+
type: index_js_2.ChangeTypeInternal.Constraint,
|
|
811
811
|
};
|
|
812
812
|
(0, Common_js_1.copyPropertyIfDefined)(change, constraint, 'contentHash');
|
|
813
813
|
(0, Common_js_1.copyPropertyIfDefined)(change, constraint, 'identityHash');
|
|
@@ -867,10 +867,10 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
867
867
|
// Ops will be submitted again when attached (see loadSummary())
|
|
868
868
|
if (this.isAttached()) {
|
|
869
869
|
switch (this.writeFormat) {
|
|
870
|
-
case
|
|
870
|
+
case index_js_2.WriteFormat.v0_0_2:
|
|
871
871
|
this.submitOp(this.encoder_0_0_2.encodeEditOp(edit, (x) => x, this));
|
|
872
872
|
break;
|
|
873
|
-
case
|
|
873
|
+
case index_js_2.WriteFormat.v0_1_1:
|
|
874
874
|
this.submitOp(this.encoder_0_1_1.encodeEditOp(edit, (x) => x, this.idCompressor.takeNextCreationRange(), this.idNormalizer, this.interner));
|
|
875
875
|
break;
|
|
876
876
|
default:
|
|
@@ -880,7 +880,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
880
880
|
}
|
|
881
881
|
/** A type-safe `submitLocalMessage` wrapper to enforce op format */
|
|
882
882
|
submitOp(content, localOpMetadata = undefined) {
|
|
883
|
-
(0,
|
|
883
|
+
(0, internal_1.assert)(compareSummaryFormatVersions(content.version, this.writeFormat) === 0, 0x631 /* Attempted to submit op of wrong version */);
|
|
884
884
|
this.submitLocalMessage(content, localOpMetadata);
|
|
885
885
|
}
|
|
886
886
|
getRuntime() {
|
|
@@ -900,33 +900,33 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
900
900
|
// occurs in this method, and the result is passed to `resubmitCore` via the return value of this function.
|
|
901
901
|
const sharedTreeOp = op;
|
|
902
902
|
switch (sharedTreeOp.type) {
|
|
903
|
-
case
|
|
903
|
+
case index_js_2.SharedTreeOpType.Edit: {
|
|
904
904
|
let stashedEdit;
|
|
905
905
|
switch (this.writeFormat) {
|
|
906
|
-
case
|
|
906
|
+
case index_js_2.WriteFormat.v0_0_2:
|
|
907
907
|
switch (sharedTreeOp.version) {
|
|
908
|
-
case
|
|
908
|
+
case index_js_2.WriteFormat.v0_0_2: {
|
|
909
909
|
stashedEdit = this.parseSequencedEdit(sharedTreeOp);
|
|
910
910
|
break;
|
|
911
911
|
}
|
|
912
|
-
case
|
|
912
|
+
case index_js_2.WriteFormat.v0_1_1:
|
|
913
913
|
(0, Common_js_1.fail)('Received stashed op 0.1.1 before upgrade');
|
|
914
914
|
default:
|
|
915
915
|
(0, Common_js_1.fail)('Unknown version');
|
|
916
916
|
}
|
|
917
917
|
break;
|
|
918
|
-
case
|
|
918
|
+
case index_js_2.WriteFormat.v0_1_1:
|
|
919
919
|
switch (sharedTreeOp.version) {
|
|
920
|
-
case
|
|
920
|
+
case index_js_2.WriteFormat.v0_0_2: {
|
|
921
921
|
// Use the IDs from the stashed ops as overrides for the equivalent new ops
|
|
922
922
|
stashedEdit = (0, IdConversion_js_1.convertEditIds)(sharedTreeOp.edit, (id) => this.generateNodeId(id));
|
|
923
923
|
break;
|
|
924
924
|
}
|
|
925
|
-
case
|
|
926
|
-
(0,
|
|
925
|
+
case index_js_2.WriteFormat.v0_1_1: {
|
|
926
|
+
(0, internal_1.assert)(this.stashedIdCompressor !== null, 0x632 /* Stashed op applied after expected window */);
|
|
927
927
|
if (this.stashedIdCompressor === undefined) {
|
|
928
928
|
// Use a temporary compressor that will help translate the stashed ops
|
|
929
|
-
this.stashedIdCompressor =
|
|
929
|
+
this.stashedIdCompressor = index_js_1.IdCompressor.deserialize(this.idCompressor.serialize(false), stashedSessionId, sharedTreeOp.idRange.attributionId);
|
|
930
930
|
// Once all stashed ops have been applied, clear the temporary state
|
|
931
931
|
this.runtime.on('connected', () => {
|
|
932
932
|
this.stashedIdCompressor = null;
|
|
@@ -959,9 +959,9 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
959
959
|
return;
|
|
960
960
|
}
|
|
961
961
|
// Handle and update ops are only acknowledged by the client that generated them upon sequencing--no local changes necessary.
|
|
962
|
-
case
|
|
963
|
-
case
|
|
964
|
-
case
|
|
962
|
+
case index_js_2.SharedTreeOpType.Handle:
|
|
963
|
+
case index_js_2.SharedTreeOpType.Update:
|
|
964
|
+
case index_js_2.SharedTreeOpType.NoOp:
|
|
965
965
|
return;
|
|
966
966
|
default:
|
|
967
967
|
(0, Common_js_1.fail)('Unrecognized op');
|
|
@@ -970,13 +970,13 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
970
970
|
reSubmitCore(op, localOpMetadata) {
|
|
971
971
|
const sharedTreeOp = op;
|
|
972
972
|
switch (sharedTreeOp.type) {
|
|
973
|
-
case
|
|
973
|
+
case index_js_2.SharedTreeOpType.Edit:
|
|
974
974
|
if (compareSummaryFormatVersions(sharedTreeOp.version, this.writeFormat) > 0) {
|
|
975
975
|
(0, Common_js_1.fail)('Attempted to resubmit op of version newer than current version');
|
|
976
976
|
}
|
|
977
977
|
else if (localOpMetadata?.transformedEdit !== undefined) {
|
|
978
978
|
// Optimization: stashed 0.0.2 ops require no transformation in 0.0.2; don't re-encode
|
|
979
|
-
if (this.writeFormat !==
|
|
979
|
+
if (this.writeFormat !== index_js_2.WriteFormat.v0_0_2 || sharedTreeOp.version !== index_js_2.WriteFormat.v0_0_2) {
|
|
980
980
|
this.submitEditOp(localOpMetadata.transformedEdit);
|
|
981
981
|
return;
|
|
982
982
|
}
|
|
@@ -998,7 +998,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
998
998
|
*/
|
|
999
999
|
internStringsFromEdit(edit) {
|
|
1000
1000
|
for (const change of edit.changes) {
|
|
1001
|
-
if (change.type ===
|
|
1001
|
+
if (change.type === index_js_2.ChangeTypeInternal.Build) {
|
|
1002
1002
|
for (const root of change.source) {
|
|
1003
1003
|
(0, EditUtilities_js_1.walkTree)(root, (node) => {
|
|
1004
1004
|
this.interner.getOrCreateInternedId(node.definition);
|
|
@@ -1008,7 +1008,7 @@ class SharedTree extends shared_object_base_1.SharedObject {
|
|
|
1008
1008
|
}, Identifiers_js_1.isDetachedSequenceId);
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
|
-
else if (change.type ===
|
|
1011
|
+
else if (change.type === index_js_2.ChangeTypeInternal.Insert) {
|
|
1012
1012
|
const { referenceTrait } = change.destination;
|
|
1013
1013
|
if (referenceTrait !== undefined) {
|
|
1014
1014
|
this.interner.getOrCreateInternedId(referenceTrait.label);
|