@fluid-experimental/tree 2.0.0-rc.1.0.3 → 2.0.0-rc.2.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/{.eslintrc.js → .eslintrc.cjs} +1 -1
- package/{.mocharc.js → .mocharc.cjs} +1 -1
- package/.vscode/settings.json +1 -1
- package/CHANGELOG.md +4 -0
- package/api-report/experimental-tree.api.md +4 -15
- package/dist/ChangeCompression.d.ts +5 -5
- package/dist/ChangeCompression.d.ts.map +1 -1
- package/dist/ChangeCompression.js +24 -24
- package/dist/ChangeCompression.js.map +1 -1
- package/dist/ChangeTypes.d.ts +3 -3
- package/dist/ChangeTypes.d.ts.map +1 -1
- package/dist/ChangeTypes.js +9 -9
- package/dist/ChangeTypes.js.map +1 -1
- package/dist/Checkout.d.ts +7 -7
- package/dist/Checkout.d.ts.map +1 -1
- package/dist/Checkout.js +27 -27
- package/dist/Checkout.js.map +1 -1
- package/dist/Common.d.ts +2 -2
- package/dist/Common.d.ts.map +1 -1
- package/dist/Common.js.map +1 -1
- package/dist/EagerCheckout.d.ts +3 -3
- package/dist/EagerCheckout.d.ts.map +1 -1
- package/dist/EagerCheckout.js +2 -2
- package/dist/EagerCheckout.js.map +1 -1
- package/dist/EditLog.d.ts +4 -6
- 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 +6 -6
- package/dist/EditUtilities.d.ts.map +1 -1
- package/dist/EditUtilities.js +28 -28
- package/dist/EditUtilities.js.map +1 -1
- package/dist/Forest.d.ts +2 -2
- package/dist/Forest.d.ts.map +1 -1
- package/dist/Forest.js +13 -13
- package/dist/Forest.js.map +1 -1
- package/dist/HistoryEditFactory.d.ts +3 -3
- package/dist/HistoryEditFactory.d.ts.map +1 -1
- package/dist/HistoryEditFactory.js +36 -36
- package/dist/HistoryEditFactory.js.map +1 -1
- package/dist/IdConversion.d.ts +3 -3
- package/dist/IdConversion.d.ts.map +1 -1
- package/dist/IdConversion.js +23 -23
- package/dist/IdConversion.js.map +1 -1
- package/dist/InitialTree.d.ts +1 -1
- package/dist/InitialTree.d.ts.map +1 -1
- package/dist/InitialTree.js +2 -2
- package/dist/InitialTree.js.map +1 -1
- package/dist/LazyCheckout.d.ts +5 -5
- package/dist/LazyCheckout.d.ts.map +1 -1
- package/dist/LazyCheckout.js +2 -2
- package/dist/LazyCheckout.js.map +1 -1
- package/dist/LogViewer.d.ts +7 -7
- package/dist/LogViewer.d.ts.map +1 -1
- package/dist/LogViewer.js +25 -25
- package/dist/LogViewer.js.map +1 -1
- package/dist/MergeHealth.d.ts +1 -1
- package/dist/MergeHealth.d.ts.map +1 -1
- package/dist/MergeHealth.js +32 -32
- package/dist/MergeHealth.js.map +1 -1
- package/dist/NodeIdUtilities.d.ts +3 -3
- package/dist/NodeIdUtilities.d.ts.map +1 -1
- package/dist/NodeIdUtilities.js +4 -4
- package/dist/NodeIdUtilities.js.map +1 -1
- package/dist/PayloadUtilities.d.ts +1 -1
- package/dist/PayloadUtilities.d.ts.map +1 -1
- package/dist/PayloadUtilities.js.map +1 -1
- package/dist/ReconciliationPath.d.ts +3 -3
- package/dist/ReconciliationPath.d.ts.map +1 -1
- package/dist/ReconciliationPath.js.map +1 -1
- package/dist/RevisionValueCache.js +5 -5
- package/dist/RevisionValueCache.js.map +1 -1
- package/dist/RevisionView.d.ts +5 -5
- package/dist/RevisionView.d.ts.map +1 -1
- package/dist/RevisionView.js +11 -11
- package/dist/RevisionView.js.map +1 -1
- package/dist/SerializationUtilities.d.ts +4 -4
- package/dist/SerializationUtilities.d.ts.map +1 -1
- package/dist/SerializationUtilities.js +5 -5
- package/dist/SerializationUtilities.js.map +1 -1
- package/dist/SharedTree.d.ts +15 -18
- package/dist/SharedTree.d.ts.map +1 -1
- package/dist/SharedTree.js +154 -166
- package/dist/SharedTree.js.map +1 -1
- package/dist/SharedTreeEncoder.d.ts +8 -8
- package/dist/SharedTreeEncoder.d.ts.map +1 -1
- package/dist/SharedTreeEncoder.js +67 -67
- package/dist/SharedTreeEncoder.js.map +1 -1
- package/dist/StringInterner.d.ts +1 -1
- package/dist/StringInterner.d.ts.map +1 -1
- package/dist/StringInterner.js +2 -2
- package/dist/StringInterner.js.map +1 -1
- package/dist/Summary.d.ts +4 -4
- 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 +3 -3
- package/dist/SummaryBackCompatibility.d.ts.map +1 -1
- package/dist/SummaryBackCompatibility.js +13 -13
- package/dist/SummaryBackCompatibility.js.map +1 -1
- package/dist/SummaryTestUtilities.d.ts +2 -2
- package/dist/SummaryTestUtilities.d.ts.map +1 -1
- package/dist/SummaryTestUtilities.js.map +1 -1
- package/dist/Transaction.d.ts +4 -4
- package/dist/Transaction.d.ts.map +1 -1
- package/dist/Transaction.js +10 -10
- package/dist/Transaction.js.map +1 -1
- package/dist/TransactionInternal.d.ts +7 -7
- package/dist/TransactionInternal.d.ts.map +1 -1
- package/dist/TransactionInternal.js +87 -87
- package/dist/TransactionInternal.js.map +1 -1
- package/dist/TreeCompressor.d.ts +4 -4
- package/dist/TreeCompressor.d.ts.map +1 -1
- package/dist/TreeCompressor.js +6 -6
- package/dist/TreeCompressor.js.map +1 -1
- package/dist/TreeNodeHandle.d.ts +3 -3
- package/dist/TreeNodeHandle.d.ts.map +1 -1
- package/dist/TreeNodeHandle.js +5 -5
- package/dist/TreeNodeHandle.js.map +1 -1
- package/dist/TreeView.d.ts +3 -3
- package/dist/TreeView.d.ts.map +1 -1
- package/dist/TreeView.js +10 -10
- package/dist/TreeView.js.map +1 -1
- package/dist/TreeViewUtilities.d.ts +2 -2
- package/dist/TreeViewUtilities.d.ts.map +1 -1
- package/dist/TreeViewUtilities.js +3 -3
- package/dist/TreeViewUtilities.js.map +1 -1
- package/dist/UndoRedoHandler.d.ts +2 -2
- package/dist/UndoRedoHandler.d.ts.map +1 -1
- package/dist/UndoRedoHandler.js +5 -5
- package/dist/UndoRedoHandler.js.map +1 -1
- package/dist/UuidUtilities.d.ts +1 -1
- package/dist/UuidUtilities.d.ts.map +1 -1
- package/dist/UuidUtilities.js +3 -3
- package/dist/UuidUtilities.js.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.js +4 -4
- package/dist/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/dist/id-compressor/IdCompressor.d.ts +2 -2
- package/dist/id-compressor/IdCompressor.d.ts.map +1 -1
- package/dist/id-compressor/IdCompressor.js +78 -78
- package/dist/id-compressor/IdCompressor.js.map +1 -1
- package/dist/id-compressor/IdRange.d.ts +1 -1
- package/dist/id-compressor/IdRange.d.ts.map +1 -1
- package/dist/id-compressor/IdRange.js.map +1 -1
- package/dist/id-compressor/NumericUuid.d.ts +1 -1
- package/dist/id-compressor/NumericUuid.d.ts.map +1 -1
- package/dist/id-compressor/NumericUuid.js +6 -6
- package/dist/id-compressor/NumericUuid.js.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.d.ts +2 -2
- package/dist/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.js +14 -14
- package/dist/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/dist/id-compressor/index.d.ts +4 -4
- package/dist/id-compressor/index.d.ts.map +1 -1
- package/dist/id-compressor/index.js +11 -11
- package/dist/id-compressor/index.js.map +1 -1
- package/dist/id-compressor/persisted-types/0.0.1.d.ts +1 -1
- package/dist/id-compressor/persisted-types/0.0.1.d.ts.map +1 -1
- package/dist/id-compressor/persisted-types/0.0.1.js.map +1 -1
- package/dist/id-compressor/persisted-types/index.d.ts +1 -1
- package/dist/id-compressor/persisted-types/index.d.ts.map +1 -1
- package/dist/id-compressor/persisted-types/index.js.map +1 -1
- package/dist/index.d.ts +29 -29
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -73
- package/dist/index.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 +5 -8
- package/dist/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/dist/migration-shim/migrationShim.d.ts +1 -1
- package/dist/migration-shim/migrationShim.d.ts.map +1 -1
- package/dist/migration-shim/migrationShim.js +1 -1
- package/dist/migration-shim/migrationShim.js.map +1 -1
- package/dist/migration-shim/migrationShimFactory.d.ts +1 -1
- package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/migrationShimFactory.js.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.d.ts +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.js +2 -5
- package/dist/migration-shim/sharedTreeDeltaHandler.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/package.json +3 -0
- 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 +4 -4
- package/dist/persisted-types/0.1.1.d.ts.map +1 -1
- package/dist/persisted-types/0.1.1.js +13 -13
- package/dist/persisted-types/0.1.1.js.map +1 -1
- package/dist/persisted-types/index.d.ts +2 -2
- package/dist/persisted-types/index.d.ts.map +1 -1
- package/dist/persisted-types/index.js +13 -13
- package/dist/persisted-types/index.js.map +1 -1
- package/dist/tree-alpha.d.ts +5 -8
- package/dist/tree-beta.d.ts +5 -1
- package/dist/tree-public.d.ts +5 -1
- package/dist/tree-untrimmed.d.ts +5 -8
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/ChangeCompression.d.ts +5 -5
- package/lib/ChangeCompression.d.ts.map +1 -1
- package/lib/ChangeCompression.js +3 -3
- package/lib/ChangeCompression.js.map +1 -1
- package/lib/ChangeTypes.d.ts +3 -3
- package/lib/ChangeTypes.d.ts.map +1 -1
- package/lib/ChangeTypes.js +3 -3
- package/lib/ChangeTypes.js.map +1 -1
- package/lib/Checkout.d.ts +7 -7
- package/lib/Checkout.d.ts.map +1 -1
- package/lib/Checkout.js +6 -6
- package/lib/Checkout.js.map +1 -1
- package/lib/Common.d.ts +2 -2
- package/lib/Common.d.ts.map +1 -1
- package/lib/Common.js.map +1 -1
- package/lib/EagerCheckout.d.ts +3 -3
- package/lib/EagerCheckout.d.ts.map +1 -1
- package/lib/EagerCheckout.js +1 -1
- package/lib/EagerCheckout.js.map +1 -1
- package/lib/EditLog.d.ts +4 -6
- package/lib/EditLog.d.ts.map +1 -1
- package/lib/EditLog.js +1 -1
- package/lib/EditLog.js.map +1 -1
- package/lib/EditUtilities.d.ts +6 -6
- package/lib/EditUtilities.d.ts.map +1 -1
- package/lib/EditUtilities.js +7 -7
- package/lib/EditUtilities.js.map +1 -1
- package/lib/Forest.d.ts +2 -2
- 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 +3 -3
- package/lib/HistoryEditFactory.d.ts.map +1 -1
- package/lib/HistoryEditFactory.js +7 -7
- package/lib/HistoryEditFactory.js.map +1 -1
- package/lib/IdConversion.d.ts +3 -3
- package/lib/IdConversion.d.ts.map +1 -1
- package/lib/IdConversion.js +4 -4
- package/lib/IdConversion.js.map +1 -1
- package/lib/InitialTree.d.ts +1 -1
- package/lib/InitialTree.d.ts.map +1 -1
- package/lib/InitialTree.js +1 -1
- package/lib/InitialTree.js.map +1 -1
- package/lib/LazyCheckout.d.ts +5 -5
- package/lib/LazyCheckout.d.ts.map +1 -1
- package/lib/LazyCheckout.js +1 -1
- package/lib/LazyCheckout.js.map +1 -1
- package/lib/LogViewer.d.ts +7 -7
- package/lib/LogViewer.d.ts.map +1 -1
- package/lib/LogViewer.js +4 -4
- package/lib/LogViewer.js.map +1 -1
- package/lib/MergeHealth.d.ts +1 -1
- package/lib/MergeHealth.d.ts.map +1 -1
- package/lib/MergeHealth.js +5 -5
- package/lib/MergeHealth.js.map +1 -1
- package/lib/NodeIdUtilities.d.ts +3 -3
- package/lib/NodeIdUtilities.d.ts.map +1 -1
- package/lib/NodeIdUtilities.js +2 -2
- package/lib/NodeIdUtilities.js.map +1 -1
- package/lib/PayloadUtilities.d.ts +1 -1
- package/lib/PayloadUtilities.d.ts.map +1 -1
- package/lib/PayloadUtilities.js.map +1 -1
- package/lib/ReconciliationPath.d.ts +3 -3
- package/lib/ReconciliationPath.d.ts.map +1 -1
- package/lib/ReconciliationPath.js.map +1 -1
- package/lib/RevisionValueCache.js +1 -1
- package/lib/RevisionValueCache.js.map +1 -1
- package/lib/RevisionView.d.ts +5 -5
- package/lib/RevisionView.d.ts.map +1 -1
- package/lib/RevisionView.js +3 -3
- package/lib/RevisionView.js.map +1 -1
- package/lib/SerializationUtilities.d.ts +4 -4
- package/lib/SerializationUtilities.d.ts.map +1 -1
- package/lib/SerializationUtilities.js +1 -1
- package/lib/SerializationUtilities.js.map +1 -1
- package/lib/SharedTree.d.ts +15 -18
- package/lib/SharedTree.d.ts.map +1 -1
- package/lib/SharedTree.js +28 -40
- package/lib/SharedTree.js.map +1 -1
- package/lib/SharedTreeEncoder.d.ts +8 -8
- package/lib/SharedTreeEncoder.d.ts.map +1 -1
- package/lib/SharedTreeEncoder.js +12 -12
- package/lib/SharedTreeEncoder.js.map +1 -1
- package/lib/StringInterner.d.ts +1 -1
- package/lib/StringInterner.d.ts.map +1 -1
- package/lib/StringInterner.js +1 -1
- package/lib/StringInterner.js.map +1 -1
- package/lib/Summary.d.ts +4 -4
- 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 +3 -3
- package/lib/SummaryBackCompatibility.d.ts.map +1 -1
- package/lib/SummaryBackCompatibility.js +3 -3
- package/lib/SummaryBackCompatibility.js.map +1 -1
- package/lib/SummaryTestUtilities.d.ts +2 -2
- package/lib/SummaryTestUtilities.d.ts.map +1 -1
- package/lib/SummaryTestUtilities.js.map +1 -1
- package/lib/Transaction.d.ts +4 -4
- package/lib/Transaction.d.ts.map +1 -1
- package/lib/Transaction.js +5 -5
- package/lib/Transaction.js.map +1 -1
- package/lib/TransactionInternal.d.ts +7 -7
- package/lib/TransactionInternal.d.ts.map +1 -1
- package/lib/TransactionInternal.js +5 -5
- package/lib/TransactionInternal.js.map +1 -1
- package/lib/TreeCompressor.d.ts +4 -4
- 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 +3 -3
- package/lib/TreeNodeHandle.d.ts.map +1 -1
- package/lib/TreeNodeHandle.js +1 -1
- package/lib/TreeNodeHandle.js.map +1 -1
- package/lib/TreeView.d.ts +3 -3
- package/lib/TreeView.d.ts.map +1 -1
- package/lib/TreeView.js +3 -3
- package/lib/TreeView.js.map +1 -1
- package/lib/TreeViewUtilities.d.ts +2 -2
- package/lib/TreeViewUtilities.d.ts.map +1 -1
- package/lib/TreeViewUtilities.js +1 -1
- package/lib/TreeViewUtilities.js.map +1 -1
- package/lib/UndoRedoHandler.d.ts +2 -2
- package/lib/UndoRedoHandler.d.ts.map +1 -1
- package/lib/UndoRedoHandler.js +2 -2
- package/lib/UndoRedoHandler.js.map +1 -1
- package/lib/UuidUtilities.d.ts +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.js +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/lib/id-compressor/IdCompressor.d.ts +2 -2
- package/lib/id-compressor/IdCompressor.d.ts.map +1 -1
- package/lib/id-compressor/IdCompressor.js +6 -6
- package/lib/id-compressor/IdCompressor.js.map +1 -1
- package/lib/id-compressor/IdRange.d.ts +1 -1
- package/lib/id-compressor/IdRange.d.ts.map +1 -1
- package/lib/id-compressor/IdRange.js.map +1 -1
- package/lib/id-compressor/NumericUuid.d.ts +1 -1
- package/lib/id-compressor/NumericUuid.d.ts.map +1 -1
- package/lib/id-compressor/NumericUuid.js +2 -2
- package/lib/id-compressor/NumericUuid.js.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.d.ts +2 -2
- package/lib/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.js +2 -2
- package/lib/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/lib/id-compressor/index.d.ts +4 -4
- package/lib/id-compressor/index.d.ts.map +1 -1
- package/lib/id-compressor/index.js +3 -3
- package/lib/id-compressor/index.js.map +1 -1
- package/lib/id-compressor/persisted-types/0.0.1.d.ts +1 -1
- package/lib/id-compressor/persisted-types/0.0.1.d.ts.map +1 -1
- package/lib/id-compressor/persisted-types/0.0.1.js.map +1 -1
- package/lib/id-compressor/persisted-types/index.d.ts +1 -1
- package/lib/id-compressor/persisted-types/index.d.ts.map +1 -1
- package/lib/id-compressor/persisted-types/index.js.map +1 -1
- package/lib/index.d.ts +29 -29
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +22 -22
- package/lib/index.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 +5 -8
- package/lib/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/lib/migration-shim/migrationShim.d.ts +1 -1
- package/lib/migration-shim/migrationShim.d.ts.map +1 -1
- package/lib/migration-shim/migrationShim.js +1 -1
- package/lib/migration-shim/migrationShim.js.map +1 -1
- package/lib/migration-shim/migrationShimFactory.d.ts +1 -1
- package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/migrationShimFactory.js.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.d.ts +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js +2 -5
- package/lib/migration-shim/sharedTreeDeltaHandler.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/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 +4 -4
- package/lib/persisted-types/0.1.1.d.ts.map +1 -1
- package/lib/persisted-types/0.1.1.js +2 -2
- package/lib/persisted-types/0.1.1.js.map +1 -1
- package/lib/persisted-types/index.d.ts +2 -2
- package/lib/persisted-types/index.d.ts.map +1 -1
- package/lib/persisted-types/index.js +2 -2
- package/lib/persisted-types/index.js.map +1 -1
- package/lib/test/AppendOnlySortedMap.perf.tests.js +2 -2
- package/lib/test/AppendOnlySortedMap.perf.tests.js.map +1 -1
- package/lib/test/AppendOnlySortedMap.tests.js +2 -2
- package/lib/test/AppendOnlySortedMap.tests.js.map +1 -1
- package/lib/test/ChangeCompression.tests.js +9 -9
- package/lib/test/ChangeCompression.tests.js.map +1 -1
- package/lib/test/Checkout.tests.d.ts +1 -1
- package/lib/test/Checkout.tests.d.ts.map +1 -1
- package/lib/test/Checkout.tests.js +2 -2
- package/lib/test/Checkout.tests.js.map +1 -1
- package/lib/test/Common.tests.js +1 -1
- package/lib/test/Common.tests.js.map +1 -1
- package/lib/test/EagerCheckout.tests.js +4 -4
- package/lib/test/EagerCheckout.tests.js.map +1 -1
- package/lib/test/Edit.tests.js +2 -2
- package/lib/test/Edit.tests.js.map +1 -1
- package/lib/test/EditLog.perf.tests.js +4 -4
- package/lib/test/EditLog.perf.tests.js.map +1 -1
- package/lib/test/EditLog.tests.js +3 -3
- package/lib/test/EditLog.tests.js.map +1 -1
- package/lib/test/EditUtilities.tests.js +6 -6
- package/lib/test/EditUtilities.tests.js.map +1 -1
- package/lib/test/Forest.perf.tests.js +4 -4
- package/lib/test/Forest.perf.tests.js.map +1 -1
- package/lib/test/Forest.tests.js +2 -2
- package/lib/test/Forest.tests.js.map +1 -1
- package/lib/test/GenericTransaction.tests.js +3 -3
- package/lib/test/GenericTransaction.tests.js.map +1 -1
- package/lib/test/HistoryEditFactory.tests.js +4 -4
- package/lib/test/HistoryEditFactory.tests.js.map +1 -1
- package/lib/test/IdCompressor.perf.tests.js +4 -4
- package/lib/test/IdCompressor.perf.tests.js.map +1 -1
- package/lib/test/IdCompressor.tests.js +7 -7
- package/lib/test/IdCompressor.tests.js.map +1 -1
- package/lib/test/IdConversion.tests.js +3 -3
- package/lib/test/IdConversion.tests.js.map +1 -1
- package/lib/test/LazyCheckout.tests.js +4 -4
- package/lib/test/LazyCheckout.tests.js.map +1 -1
- package/lib/test/LogViewer.tests.js +12 -12
- package/lib/test/LogViewer.tests.js.map +1 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js +6 -6
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js.map +1 -1
- package/lib/test/NumericUuid.perf.tests.js +3 -3
- package/lib/test/NumericUuid.perf.tests.js.map +1 -1
- package/lib/test/NumericUuid.tests.js +4 -4
- package/lib/test/NumericUuid.tests.js.map +1 -1
- package/lib/test/RevisionValueCache.tests.js +2 -2
- package/lib/test/RevisionValueCache.tests.js.map +1 -1
- package/lib/test/RevisionView.tests.js +6 -6
- package/lib/test/RevisionView.tests.js.map +1 -1
- package/lib/test/SessionIdNormalizer.tests.js +3 -3
- package/lib/test/SessionIdNormalizer.tests.js.map +1 -1
- package/lib/test/SharedTree.fuzz.tests.js +1 -1
- package/lib/test/SharedTree.fuzz.tests.js.map +1 -1
- package/lib/test/SharedTree.perf.tests.js +2 -2
- package/lib/test/SharedTree.perf.tests.js.map +1 -1
- package/lib/test/SharedTree.tests.js +7 -7
- package/lib/test/SharedTree.tests.js.map +1 -1
- package/lib/test/StringInterner.tests.js +1 -1
- package/lib/test/StringInterner.tests.js.map +1 -1
- package/lib/test/Summary.tests.d.ts +2 -2
- package/lib/test/Summary.tests.d.ts.map +1 -1
- package/lib/test/Summary.tests.js +14 -14
- package/lib/test/Summary.tests.js.map +1 -1
- package/lib/test/Transaction.tests.js +5 -5
- package/lib/test/Transaction.tests.js.map +1 -1
- package/lib/test/TransactionInternal.tests.js +7 -7
- package/lib/test/TransactionInternal.tests.js.map +1 -1
- package/lib/test/TreeCompression.tests.js +8 -8
- package/lib/test/TreeCompression.tests.js.map +1 -1
- package/lib/test/TreeView.tests.js +3 -3
- package/lib/test/TreeView.tests.js.map +1 -1
- package/lib/test/UndoRedoHandler.tests.js +2 -2
- package/lib/test/UndoRedoHandler.tests.js.map +1 -1
- package/lib/test/fuzz/Generators.d.ts +1 -1
- package/lib/test/fuzz/Generators.d.ts.map +1 -1
- package/lib/test/fuzz/Generators.js +4 -4
- package/lib/test/fuzz/Generators.js.map +1 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts +1 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts.map +1 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.js +5 -5
- package/lib/test/fuzz/SharedTreeFuzzTests.js.map +1 -1
- package/lib/test/fuzz/Types.d.ts +6 -6
- package/lib/test/fuzz/Types.d.ts.map +1 -1
- package/lib/test/fuzz/Types.js.map +1 -1
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts +6 -6
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts.map +1 -1
- package/lib/test/utilities/IdCompressorTestUtilities.js +6 -6
- package/lib/test/utilities/IdCompressorTestUtilities.js.map +1 -1
- package/lib/test/utilities/MockTransaction.d.ts +4 -4
- package/lib/test/utilities/MockTransaction.d.ts.map +1 -1
- package/lib/test/utilities/MockTransaction.js +3 -3
- package/lib/test/utilities/MockTransaction.js.map +1 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts +1 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts.map +1 -1
- package/lib/test/utilities/PendingLocalStateTests.js +5 -5
- package/lib/test/utilities/PendingLocalStateTests.js.map +1 -1
- package/lib/test/utilities/SharedTreeTests.d.ts +2 -2
- package/lib/test/utilities/SharedTreeTests.d.ts.map +1 -1
- package/lib/test/utilities/SharedTreeTests.js +22 -22
- package/lib/test/utilities/SharedTreeTests.js.map +1 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts +1 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts.map +1 -1
- package/lib/test/utilities/SharedTreeVersioningTests.js +10 -10
- package/lib/test/utilities/SharedTreeVersioningTests.js.map +1 -1
- package/lib/test/utilities/SummaryLoadPerfTests.js +6 -6
- package/lib/test/utilities/SummaryLoadPerfTests.js.map +1 -1
- package/lib/test/utilities/SummarySizeTests.d.ts +1 -1
- package/lib/test/utilities/SummarySizeTests.d.ts.map +1 -1
- package/lib/test/utilities/SummarySizeTests.js +5 -5
- package/lib/test/utilities/SummarySizeTests.js.map +1 -1
- package/lib/test/utilities/TestNode.d.ts +6 -6
- package/lib/test/utilities/TestNode.d.ts.map +1 -1
- package/lib/test/utilities/TestNode.js +5 -5
- package/lib/test/utilities/TestNode.js.map +1 -1
- package/lib/test/utilities/TestUtilities.d.ts +12 -12
- package/lib/test/utilities/TestUtilities.d.ts.map +1 -1
- package/lib/test/utilities/TestUtilities.js +18 -19
- package/lib/test/utilities/TestUtilities.js.map +1 -1
- package/lib/test/utilities/UndoRedoTests.d.ts +2 -2
- package/lib/test/utilities/UndoRedoTests.d.ts.map +1 -1
- package/lib/test/utilities/UndoRedoTests.js +7 -7
- package/lib/test/utilities/UndoRedoTests.js.map +1 -1
- package/package.json +57 -31
- package/src/ChangeCompression.ts +7 -7
- package/src/ChangeTypes.ts +5 -5
- package/src/Checkout.ts +13 -13
- package/src/Common.ts +2 -2
- package/src/EagerCheckout.ts +3 -3
- package/src/EditLog.ts +6 -7
- package/src/EditUtilities.ts +10 -10
- package/src/Forest.ts +4 -4
- package/src/HistoryEditFactory.ts +11 -11
- package/src/IdConversion.ts +4 -4
- package/src/InitialTree.ts +3 -3
- package/src/LazyCheckout.ts +5 -5
- package/src/LogViewer.ts +8 -8
- package/src/MergeHealth.ts +6 -6
- package/src/NodeIdUtilities.ts +4 -4
- package/src/PayloadUtilities.ts +1 -1
- package/src/ReconciliationPath.ts +3 -3
- package/src/RevisionValueCache.ts +1 -1
- package/src/RevisionView.ts +7 -7
- package/src/SerializationUtilities.ts +5 -5
- package/src/SharedTree.ts +34 -54
- package/src/SharedTreeEncoder.ts +15 -15
- package/src/StringInterner.ts +2 -2
- package/src/Summary.ts +5 -5
- package/src/SummaryBackCompatibility.ts +10 -5
- package/src/SummaryTestUtilities.ts +3 -3
- package/src/Transaction.ts +8 -8
- package/src/TransactionInternal.ts +8 -8
- package/src/TreeCompressor.ts +6 -6
- package/src/TreeNodeHandle.ts +4 -4
- package/src/TreeView.ts +4 -4
- package/src/TreeViewUtilities.ts +3 -3
- package/src/UndoRedoHandler.ts +4 -4
- package/src/UuidUtilities.ts +2 -2
- package/src/id-compressor/AppendOnlySortedMap.ts +1 -1
- package/src/id-compressor/IdCompressor.ts +8 -8
- package/src/id-compressor/IdRange.ts +1 -1
- package/src/id-compressor/NumericUuid.ts +3 -3
- package/src/id-compressor/SessionIdNormalizer.ts +4 -4
- package/src/id-compressor/index.ts +4 -4
- package/src/id-compressor/persisted-types/0.0.1.ts +1 -1
- package/src/id-compressor/persisted-types/index.ts +1 -1
- package/src/index.ts +29 -29
- package/src/migration-shim/migrationDeltaHandler.ts +9 -10
- package/src/migration-shim/migrationShim.ts +7 -5
- package/src/migration-shim/migrationShimFactory.ts +4 -1
- package/src/migration-shim/sharedTreeDeltaHandler.ts +7 -6
- package/src/migration-shim/types.ts +1 -1
- package/src/persisted-types/0.0.2.ts +1 -1
- package/src/persisted-types/0.1.1.ts +4 -4
- package/src/persisted-types/index.ts +2 -2
- package/tsconfig.esnext.json +1 -2
- package/tsconfig.json +3 -0
- package/lib/test/Attach.tests.d.ts +0 -6
- package/lib/test/Attach.tests.d.ts.map +0 -1
- package/lib/test/Attach.tests.js +0 -52
- package/lib/test/Attach.tests.js.map +0 -1
package/dist/IdConversion.js
CHANGED
|
@@ -5,69 +5,69 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.convertStablePlaceIds = exports.convertStableRangeIds = exports.convertNodeDataIds = exports.convertEditIds = void 0;
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
8
|
+
const Common_js_1 = require("./Common.js");
|
|
9
|
+
const EditUtilities_js_1 = require("./EditUtilities.js");
|
|
10
|
+
const Identifiers_js_1 = require("./Identifiers.js");
|
|
11
|
+
const index_js_1 = require("./persisted-types/index.js");
|
|
12
12
|
function convertEditIds(edit, convert) {
|
|
13
13
|
const changes = edit.changes.map((change) => {
|
|
14
14
|
switch (change.type) {
|
|
15
|
-
case
|
|
15
|
+
case index_js_1.ChangeTypeInternal.Build:
|
|
16
16
|
return {
|
|
17
|
-
type:
|
|
17
|
+
type: index_js_1.ChangeTypeInternal.Build,
|
|
18
18
|
destination: change.destination,
|
|
19
19
|
source: change.source.map((tree) => {
|
|
20
|
-
return (0,
|
|
20
|
+
return (0, EditUtilities_js_1.convertTreeNodes)(tree, (node) => convertNodeDataIds(node, convert), Identifiers_js_1.isDetachedSequenceId);
|
|
21
21
|
}),
|
|
22
22
|
};
|
|
23
|
-
case
|
|
23
|
+
case index_js_1.ChangeTypeInternal.Insert:
|
|
24
24
|
return {
|
|
25
|
-
type:
|
|
25
|
+
type: index_js_1.ChangeTypeInternal.Insert,
|
|
26
26
|
source: change.source,
|
|
27
27
|
destination: convertStablePlaceIds(change.destination, convert),
|
|
28
28
|
};
|
|
29
|
-
case
|
|
29
|
+
case index_js_1.ChangeTypeInternal.Detach: {
|
|
30
30
|
const detach = {
|
|
31
|
-
type:
|
|
31
|
+
type: index_js_1.ChangeTypeInternal.Detach,
|
|
32
32
|
source: convertStableRangeIds(change.source, convert),
|
|
33
33
|
};
|
|
34
|
-
(0,
|
|
34
|
+
(0, Common_js_1.copyPropertyIfDefined)(change, detach, 'destination');
|
|
35
35
|
return detach;
|
|
36
36
|
}
|
|
37
|
-
case
|
|
37
|
+
case index_js_1.ChangeTypeInternal.SetValue:
|
|
38
38
|
return {
|
|
39
|
-
type:
|
|
39
|
+
type: index_js_1.ChangeTypeInternal.SetValue,
|
|
40
40
|
nodeToModify: convert(change.nodeToModify),
|
|
41
41
|
payload: change.payload,
|
|
42
42
|
};
|
|
43
|
-
case
|
|
43
|
+
case index_js_1.ChangeTypeInternal.Constraint: {
|
|
44
44
|
const constraint = {
|
|
45
|
-
type:
|
|
45
|
+
type: index_js_1.ChangeTypeInternal.Constraint,
|
|
46
46
|
effect: change.effect,
|
|
47
47
|
toConstrain: convertStableRangeIds(change.toConstrain, convert),
|
|
48
48
|
};
|
|
49
|
-
(0,
|
|
50
|
-
(0,
|
|
51
|
-
(0,
|
|
52
|
-
(0,
|
|
49
|
+
(0, Common_js_1.copyPropertyIfDefined)(change, constraint, 'identityHash');
|
|
50
|
+
(0, Common_js_1.copyPropertyIfDefined)(change, constraint, 'label');
|
|
51
|
+
(0, Common_js_1.copyPropertyIfDefined)(change, constraint, 'length');
|
|
52
|
+
(0, Common_js_1.copyPropertyIfDefined)(change, constraint, 'contentHash');
|
|
53
53
|
if (change.parentNode !== undefined) {
|
|
54
54
|
constraint.parentNode = convert(change.parentNode);
|
|
55
55
|
}
|
|
56
56
|
return constraint;
|
|
57
57
|
}
|
|
58
58
|
default:
|
|
59
|
-
(0,
|
|
59
|
+
(0, Common_js_1.fail)('Unknown change type.');
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
const newEdit = { id: edit.id, changes };
|
|
63
|
-
(0,
|
|
63
|
+
(0, Common_js_1.copyPropertyIfDefined)(edit, newEdit, 'pastAttemptCount');
|
|
64
64
|
return newEdit;
|
|
65
65
|
}
|
|
66
66
|
exports.convertEditIds = convertEditIds;
|
|
67
67
|
function convertNodeDataIds(nodeData, convert) {
|
|
68
68
|
const identifier = convert(nodeData.identifier);
|
|
69
69
|
const output = { definition: nodeData.definition, identifier };
|
|
70
|
-
(0,
|
|
70
|
+
(0, Common_js_1.copyPropertyIfDefined)(nodeData, output, 'payload');
|
|
71
71
|
return output;
|
|
72
72
|
}
|
|
73
73
|
exports.convertNodeDataIds = convertNodeDataIds;
|
package/dist/IdConversion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdConversion.js","sourceRoot":"","sources":["../src/IdConversion.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"IdConversion.js","sourceRoot":"","sources":["../src/IdConversion.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2CAAqF;AACrF,yDAAsD;AACtD,qDAAoF;AACpF,yDAWoC;AAEpC,SAAgB,cAAc,CAC7B,IAA4D,EAC5D,OAA6B;IAE7B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAkD,EAAE;QAC3F,QAAQ,MAAM,CAAC,IAAI,EAAE;YACpB,KAAK,6BAAkB,CAAC,KAAK;gBAC5B,OAAO;oBACN,IAAI,EAAE,6BAAkB,CAAC,KAAK;oBAC9B,WAAW,EAAE,MAAM,CAAC,WAAW;oBAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBAClC,OAAO,IAAA,mCAAgB,EAIrB,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,qCAAoB,CAAC,CAAC;oBA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ACnC,MAAM,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;QACzC,cAAc,CAAC,gBAAgB,GAAG,MAAM,CAAC;KACzC;IAED,IAAI,cAAc,KAAK,SAAS,EAAE;QACjC,MAAM,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC9C,cAAc,CAAC,cAAc,GAAG;YAC/B,KAAK,EAAE,cAAc,CAAC,KAAK;YAC3B,MAAM;SACN,CAAC;KACF;IAED,OAAO,cAAc,CAAC;AACvB,CAAC;AAtBD,sDAsBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { copyPropertyIfDefined, fail, Mutable, ReplaceRecursive } from './Common.js';\nimport { convertTreeNodes } from './EditUtilities.js';\nimport { DetachedSequenceId, isDetachedSequenceId, NodeId } from './Identifiers.js';\nimport {\n\tBuildNodeInternal,\n\tChangeInternal,\n\tChangeTypeInternal,\n\tConstraintInternal,\n\tDetachInternal,\n\tEdit,\n\tNodeData,\n\tStablePlaceInternal,\n\tStableRangeInternal,\n\tTreeNode,\n} from './persisted-types/index.js';\n\nexport function convertEditIds<IdFrom, IdTo>(\n\tedit: ReplaceRecursive<Edit<ChangeInternal>, NodeId, IdFrom>,\n\tconvert: (id: IdFrom) => IdTo\n): Edit<ReplaceRecursive<ChangeInternal, NodeId, IdTo>> {\n\tconst changes = edit.changes.map((change): ReplaceRecursive<ChangeInternal, NodeId, IdTo> => {\n\t\tswitch (change.type) {\n\t\t\tcase ChangeTypeInternal.Build:\n\t\t\t\treturn {\n\t\t\t\t\ttype: ChangeTypeInternal.Build,\n\t\t\t\t\tdestination: change.destination,\n\t\t\t\t\tsource: change.source.map((tree) => {\n\t\t\t\t\t\treturn convertTreeNodes<\n\t\t\t\t\t\t\tTreeNode<ReplaceRecursive<BuildNodeInternal, NodeId, IdFrom>, IdFrom>,\n\t\t\t\t\t\t\tTreeNode<ReplaceRecursive<BuildNodeInternal, NodeId, IdTo>, IdTo>,\n\t\t\t\t\t\t\tDetachedSequenceId\n\t\t\t\t\t\t>(tree, (node) => convertNodeDataIds(node, convert), isDetachedSequenceId);\n\t\t\t\t\t}),\n\t\t\t\t};\n\t\t\tcase ChangeTypeInternal.Insert:\n\t\t\t\treturn {\n\t\t\t\t\ttype: ChangeTypeInternal.Insert,\n\t\t\t\t\tsource: change.source,\n\t\t\t\t\tdestination: convertStablePlaceIds(change.destination, convert),\n\t\t\t\t};\n\t\t\tcase ChangeTypeInternal.Detach: {\n\t\t\t\tconst detach: ReplaceRecursive<DetachInternal, NodeId, IdTo> = {\n\t\t\t\t\ttype: ChangeTypeInternal.Detach,\n\t\t\t\t\tsource: convertStableRangeIds(change.source, convert),\n\t\t\t\t};\n\t\t\t\tcopyPropertyIfDefined(change, detach, 'destination');\n\t\t\t\treturn detach;\n\t\t\t}\n\t\t\tcase ChangeTypeInternal.SetValue:\n\t\t\t\treturn {\n\t\t\t\t\ttype: ChangeTypeInternal.SetValue,\n\t\t\t\t\tnodeToModify: convert(change.nodeToModify),\n\t\t\t\t\tpayload: change.payload,\n\t\t\t\t};\n\t\t\tcase ChangeTypeInternal.Constraint: {\n\t\t\t\tconst constraint: Mutable<ReplaceRecursive<ConstraintInternal, NodeId, IdTo>> = {\n\t\t\t\t\ttype: ChangeTypeInternal.Constraint,\n\t\t\t\t\teffect: change.effect,\n\t\t\t\t\ttoConstrain: convertStableRangeIds(change.toConstrain, convert),\n\t\t\t\t};\n\t\t\t\tcopyPropertyIfDefined(change, constraint, 'identityHash');\n\t\t\t\tcopyPropertyIfDefined(change, constraint, 'label');\n\t\t\t\tcopyPropertyIfDefined(change, constraint, 'length');\n\t\t\t\tcopyPropertyIfDefined(change, constraint, 'contentHash');\n\t\t\t\tif (change.parentNode !== undefined) {\n\t\t\t\t\tconstraint.parentNode = convert(change.parentNode);\n\t\t\t\t}\n\t\t\t\treturn constraint;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tfail('Unknown change type.');\n\t\t}\n\t});\n\tconst newEdit = { id: edit.id, changes };\n\tcopyPropertyIfDefined(edit, newEdit, 'pastAttemptCount');\n\treturn newEdit;\n}\n\nexport function convertNodeDataIds<IdFrom, IdTo>(\n\tnodeData: NodeData<IdFrom>,\n\tconvert: (id: IdFrom) => IdTo\n): NodeData<IdTo> {\n\tconst identifier = convert(nodeData.identifier);\n\tconst output = { definition: nodeData.definition, identifier };\n\tcopyPropertyIfDefined(nodeData, output, 'payload');\n\treturn output;\n}\n\nexport function convertStableRangeIds<IdFrom, IdTo>(\n\trange: ReplaceRecursive<StableRangeInternal, NodeId, IdFrom>,\n\tconvert: (id: IdFrom) => IdTo\n): ReplaceRecursive<StableRangeInternal, NodeId, IdTo> {\n\tconst start = convertStablePlaceIds(range.start, convert);\n\tconst end = convertStablePlaceIds(range.end, convert);\n\treturn { start, end };\n}\n\nexport function convertStablePlaceIds<IdFrom, IdTo>(\n\t{ side, referenceSibling, referenceTrait }: ReplaceRecursive<StablePlaceInternal, NodeId, IdFrom>,\n\tconvert: (id: IdFrom) => IdTo\n): ReplaceRecursive<StablePlaceInternal, NodeId, IdTo> {\n\tconst stablePlaceNew: Mutable<ReplaceRecursive<StablePlaceInternal, NodeId, IdTo>> = {\n\t\tside,\n\t};\n\n\tif (referenceSibling !== undefined) {\n\t\tconst nodeId = convert(referenceSibling);\n\t\tstablePlaceNew.referenceSibling = nodeId;\n\t}\n\n\tif (referenceTrait !== undefined) {\n\t\tconst parent = convert(referenceTrait.parent);\n\t\tstablePlaceNew.referenceTrait = {\n\t\t\tlabel: referenceTrait.label,\n\t\t\tparent,\n\t\t};\n\t}\n\n\treturn stablePlaceNew;\n}\n"]}
|
package/dist/InitialTree.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ChangeNode_0_0_2 } from './persisted-types';
|
|
5
|
+
import { ChangeNode_0_0_2 } from './persisted-types/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* The initial tree.
|
|
8
8
|
* @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitialTree.d.ts","sourceRoot":"","sources":["../src/InitialTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"InitialTree.d.ts","sourceRoot":"","sources":["../src/InitialTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,gBAIzB,CAAC"}
|
package/dist/InitialTree.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.initialTree = void 0;
|
|
8
|
-
const
|
|
8
|
+
const index_js_1 = require("./id-compressor/index.js");
|
|
9
9
|
/**
|
|
10
10
|
* The initial tree.
|
|
11
11
|
* @alpha
|
|
@@ -13,6 +13,6 @@ const id_compressor_1 = require("./id-compressor");
|
|
|
13
13
|
exports.initialTree = {
|
|
14
14
|
traits: {},
|
|
15
15
|
definition: '51c58718-47b9-4fe4-ad46-56312f3b9e86',
|
|
16
|
-
identifier:
|
|
16
|
+
identifier: index_js_1.legacySharedTreeInitialTreeId,
|
|
17
17
|
};
|
|
18
18
|
//# sourceMappingURL=InitialTree.js.map
|
package/dist/InitialTree.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitialTree.js","sourceRoot":"","sources":["../src/InitialTree.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"InitialTree.js","sourceRoot":"","sources":["../src/InitialTree.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uDAAyE;AAGzE;;;GAGG;AACU,QAAA,WAAW,GAAqB;IAC5C,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,sCAAoD;IAChE,UAAU,EAAE,wCAA6C;CACzD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Definition, StableNodeId } from './Identifiers.js';\nimport { legacySharedTreeInitialTreeId } from './id-compressor/index.js';\nimport { ChangeNode_0_0_2 } from './persisted-types/index.js';\n\n/**\n * The initial tree.\n * @alpha\n */\nexport const initialTree: ChangeNode_0_0_2 = {\n\ttraits: {},\n\tdefinition: '51c58718-47b9-4fe4-ad46-56312f3b9e86' as Definition,\n\tidentifier: legacySharedTreeInitialTreeId as StableNodeId,\n};\n"]}
|
package/dist/LazyCheckout.d.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { Checkout } from './Checkout';
|
|
6
|
-
import { EditId } from './Identifiers';
|
|
7
|
-
import { RevisionView } from './RevisionView';
|
|
8
|
-
import { SharedTree } from './SharedTree';
|
|
9
|
-
import { ValidEditingResult } from './TransactionInternal';
|
|
5
|
+
import { Checkout } from './Checkout.js';
|
|
6
|
+
import { EditId } from './Identifiers.js';
|
|
7
|
+
import { RevisionView } from './RevisionView.js';
|
|
8
|
+
import { SharedTree } from './SharedTree.js';
|
|
9
|
+
import { ValidEditingResult } from './TransactionInternal.js';
|
|
10
10
|
/**
|
|
11
11
|
* Checkout that only updates its view of the tree when explicitly requested.
|
|
12
12
|
* This means that the {@link Checkout.currentView} field will never change unless {@link LazyCheckout.waitForPendingUpdates} is called.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyCheckout.d.ts","sourceRoot":"","sources":["../src/LazyCheckout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"LazyCheckout.d.ts","sourceRoot":"","sources":["../src/LazyCheckout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAA+B,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D;;;;;GAKG;AACH,qBAAa,YAAa,SAAQ,QAAQ;IACzC,OAAO,CAAC,UAAU,CAAe;IAEjC;;OAEG;gBACgB,IAAI,EAAE,UAAU;IAKnC,SAAS,CAAC,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAKrE,SAAS,KAAK,mBAAmB,IAAI,YAAY,CAEhD;IAEY,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;IAQtC,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;CAIlD"}
|
package/dist/LazyCheckout.js
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.LazyCheckout = void 0;
|
|
8
|
-
const
|
|
8
|
+
const Checkout_js_1 = require("./Checkout.js");
|
|
9
9
|
/**
|
|
10
10
|
* Checkout that only updates its view of the tree when explicitly requested.
|
|
11
11
|
* This means that the {@link Checkout.currentView} field will never change unless {@link LazyCheckout.waitForPendingUpdates} is called.
|
|
12
12
|
* @sealed
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
|
-
class LazyCheckout extends
|
|
15
|
+
class LazyCheckout extends Checkout_js_1.Checkout {
|
|
16
16
|
/**
|
|
17
17
|
* @param tree - the tree
|
|
18
18
|
*/
|
package/dist/LazyCheckout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyCheckout.js","sourceRoot":"","sources":["../src/LazyCheckout.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH
|
|
1
|
+
{"version":3,"file":"LazyCheckout.js","sourceRoot":"","sources":["../src/LazyCheckout.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAAyC;AAMzC;;;;;GAKG;AACH,MAAa,YAAa,SAAQ,sBAAQ;IAGzC;;OAEG;IACH,YAAmB,IAAgB;QAClC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,IAAiC,EAAE,EAAE,GAAE,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;IACpC,CAAC;IAES,aAAa,CAAC,EAAU,EAAE,MAA0B;QAC7D,KAAK,CAAC,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;IAChC,CAAC;IAED,IAAc,mBAAmB;QAChC,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,qBAAqB;QACjC,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,UAAU,EAAE;YAC9C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;YACxC,IAAI,CAAC,UAAU,EAAE,CAAC;SAClB;QACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAEM,KAAK,CAAC,oBAAoB;QAChC,qGAAqG;QACrG,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACD;AAhCD,oCAgCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Checkout } from './Checkout.js';\nimport { EditId } from './Identifiers.js';\nimport { RevisionView } from './RevisionView.js';\nimport { EditCommittedEventArguments, SharedTree } from './SharedTree.js';\nimport { ValidEditingResult } from './TransactionInternal.js';\n\n/**\n * Checkout that only updates its view of the tree when explicitly requested.\n * This means that the {@link Checkout.currentView} field will never change unless {@link LazyCheckout.waitForPendingUpdates} is called.\n * @sealed\n * @internal\n */\nexport class LazyCheckout extends Checkout {\n\tprivate latestView: RevisionView;\n\n\t/**\n\t * @param tree - the tree\n\t */\n\tpublic constructor(tree: SharedTree) {\n\t\tsuper(tree, tree.currentView, (args: EditCommittedEventArguments) => {});\n\t\tthis.latestView = tree.currentView;\n\t}\n\n\tprotected handleNewEdit(id: EditId, result: ValidEditingResult): void {\n\t\tsuper.handleNewEdit(id, result);\n\t\tthis.latestView = result.after;\n\t}\n\n\tprotected get latestCommittedView(): RevisionView {\n\t\treturn this.latestView;\n\t}\n\n\tpublic async waitForPendingUpdates(): Promise<void> {\n\t\tif (this.tree.currentView !== this.latestView) {\n\t\t\tthis.latestView = this.tree.currentView;\n\t\t\tthis.emitChange();\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\n\tpublic async waitForEditsToSubmit(): Promise<void> {\n\t\t// This checkout is only lazy on updates, not edit application, so it does not need to wait for here.\n\t\treturn Promise.resolve();\n\t}\n}\n"]}
|
package/dist/LogViewer.d.ts
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
6
6
|
import { IEvent } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { EditLog } from './EditLog';
|
|
8
|
-
import { EditId } from './Identifiers';
|
|
9
|
-
import { Revision } from './RevisionValueCache';
|
|
10
|
-
import { ReconciliationChange, ReconciliationPath } from './ReconciliationPath';
|
|
11
|
-
import { ChangeInternal, Edit, EditStatus } from './persisted-types';
|
|
12
|
-
import { RevisionView } from './RevisionView';
|
|
13
|
-
import { EditingResult, TransactionInternal } from './TransactionInternal';
|
|
7
|
+
import { EditLog } from './EditLog.js';
|
|
8
|
+
import { EditId } from './Identifiers.js';
|
|
9
|
+
import { Revision } from './RevisionValueCache.js';
|
|
10
|
+
import { ReconciliationChange, ReconciliationPath } from './ReconciliationPath.js';
|
|
11
|
+
import { ChangeInternal, Edit, EditStatus } from './persisted-types/index.js';
|
|
12
|
+
import { RevisionView } from './RevisionView.js';
|
|
13
|
+
import { EditingResult, TransactionInternal } from './TransactionInternal.js';
|
|
14
14
|
/**
|
|
15
15
|
* Callback for when an edit is applied (meaning the result of applying it to a particular revision is computed).
|
|
16
16
|
*
|
package/dist/LogViewer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogViewer.d.ts","sourceRoot":"","sources":["../src/LogViewer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAGzD,OAAO,EAAE,OAAO,EAA0B,MAAM,
|
|
1
|
+
{"version":3,"file":"LogViewer.d.ts","sourceRoot":"","sources":["../src/LogViewer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAGzD,OAAO,EAAE,OAAO,EAA0B,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAsB,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAsB,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAA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I;QAAE,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;IAe1G;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA0B9B;;;;OAIG;IACI,+BAA+B,CAAC,cAAc,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IA+C/F;;OAEG;IACU,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;IAIvE;;OAEG;IACU,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC;IAIvE;;OAEG;IACI,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc;IAIjE;;OAEG;IACI,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY;CAGjE"}
|
package/dist/LogViewer.js
CHANGED
|
@@ -11,10 +11,10 @@ exports.CachingLogViewer = exports.CachingLogViewerDiagnosticEvents = void 0;
|
|
|
11
11
|
const denque_1 = __importDefault(require("denque"));
|
|
12
12
|
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
13
13
|
const core_utils_1 = require("@fluidframework/core-utils");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
14
|
+
const Common_js_1 = require("./Common.js");
|
|
15
|
+
const RevisionValueCache_js_1 = require("./RevisionValueCache.js");
|
|
16
|
+
const index_js_1 = require("./persisted-types/index.js");
|
|
17
|
+
const TransactionInternal_js_1 = require("./TransactionInternal.js");
|
|
18
18
|
/**
|
|
19
19
|
* Events reported by {@link CachingLogViewer} for diagnostics or testing purposes.
|
|
20
20
|
*/
|
|
@@ -46,7 +46,7 @@ class CachingLogViewer extends client_utils_1.TypedEventEmitter {
|
|
|
46
46
|
* @param processEditStatus - called after applying an edit.
|
|
47
47
|
* @param processSequencedEditResult - called after applying a sequenced edit.
|
|
48
48
|
*/
|
|
49
|
-
constructor(log, baseView, initialRevision, processEditStatus =
|
|
49
|
+
constructor(log, baseView, initialRevision, processEditStatus = Common_js_1.noop, processSequencedEditResult = Common_js_1.noop, minimumSequenceNumber = 0) {
|
|
50
50
|
super();
|
|
51
51
|
/**
|
|
52
52
|
* A cache for local revisions.
|
|
@@ -65,9 +65,9 @@ class CachingLogViewer extends client_utils_1.TypedEventEmitter {
|
|
|
65
65
|
(0, core_utils_1.assert)(Number.isInteger(initialRevision[0]), 0x628 /* revision must be an integer */);
|
|
66
66
|
(0, core_utils_1.assert)(this.log.isSequencedRevision(initialRevision[0]), 0x629 /* revision must correspond to the result of a SequencedEdit */);
|
|
67
67
|
}
|
|
68
|
-
this.sequencedRevisionCache = new
|
|
69
|
-
this.processEditStatus = processEditStatus ??
|
|
70
|
-
this.processSequencedEditResult = processSequencedEditResult ??
|
|
68
|
+
this.sequencedRevisionCache = new RevisionValueCache_js_1.RevisionValueCache(CachingLogViewer.sequencedCacheSizeMax, minimumSequenceNumber, initialRevision ?? [0, { view: baseView }]);
|
|
69
|
+
this.processEditStatus = processEditStatus ?? Common_js_1.noop;
|
|
70
|
+
this.processSequencedEditResult = processSequencedEditResult ?? Common_js_1.noop;
|
|
71
71
|
this.detachFromEditLog = this.log.registerEditAddedHandler(this.handleEditAdded.bind(this));
|
|
72
72
|
// Registers a handler that is called when edits are evicted
|
|
73
73
|
this.log.registerEditEvictionHandler(this.evictCachedRevisions.bind(this));
|
|
@@ -91,7 +91,7 @@ class CachingLogViewer extends client_utils_1.TypedEventEmitter {
|
|
|
91
91
|
if (entry !== undefined) {
|
|
92
92
|
const revision = this.log.numberOfSequencedEdits;
|
|
93
93
|
const { view } = entry;
|
|
94
|
-
this.sequencedRevisionCache.cacheValue(revision, entry.status ===
|
|
94
|
+
this.sequencedRevisionCache.cacheValue(revision, entry.status === index_js_1.EditStatus.Applied
|
|
95
95
|
? {
|
|
96
96
|
view,
|
|
97
97
|
status: entry.status,
|
|
@@ -125,7 +125,7 @@ class CachingLogViewer extends client_utils_1.TypedEventEmitter {
|
|
|
125
125
|
const { startRevision } = startingPoint;
|
|
126
126
|
let current = startingPoint;
|
|
127
127
|
for (let i = startRevision; i < revision && i < this.log.length; i++) {
|
|
128
|
-
const edit = this.log.tryGetEditAtIndex(i) ?? (0,
|
|
128
|
+
const edit = this.log.tryGetEditAtIndex(i) ?? (0, Common_js_1.fail)('edit not found');
|
|
129
129
|
current = this.applyEdit(current.view, edit, i);
|
|
130
130
|
}
|
|
131
131
|
return current;
|
|
@@ -180,20 +180,20 @@ class CachingLogViewer extends client_utils_1.TypedEventEmitter {
|
|
|
180
180
|
// This is because the local cache does not contain an entry for the implicit initial tree edit.
|
|
181
181
|
const localCacheIndex = revisionClamped - 1 - numberOfSequencedEdits;
|
|
182
182
|
if (localCacheIndex < length) {
|
|
183
|
-
const cached = this.localRevisionCache.peekAt(localCacheIndex) ?? (0,
|
|
183
|
+
const cached = this.localRevisionCache.peekAt(localCacheIndex) ?? (0, Common_js_1.fail)('missing tail of localRevisionViewCache');
|
|
184
184
|
return {
|
|
185
185
|
...cached,
|
|
186
186
|
startRevision: revisionClamped,
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
else {
|
|
190
|
-
current = this.localRevisionCache.peekAt(length - 1) ?? (0,
|
|
190
|
+
current = this.localRevisionCache.peekAt(length - 1) ?? (0, Common_js_1.fail)('missing tail of localRevisionViewCache');
|
|
191
191
|
startRevision = numberOfSequencedEdits + length;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
else {
|
|
195
195
|
const [cachedRevision, cachedView] = this.sequencedRevisionCache.getClosestEntry(revisionClamped) ??
|
|
196
|
-
(0,
|
|
196
|
+
(0, Common_js_1.fail)('No preceding revision view cached.');
|
|
197
197
|
startRevision = cachedRevision;
|
|
198
198
|
current = cachedView;
|
|
199
199
|
}
|
|
@@ -218,14 +218,14 @@ class CachingLogViewer extends client_utils_1.TypedEventEmitter {
|
|
|
218
218
|
}
|
|
219
219
|
else {
|
|
220
220
|
reconciliationPath = this.reconciliationPathFromEdit(edit.id);
|
|
221
|
-
editingResult =
|
|
221
|
+
editingResult = TransactionInternal_js_1.TransactionInternal.factory(prevView)
|
|
222
222
|
.applyChanges(edit.changes, reconciliationPath)
|
|
223
223
|
.close();
|
|
224
224
|
cached = false;
|
|
225
225
|
}
|
|
226
226
|
const revision = editIndex + 1;
|
|
227
|
-
const nextView = editingResult.status ===
|
|
228
|
-
const computedCacheEntry = editingResult.status ===
|
|
227
|
+
const nextView = editingResult.status === index_js_1.EditStatus.Applied ? editingResult.after : prevView;
|
|
228
|
+
const computedCacheEntry = editingResult.status === index_js_1.EditStatus.Applied
|
|
229
229
|
? { view: nextView, status: editingResult.status, steps: editingResult.steps }
|
|
230
230
|
: { view: nextView, status: editingResult.status, failure: editingResult.failure };
|
|
231
231
|
if (this.log.isSequencedRevision(revision)) {
|
|
@@ -285,7 +285,7 @@ class CachingLogViewer extends client_utils_1.TypedEventEmitter {
|
|
|
285
285
|
if (targetSequenceNumber < orderedId.sequenceInfo.sequenceNumber) {
|
|
286
286
|
const firstEdit = this.getEditResultFromSequenceNumber(targetSequenceNumber);
|
|
287
287
|
if (firstEdit !== undefined) {
|
|
288
|
-
if (firstEdit.status ===
|
|
288
|
+
if (firstEdit.status === index_js_1.EditStatus.Applied) {
|
|
289
289
|
const firstEditInfo = this.log.getOrderedEditId(firstEdit.id);
|
|
290
290
|
if (firstEditInfo.sequenceInfo !== undefined &&
|
|
291
291
|
firstEditInfo.sequenceInfo.sequenceNumber >
|
|
@@ -302,7 +302,7 @@ class CachingLogViewer extends client_utils_1.TypedEventEmitter {
|
|
|
302
302
|
const highestIndex = this.log.getIndexOfId(editId) - 1;
|
|
303
303
|
for (let index = lowestIndex; index <= highestIndex; ++index) {
|
|
304
304
|
const edit = this.getEditResultFromIndex(index);
|
|
305
|
-
if (edit.status ===
|
|
305
|
+
if (edit.status === index_js_1.EditStatus.Applied) {
|
|
306
306
|
reconciliationPath.push({
|
|
307
307
|
...edit.steps,
|
|
308
308
|
before: edit.before,
|
|
@@ -341,16 +341,16 @@ class CachingLogViewer extends client_utils_1.TypedEventEmitter {
|
|
|
341
341
|
* @returns Edit result information for the edit at the given `index`.
|
|
342
342
|
*/
|
|
343
343
|
getEditResultFromIndex(index) {
|
|
344
|
-
const edit = this.log.tryGetEditAtIndex(index) ?? (0,
|
|
344
|
+
const edit = this.log.tryGetEditAtIndex(index) ?? (0, Common_js_1.fail)('edit does not exist in memory');
|
|
345
345
|
const before = this.getRevisionViewInMemory(index);
|
|
346
346
|
const resultAfter = this.getEditResultInMemory(index + 1);
|
|
347
347
|
if (resultAfter.status === undefined) {
|
|
348
|
-
(0,
|
|
348
|
+
(0, Common_js_1.fail)('The status of every edit in memory should be known');
|
|
349
349
|
}
|
|
350
|
-
return resultAfter.status ===
|
|
350
|
+
return resultAfter.status === index_js_1.EditStatus.Applied
|
|
351
351
|
? {
|
|
352
352
|
id: edit.id,
|
|
353
|
-
status:
|
|
353
|
+
status: index_js_1.EditStatus.Applied,
|
|
354
354
|
before,
|
|
355
355
|
changes: edit.changes,
|
|
356
356
|
view: resultAfter.view,
|
|
@@ -389,12 +389,12 @@ class CachingLogViewer extends client_utils_1.TypedEventEmitter {
|
|
|
389
389
|
const before = this.getRevisionViewInMemory(index);
|
|
390
390
|
const resultAfter = this.getEditResultInMemory(index + 1);
|
|
391
391
|
if (resultAfter.status === undefined) {
|
|
392
|
-
(0,
|
|
392
|
+
(0, Common_js_1.fail)('The status of every edit in session should be known');
|
|
393
393
|
}
|
|
394
|
-
return resultAfter.status ===
|
|
394
|
+
return resultAfter.status === index_js_1.EditStatus.Applied
|
|
395
395
|
? {
|
|
396
396
|
id: edit.id,
|
|
397
|
-
status:
|
|
397
|
+
status: index_js_1.EditStatus.Applied,
|
|
398
398
|
before,
|
|
399
399
|
changes: edit.changes,
|
|
400
400
|
view: resultAfter.view,
|