@fluid-experimental/tree 0.58.2002 → 0.58.3000-61081
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/README.md +9 -9
- package/dist/ChangeCompression.d.ts +39 -0
- package/dist/ChangeCompression.d.ts.map +1 -0
- package/dist/ChangeCompression.js +117 -0
- package/dist/ChangeCompression.js.map +1 -0
- package/{lib/default-edits/PersistedTypes.d.ts → dist/ChangeTypes.d.ts} +58 -100
- package/dist/ChangeTypes.d.ts.map +1 -0
- package/dist/{default-edits/PersistedTypes.js → ChangeTypes.js} +21 -76
- package/dist/ChangeTypes.js.map +1 -0
- package/dist/Checkout.d.ts +39 -27
- package/dist/Checkout.d.ts.map +1 -1
- package/dist/Checkout.js +59 -31
- package/dist/Checkout.js.map +1 -1
- package/dist/Common.d.ts +175 -38
- package/dist/Common.d.ts.map +1 -1
- package/dist/Common.js +240 -103
- package/dist/Common.js.map +1 -1
- package/dist/EagerCheckout.d.ts +24 -0
- package/dist/EagerCheckout.d.ts.map +1 -0
- package/dist/{BasicCheckout.js → EagerCheckout.js} +9 -6
- package/dist/EagerCheckout.js.map +1 -0
- package/dist/EditLog.d.ts +77 -63
- package/dist/EditLog.d.ts.map +1 -1
- package/dist/EditLog.js +85 -48
- package/dist/EditLog.js.map +1 -1
- package/dist/EditUtilities.d.ts +168 -0
- package/dist/EditUtilities.d.ts.map +1 -0
- package/dist/EditUtilities.js +373 -0
- package/dist/EditUtilities.js.map +1 -0
- package/dist/EventTypes.d.ts +73 -0
- package/dist/EventTypes.d.ts.map +1 -0
- package/dist/EventTypes.js +78 -0
- package/dist/EventTypes.js.map +1 -0
- package/dist/Forest.d.ts +29 -7
- package/dist/Forest.d.ts.map +1 -1
- package/dist/Forest.js +60 -36
- package/dist/Forest.js.map +1 -1
- package/dist/HistoryEditFactory.d.ts +20 -0
- package/dist/HistoryEditFactory.d.ts.map +1 -0
- package/dist/HistoryEditFactory.js +226 -0
- package/dist/HistoryEditFactory.js.map +1 -0
- package/dist/IdConversion.d.ts +12 -0
- package/dist/IdConversion.d.ts.map +1 -0
- package/dist/IdConversion.js +98 -0
- package/dist/IdConversion.js.map +1 -0
- package/dist/Identifiers.d.ts +89 -2
- package/dist/Identifiers.d.ts.map +1 -1
- package/dist/Identifiers.js +10 -0
- package/dist/Identifiers.js.map +1 -1
- package/dist/InitialTree.d.ts +2 -2
- package/dist/InitialTree.d.ts.map +1 -1
- package/dist/InitialTree.js +2 -1
- package/dist/InitialTree.js.map +1 -1
- package/dist/LazyCheckout.d.ts +28 -0
- package/dist/LazyCheckout.d.ts.map +1 -0
- package/dist/LazyCheckout.js +44 -0
- package/dist/LazyCheckout.js.map +1 -0
- package/dist/LogViewer.d.ts +130 -85
- package/dist/LogViewer.d.ts.map +1 -1
- package/dist/LogViewer.js +110 -85
- package/dist/LogViewer.js.map +1 -1
- package/dist/MergeHealth.d.ts +221 -0
- package/dist/MergeHealth.d.ts.map +1 -0
- package/dist/MergeHealth.js +263 -0
- package/dist/MergeHealth.js.map +1 -0
- package/dist/NodeIdUtilities.d.ts +90 -0
- package/dist/NodeIdUtilities.d.ts.map +1 -0
- package/dist/NodeIdUtilities.js +60 -0
- package/dist/NodeIdUtilities.js.map +1 -0
- package/dist/PayloadUtilities.d.ts +42 -0
- package/dist/PayloadUtilities.d.ts.map +1 -0
- package/dist/PayloadUtilities.js +114 -0
- package/dist/PayloadUtilities.js.map +1 -0
- package/dist/ReconciliationPath.d.ts +18 -13
- package/dist/ReconciliationPath.d.ts.map +1 -1
- package/dist/ReconciliationPath.js.map +1 -1
- package/dist/RevisionValueCache.d.ts +11 -2
- package/dist/RevisionValueCache.d.ts.map +1 -1
- package/dist/RevisionValueCache.js +2 -3
- package/dist/RevisionValueCache.js.map +1 -1
- package/dist/RevisionView.d.ts +83 -0
- package/dist/RevisionView.d.ts.map +1 -0
- package/dist/RevisionView.js +182 -0
- package/dist/RevisionView.js.map +1 -0
- package/dist/SerializationUtilities.d.ts +36 -0
- package/dist/SerializationUtilities.d.ts.map +1 -0
- package/dist/SerializationUtilities.js +102 -0
- package/dist/SerializationUtilities.js.map +1 -0
- package/dist/SharedTree.d.ts +400 -0
- package/dist/SharedTree.d.ts.map +1 -0
- package/dist/SharedTree.js +1064 -0
- package/dist/SharedTree.js.map +1 -0
- package/dist/SharedTreeEncoder.d.ts +102 -0
- package/dist/SharedTreeEncoder.d.ts.map +1 -0
- package/dist/SharedTreeEncoder.js +313 -0
- package/dist/SharedTreeEncoder.js.map +1 -0
- package/dist/StringInterner.d.ts +46 -0
- package/dist/StringInterner.d.ts.map +1 -0
- package/dist/StringInterner.js +61 -0
- package/dist/StringInterner.js.map +1 -0
- package/dist/Summary.d.ts +40 -0
- package/dist/Summary.d.ts.map +1 -0
- package/dist/Summary.js +23 -0
- package/dist/Summary.js.map +1 -0
- package/dist/SummaryBackCompatibility.d.ts +22 -22
- package/dist/SummaryBackCompatibility.d.ts.map +1 -1
- package/dist/SummaryBackCompatibility.js +30 -33
- package/dist/SummaryBackCompatibility.js.map +1 -1
- package/dist/SummaryTestUtilities.d.ts +31 -0
- package/dist/SummaryTestUtilities.d.ts.map +1 -0
- package/dist/SummaryTestUtilities.js +37 -0
- package/dist/SummaryTestUtilities.js.map +1 -0
- package/dist/Transaction.d.ts +53 -0
- package/dist/Transaction.d.ts.map +1 -0
- package/dist/Transaction.js +76 -0
- package/dist/Transaction.js.map +1 -0
- package/dist/TransactionInternal.d.ts +543 -0
- package/dist/TransactionInternal.d.ts.map +1 -0
- package/dist/TransactionInternal.js +622 -0
- package/dist/TransactionInternal.js.map +1 -0
- package/dist/TreeCompressor.d.ts +37 -0
- package/dist/TreeCompressor.d.ts.map +1 -0
- package/dist/TreeCompressor.js +132 -0
- package/dist/TreeCompressor.js.map +1 -0
- package/dist/TreeNodeHandle.d.ts +12 -18
- package/dist/TreeNodeHandle.d.ts.map +1 -1
- package/dist/TreeNodeHandle.js +13 -23
- package/dist/TreeNodeHandle.js.map +1 -1
- package/dist/TreeView.d.ts +166 -0
- package/dist/TreeView.d.ts.map +1 -0
- package/dist/TreeView.js +217 -0
- package/dist/TreeView.js.map +1 -0
- package/dist/TreeViewUtilities.d.ts +21 -0
- package/dist/TreeViewUtilities.d.ts.map +1 -0
- package/dist/TreeViewUtilities.js +77 -0
- package/dist/TreeViewUtilities.js.map +1 -0
- package/dist/{default-edits/UndoRedoHandler.d.ts → UndoRedoHandler.d.ts} +2 -2
- package/dist/UndoRedoHandler.d.ts.map +1 -0
- package/dist/{default-edits/UndoRedoHandler.js → UndoRedoHandler.js} +5 -9
- package/dist/UndoRedoHandler.js.map +1 -0
- package/dist/id-compressor/AppendOnlySortedMap.d.ts +127 -0
- package/dist/id-compressor/AppendOnlySortedMap.d.ts.map +1 -0
- package/dist/id-compressor/AppendOnlySortedMap.js +283 -0
- package/dist/id-compressor/AppendOnlySortedMap.js.map +1 -0
- package/dist/id-compressor/IdCompressor.d.ts +389 -0
- package/dist/id-compressor/IdCompressor.d.ts.map +1 -0
- package/dist/id-compressor/IdCompressor.js +1353 -0
- package/dist/id-compressor/IdCompressor.js.map +1 -0
- package/dist/id-compressor/IdRange.d.ts +11 -0
- package/dist/id-compressor/IdRange.d.ts.map +1 -0
- package/dist/id-compressor/IdRange.js +29 -0
- package/dist/id-compressor/IdRange.js.map +1 -0
- package/dist/id-compressor/NumericUuid.d.ts +63 -0
- package/dist/id-compressor/NumericUuid.d.ts.map +1 -0
- package/dist/id-compressor/NumericUuid.js +377 -0
- package/dist/id-compressor/NumericUuid.js.map +1 -0
- package/dist/id-compressor/index.d.ts +12 -0
- package/dist/id-compressor/index.d.ts.map +1 -0
- package/dist/id-compressor/index.js +26 -0
- package/dist/id-compressor/index.js.map +1 -0
- package/dist/id-compressor/persisted-types/0.0.1.d.ts +156 -0
- package/dist/id-compressor/persisted-types/0.0.1.d.ts.map +1 -0
- package/dist/id-compressor/persisted-types/0.0.1.js +7 -0
- package/dist/id-compressor/persisted-types/0.0.1.js.map +1 -0
- package/dist/id-compressor/persisted-types/index.d.ts +6 -0
- package/dist/id-compressor/persisted-types/index.d.ts.map +1 -0
- package/dist/id-compressor/persisted-types/index.js +18 -0
- package/dist/id-compressor/persisted-types/index.js.map +1 -0
- package/dist/index.d.ts +29 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -35
- package/dist/index.js.map +1 -1
- package/dist/persisted-types/0.0.2.d.ts +385 -0
- package/dist/persisted-types/0.0.2.d.ts.map +1 -0
- package/dist/persisted-types/0.0.2.js +113 -0
- package/dist/persisted-types/0.0.2.js.map +1 -0
- package/dist/persisted-types/0.1.1.d.ts +314 -0
- package/dist/persisted-types/0.1.1.d.ts.map +1 -0
- package/dist/persisted-types/0.1.1.js +153 -0
- package/dist/persisted-types/0.1.1.js.map +1 -0
- package/dist/persisted-types/index.d.ts +7 -0
- package/dist/persisted-types/index.d.ts.map +1 -0
- package/dist/persisted-types/index.js +20 -0
- package/dist/persisted-types/index.js.map +1 -0
- package/docs/0-1-1-Compression.md +228 -0
- package/docs/Breaking-Change-Migration.md +52 -0
- package/docs/Compression.md +2 -2
- package/docs/Telemetry.md +43 -0
- package/lib/ChangeCompression.d.ts +39 -0
- package/lib/ChangeCompression.d.ts.map +1 -0
- package/lib/ChangeCompression.js +111 -0
- package/lib/ChangeCompression.js.map +1 -0
- package/{dist/default-edits/PersistedTypes.d.ts → lib/ChangeTypes.d.ts} +58 -100
- package/lib/ChangeTypes.d.ts.map +1 -0
- package/lib/{default-edits/PersistedTypes.js → ChangeTypes.js} +15 -68
- package/lib/ChangeTypes.js.map +1 -0
- package/lib/Checkout.d.ts +39 -27
- package/lib/Checkout.d.ts.map +1 -1
- package/lib/Checkout.js +51 -23
- package/lib/Checkout.js.map +1 -1
- package/lib/Common.d.ts +175 -38
- package/lib/Common.d.ts.map +1 -1
- package/lib/Common.js +226 -101
- package/lib/Common.js.map +1 -1
- package/lib/EagerCheckout.d.ts +24 -0
- package/lib/EagerCheckout.d.ts.map +1 -0
- package/lib/{BasicCheckout.js → EagerCheckout.js} +7 -4
- package/lib/EagerCheckout.js.map +1 -0
- package/lib/EditLog.d.ts +77 -63
- package/lib/EditLog.d.ts.map +1 -1
- package/lib/EditLog.js +83 -47
- package/lib/EditLog.js.map +1 -1
- package/lib/EditUtilities.d.ts +168 -0
- package/lib/EditUtilities.d.ts.map +1 -0
- package/lib/EditUtilities.js +353 -0
- package/lib/EditUtilities.js.map +1 -0
- package/lib/EventTypes.d.ts +73 -0
- package/lib/EventTypes.d.ts.map +1 -0
- package/lib/EventTypes.js +75 -0
- package/lib/EventTypes.js.map +1 -0
- package/lib/Forest.d.ts +29 -7
- package/lib/Forest.d.ts.map +1 -1
- package/lib/Forest.js +58 -35
- package/lib/Forest.js.map +1 -1
- package/lib/HistoryEditFactory.d.ts +20 -0
- package/lib/HistoryEditFactory.d.ts.map +1 -0
- package/lib/{default-edits/HistoryEditFactory.js → HistoryEditFactory.js} +78 -39
- package/lib/HistoryEditFactory.js.map +1 -0
- package/lib/IdConversion.d.ts +12 -0
- package/lib/IdConversion.d.ts.map +1 -0
- package/lib/IdConversion.js +91 -0
- package/lib/IdConversion.js.map +1 -0
- package/lib/Identifiers.d.ts +89 -2
- package/lib/Identifiers.d.ts.map +1 -1
- package/lib/Identifiers.js +8 -1
- package/lib/Identifiers.js.map +1 -1
- package/lib/InitialTree.d.ts +2 -2
- package/lib/InitialTree.d.ts.map +1 -1
- package/lib/InitialTree.js +2 -1
- package/lib/InitialTree.js.map +1 -1
- package/lib/LazyCheckout.d.ts +28 -0
- package/lib/LazyCheckout.d.ts.map +1 -0
- package/lib/LazyCheckout.js +40 -0
- package/lib/LazyCheckout.js.map +1 -0
- package/lib/LogViewer.d.ts +130 -85
- package/lib/LogViewer.d.ts.map +1 -1
- package/lib/LogViewer.js +102 -77
- package/lib/LogViewer.js.map +1 -1
- package/lib/MergeHealth.d.ts +221 -0
- package/lib/MergeHealth.d.ts.map +1 -0
- package/lib/MergeHealth.js +258 -0
- package/lib/MergeHealth.js.map +1 -0
- package/lib/NodeIdUtilities.d.ts +90 -0
- package/lib/NodeIdUtilities.d.ts.map +1 -0
- package/lib/NodeIdUtilities.js +53 -0
- package/lib/NodeIdUtilities.js.map +1 -0
- package/lib/PayloadUtilities.d.ts +42 -0
- package/lib/PayloadUtilities.d.ts.map +1 -0
- package/lib/PayloadUtilities.js +110 -0
- package/lib/PayloadUtilities.js.map +1 -0
- package/lib/ReconciliationPath.d.ts +18 -13
- package/lib/ReconciliationPath.d.ts.map +1 -1
- package/lib/ReconciliationPath.js.map +1 -1
- package/lib/RevisionValueCache.d.ts +11 -2
- package/lib/RevisionValueCache.d.ts.map +1 -1
- package/lib/RevisionValueCache.js +2 -3
- package/lib/RevisionValueCache.js.map +1 -1
- package/lib/RevisionView.d.ts +83 -0
- package/lib/RevisionView.d.ts.map +1 -0
- package/lib/RevisionView.js +175 -0
- package/lib/RevisionView.js.map +1 -0
- package/lib/SerializationUtilities.d.ts +36 -0
- package/lib/SerializationUtilities.d.ts.map +1 -0
- package/lib/SerializationUtilities.js +95 -0
- package/lib/SerializationUtilities.js.map +1 -0
- package/lib/SharedTree.d.ts +400 -0
- package/lib/SharedTree.d.ts.map +1 -0
- package/lib/SharedTree.js +1059 -0
- package/lib/SharedTree.js.map +1 -0
- package/lib/SharedTreeEncoder.d.ts +102 -0
- package/lib/SharedTreeEncoder.d.ts.map +1 -0
- package/lib/SharedTreeEncoder.js +308 -0
- package/lib/SharedTreeEncoder.js.map +1 -0
- package/lib/StringInterner.d.ts +46 -0
- package/lib/StringInterner.d.ts.map +1 -0
- package/lib/StringInterner.js +57 -0
- package/lib/StringInterner.js.map +1 -0
- package/lib/Summary.d.ts +40 -0
- package/lib/Summary.d.ts.map +1 -0
- package/lib/Summary.js +19 -0
- package/lib/Summary.js.map +1 -0
- package/lib/SummaryBackCompatibility.d.ts +22 -22
- package/lib/SummaryBackCompatibility.d.ts.map +1 -1
- package/lib/SummaryBackCompatibility.js +29 -32
- package/lib/SummaryBackCompatibility.js.map +1 -1
- package/lib/SummaryTestUtilities.d.ts +31 -0
- package/lib/SummaryTestUtilities.d.ts.map +1 -0
- package/lib/SummaryTestUtilities.js +32 -0
- package/lib/SummaryTestUtilities.js.map +1 -0
- package/lib/Transaction.d.ts +53 -0
- package/lib/Transaction.d.ts.map +1 -0
- package/lib/Transaction.js +72 -0
- package/lib/Transaction.js.map +1 -0
- package/lib/TransactionInternal.d.ts +543 -0
- package/lib/TransactionInternal.d.ts.map +1 -0
- package/lib/TransactionInternal.js +618 -0
- package/lib/TransactionInternal.js.map +1 -0
- package/lib/TreeCompressor.d.ts +37 -0
- package/lib/TreeCompressor.d.ts.map +1 -0
- package/lib/TreeCompressor.js +128 -0
- package/lib/TreeCompressor.js.map +1 -0
- package/lib/TreeNodeHandle.d.ts +12 -18
- package/lib/TreeNodeHandle.d.ts.map +1 -1
- package/lib/TreeNodeHandle.js +14 -24
- package/lib/TreeNodeHandle.js.map +1 -1
- package/lib/TreeView.d.ts +166 -0
- package/lib/TreeView.d.ts.map +1 -0
- package/lib/TreeView.js +213 -0
- package/lib/TreeView.js.map +1 -0
- package/lib/TreeViewUtilities.d.ts +21 -0
- package/lib/TreeViewUtilities.d.ts.map +1 -0
- package/lib/TreeViewUtilities.js +71 -0
- package/lib/TreeViewUtilities.js.map +1 -0
- package/lib/{default-edits/UndoRedoHandler.d.ts → UndoRedoHandler.d.ts} +2 -2
- package/lib/UndoRedoHandler.d.ts.map +1 -0
- package/lib/{default-edits/UndoRedoHandler.js → UndoRedoHandler.js} +3 -7
- package/lib/UndoRedoHandler.js.map +1 -0
- package/lib/id-compressor/AppendOnlySortedMap.d.ts +127 -0
- package/lib/id-compressor/AppendOnlySortedMap.d.ts.map +1 -0
- package/lib/id-compressor/AppendOnlySortedMap.js +278 -0
- package/lib/id-compressor/AppendOnlySortedMap.js.map +1 -0
- package/lib/id-compressor/IdCompressor.d.ts +389 -0
- package/lib/id-compressor/IdCompressor.d.ts.map +1 -0
- package/lib/id-compressor/IdCompressor.js +1343 -0
- package/lib/id-compressor/IdCompressor.js.map +1 -0
- package/lib/id-compressor/IdRange.d.ts +11 -0
- package/lib/id-compressor/IdRange.d.ts.map +1 -0
- package/lib/id-compressor/IdRange.js +25 -0
- package/lib/id-compressor/IdRange.js.map +1 -0
- package/lib/id-compressor/NumericUuid.d.ts +63 -0
- package/lib/id-compressor/NumericUuid.d.ts.map +1 -0
- package/lib/id-compressor/NumericUuid.js +365 -0
- package/lib/id-compressor/NumericUuid.js.map +1 -0
- package/lib/id-compressor/index.d.ts +12 -0
- package/lib/id-compressor/index.d.ts.map +1 -0
- package/lib/id-compressor/index.js +12 -0
- package/lib/id-compressor/index.js.map +1 -0
- package/lib/id-compressor/persisted-types/0.0.1.d.ts +156 -0
- package/lib/id-compressor/persisted-types/0.0.1.d.ts.map +1 -0
- package/lib/{test/Snapshot.tests.d.ts → id-compressor/persisted-types/0.0.1.js} +1 -1
- package/lib/id-compressor/persisted-types/0.0.1.js.map +1 -0
- package/lib/id-compressor/persisted-types/index.d.ts +6 -0
- package/lib/id-compressor/persisted-types/index.d.ts.map +1 -0
- package/lib/id-compressor/persisted-types/index.js +6 -0
- package/lib/id-compressor/persisted-types/index.js.map +1 -0
- package/lib/index.d.ts +29 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +23 -6
- package/lib/index.js.map +1 -1
- package/lib/persisted-types/0.0.2.d.ts +385 -0
- package/lib/persisted-types/0.0.2.d.ts.map +1 -0
- package/lib/persisted-types/0.0.2.js +110 -0
- package/lib/persisted-types/0.0.2.js.map +1 -0
- package/lib/persisted-types/0.1.1.d.ts +314 -0
- package/lib/persisted-types/0.1.1.d.ts.map +1 -0
- package/lib/persisted-types/0.1.1.js +150 -0
- package/lib/persisted-types/0.1.1.js.map +1 -0
- package/lib/persisted-types/index.d.ts +7 -0
- package/lib/persisted-types/index.d.ts.map +1 -0
- package/lib/persisted-types/index.js +8 -0
- package/lib/persisted-types/index.js.map +1 -0
- package/lib/test/AppendOnlySortedMap.tests.d.ts +6 -0
- package/lib/test/AppendOnlySortedMap.tests.d.ts.map +1 -0
- package/lib/test/AppendOnlySortedMap.tests.js +169 -0
- package/lib/test/AppendOnlySortedMap.tests.js.map +1 -0
- package/lib/test/{SnapshotUtilities.tests.d.ts → ChangeCompression.tests.d.ts} +1 -1
- package/lib/test/ChangeCompression.tests.d.ts.map +1 -0
- package/lib/test/ChangeCompression.tests.js +145 -0
- package/lib/test/ChangeCompression.tests.js.map +1 -0
- package/lib/test/Checkout.tests.d.ts +2 -3
- package/lib/test/Checkout.tests.d.ts.map +1 -1
- package/lib/test/Checkout.tests.js +126 -69
- package/lib/test/Checkout.tests.js.map +1 -1
- package/lib/test/Common.tests.js +60 -2
- package/lib/test/Common.tests.js.map +1 -1
- package/lib/test/{BasicCheckout.tests.d.ts → EagerCheckout.tests.d.ts} +1 -1
- package/lib/test/EagerCheckout.tests.d.ts.map +1 -0
- package/lib/test/EagerCheckout.tests.js +20 -0
- package/lib/test/EagerCheckout.tests.js.map +1 -0
- package/lib/test/Edit.tests.js +22 -14
- package/lib/test/Edit.tests.js.map +1 -1
- package/lib/test/{Anchors.glassBox.tests.d.ts → EditLog.perf.tests.d.ts} +1 -1
- package/lib/test/EditLog.perf.tests.d.ts.map +1 -0
- package/lib/test/EditLog.perf.tests.js +30 -0
- package/lib/test/EditLog.perf.tests.js.map +1 -0
- package/lib/test/EditLog.tests.js +10 -6
- package/lib/test/EditLog.tests.js.map +1 -1
- package/lib/test/EditUtilities.tests.d.ts +6 -0
- package/lib/test/EditUtilities.tests.d.ts.map +1 -0
- package/lib/test/EditUtilities.tests.js +503 -0
- package/lib/test/EditUtilities.tests.js.map +1 -0
- package/lib/test/Forest.perf.tests.d.ts +6 -0
- package/lib/test/Forest.perf.tests.d.ts.map +1 -0
- package/lib/test/Forest.perf.tests.js +133 -0
- package/lib/test/Forest.perf.tests.js.map +1 -0
- package/lib/test/Forest.tests.js +54 -27
- package/lib/test/Forest.tests.js.map +1 -1
- package/lib/test/GenericTransaction.tests.js +12 -3
- package/lib/test/GenericTransaction.tests.js.map +1 -1
- package/lib/test/HistoryEditFactory.tests.d.ts +6 -0
- package/lib/test/HistoryEditFactory.tests.d.ts.map +1 -0
- package/lib/test/HistoryEditFactory.tests.js +90 -0
- package/lib/test/HistoryEditFactory.tests.js.map +1 -0
- package/lib/test/IdCompressor.perf.tests.d.ts +6 -0
- package/lib/test/IdCompressor.perf.tests.d.ts.map +1 -0
- package/lib/test/IdCompressor.perf.tests.js +304 -0
- package/lib/test/IdCompressor.perf.tests.js.map +1 -0
- package/lib/test/IdCompressor.tests.d.ts +6 -0
- package/lib/test/IdCompressor.tests.d.ts.map +1 -0
- package/lib/test/IdCompressor.tests.js +1075 -0
- package/lib/test/IdCompressor.tests.js.map +1 -0
- package/lib/test/IdConversion.tests.d.ts +6 -0
- package/lib/test/IdConversion.tests.d.ts.map +1 -0
- package/lib/test/IdConversion.tests.js +36 -0
- package/lib/test/IdConversion.tests.js.map +1 -0
- package/lib/test/LazyCheckout.tests.d.ts +6 -0
- package/lib/test/LazyCheckout.tests.d.ts.map +1 -0
- package/lib/test/LazyCheckout.tests.js +22 -0
- package/lib/test/LazyCheckout.tests.js.map +1 -0
- package/lib/test/LogViewer.tests.js +269 -187
- package/lib/test/LogViewer.tests.js.map +1 -1
- package/lib/test/{SharedTreeWithAnchors.tests.d.ts → MergeHealthTelemetryHeartbeat.tests.d.ts} +1 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.d.ts.map +1 -0
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js +342 -0
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js.map +1 -0
- package/lib/test/NumericUuid.perf.tests.d.ts +6 -0
- package/lib/test/NumericUuid.perf.tests.d.ts.map +1 -0
- package/lib/test/NumericUuid.perf.tests.js +68 -0
- package/lib/test/NumericUuid.perf.tests.js.map +1 -0
- package/lib/test/NumericUuid.tests.d.ts +6 -0
- package/lib/test/NumericUuid.tests.d.ts.map +1 -0
- package/lib/test/NumericUuid.tests.js +191 -0
- package/lib/test/NumericUuid.tests.js.map +1 -0
- package/lib/test/RevisionView.tests.d.ts +6 -0
- package/lib/test/RevisionView.tests.d.ts.map +1 -0
- package/lib/test/RevisionView.tests.js +133 -0
- package/lib/test/RevisionView.tests.js.map +1 -0
- package/lib/test/SharedTree.perf.tests.d.ts +6 -0
- package/lib/test/SharedTree.perf.tests.d.ts.map +1 -0
- package/lib/test/SharedTree.perf.tests.js +39 -0
- package/lib/test/SharedTree.perf.tests.js.map +1 -0
- package/lib/test/SharedTree.tests.js +15 -3
- package/lib/test/SharedTree.tests.js.map +1 -1
- package/lib/test/StringInterner.tests.d.ts +6 -0
- package/lib/test/StringInterner.tests.d.ts.map +1 -0
- package/lib/test/StringInterner.tests.js +71 -0
- package/lib/test/StringInterner.tests.js.map +1 -0
- package/lib/test/Summary.tests.d.ts +8 -0
- package/lib/test/Summary.tests.d.ts.map +1 -0
- package/lib/test/Summary.tests.js +407 -0
- package/lib/test/Summary.tests.js.map +1 -0
- package/lib/test/Transaction.tests.js +76 -330
- package/lib/test/Transaction.tests.js.map +1 -1
- package/lib/test/TransactionInternal.tests.d.ts +6 -0
- package/lib/test/TransactionInternal.tests.d.ts.map +1 -0
- package/lib/test/TransactionInternal.tests.js +568 -0
- package/lib/test/TransactionInternal.tests.js.map +1 -0
- package/lib/test/TreeCompression.tests.d.ts +6 -0
- package/lib/test/TreeCompression.tests.d.ts.map +1 -0
- package/lib/test/TreeCompression.tests.js +292 -0
- package/lib/test/TreeCompression.tests.js.map +1 -0
- package/lib/test/TreeView.tests.d.ts +6 -0
- package/lib/test/TreeView.tests.d.ts.map +1 -0
- package/lib/test/TreeView.tests.js +147 -0
- package/lib/test/TreeView.tests.js.map +1 -0
- package/lib/test/UndoRedoHandler.tests.js +2 -2
- package/lib/test/UndoRedoHandler.tests.js.map +1 -1
- package/lib/test/Virtualization.tests.js +147 -62
- package/lib/test/Virtualization.tests.js.map +1 -1
- package/lib/test/fuzz/Generators.d.ts +19 -0
- package/lib/test/fuzz/Generators.d.ts.map +1 -0
- package/lib/test/fuzz/Generators.js +420 -0
- package/lib/test/fuzz/Generators.js.map +1 -0
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts +20 -0
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts.map +1 -0
- package/lib/test/fuzz/SharedTreeFuzzTests.js +200 -0
- package/lib/test/fuzz/SharedTreeFuzzTests.js.map +1 -0
- package/lib/test/fuzz/Types.d.ts +133 -0
- package/lib/test/fuzz/Types.d.ts.map +1 -0
- package/lib/test/{GenericTransactionWithAnchors.tests.d.ts → fuzz/Types.js} +2 -2
- package/lib/test/fuzz/Types.js.map +1 -0
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts +180 -0
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts.map +1 -0
- package/lib/test/utilities/IdCompressorTestUtilities.js +528 -0
- package/lib/test/utilities/IdCompressorTestUtilities.js.map +1 -0
- package/lib/test/utilities/MockTransaction.d.ts +26 -7
- package/lib/test/utilities/MockTransaction.d.ts.map +1 -1
- package/lib/test/utilities/MockTransaction.js +40 -11
- package/lib/test/utilities/MockTransaction.js.map +1 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts +12 -0
- package/lib/test/utilities/PendingLocalStateTests.d.ts.map +1 -0
- package/lib/test/utilities/PendingLocalStateTests.js +105 -0
- package/lib/test/utilities/PendingLocalStateTests.js.map +1 -0
- package/lib/test/utilities/SharedTreeTests.d.ts +3 -4
- package/lib/test/utilities/SharedTreeTests.d.ts.map +1 -1
- package/lib/test/utilities/SharedTreeTests.js +696 -439
- package/lib/test/utilities/SharedTreeTests.js.map +1 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts +11 -0
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts.map +1 -0
- package/lib/test/utilities/SharedTreeVersioningTests.js +345 -0
- package/lib/test/utilities/SharedTreeVersioningTests.js.map +1 -0
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts +10 -0
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts.map +1 -0
- package/lib/test/utilities/SummaryLoadPerfTests.js +102 -0
- package/lib/test/utilities/SummaryLoadPerfTests.js.map +1 -0
- package/lib/test/utilities/SummarySizeTests.d.ts +11 -0
- package/lib/test/utilities/SummarySizeTests.d.ts.map +1 -0
- package/lib/test/utilities/SummarySizeTests.js +158 -0
- package/lib/test/utilities/SummarySizeTests.js.map +1 -0
- package/lib/test/utilities/TestCommon.d.ts +9 -0
- package/lib/test/utilities/TestCommon.d.ts.map +1 -0
- package/lib/test/utilities/TestCommon.js +13 -0
- package/lib/test/utilities/TestCommon.js.map +1 -0
- package/lib/test/utilities/TestNode.d.ts +140 -0
- package/lib/test/utilities/TestNode.d.ts.map +1 -0
- package/lib/test/utilities/TestNode.js +292 -0
- package/lib/test/utilities/TestNode.js.map +1 -0
- package/lib/test/utilities/TestUtilities.d.ts +84 -70
- package/lib/test/utilities/TestUtilities.d.ts.map +1 -1
- package/lib/test/utilities/TestUtilities.js +218 -143
- package/lib/test/utilities/TestUtilities.js.map +1 -1
- package/lib/test/utilities/UndoRedoTests.d.ts +4 -5
- package/lib/test/utilities/UndoRedoTests.d.ts.map +1 -1
- package/lib/test/utilities/UndoRedoTests.js +138 -149
- package/lib/test/utilities/UndoRedoTests.js.map +1 -1
- package/package.json +19 -14
- package/src/ChangeCompression.ts +159 -0
- package/src/{default-edits/PersistedTypes.ts → ChangeTypes.ts} +62 -120
- package/src/Checkout.ts +81 -52
- package/src/Common.ts +317 -117
- package/src/EagerCheckout.ts +38 -0
- package/src/EditLog.ts +153 -100
- package/src/EditUtilities.ts +559 -0
- package/src/EventTypes.ts +74 -0
- package/src/Forest.ts +81 -73
- package/src/{default-edits/HistoryEditFactory.ts → HistoryEditFactory.ts} +103 -53
- package/src/IdConversion.ts +125 -0
- package/src/Identifiers.ts +101 -1
- package/src/InitialTree.ts +5 -4
- package/src/LazyCheckout.ts +51 -0
- package/src/LogViewer.ts +242 -166
- package/src/MergeHealth.ts +447 -0
- package/src/NodeIdUtilities.ts +141 -0
- package/src/PayloadUtilities.ts +124 -0
- package/src/ReconciliationPath.ts +18 -13
- package/src/RevisionValueCache.ts +14 -5
- package/src/RevisionView.ts +252 -0
- package/src/SerializationUtilities.ts +130 -0
- package/src/SharedTree.ts +1448 -0
- package/src/SharedTreeEncoder.ts +493 -0
- package/src/StringInterner.ts +72 -0
- package/src/Summary.ts +48 -0
- package/src/SummaryBackCompatibility.ts +47 -57
- package/src/SummaryTestUtilities.ts +54 -0
- package/src/Transaction.ts +94 -0
- package/src/TransactionInternal.ts +1088 -0
- package/src/TreeCompressor.ts +222 -0
- package/src/TreeNodeHandle.ts +19 -32
- package/src/TreeView.ts +321 -0
- package/src/TreeViewUtilities.ts +77 -0
- package/src/{default-edits/UndoRedoHandler.ts → UndoRedoHandler.ts} +8 -13
- package/src/id-compressor/AppendOnlySortedMap.ts +325 -0
- package/src/id-compressor/IdCompressor.md +3 -0
- package/src/id-compressor/IdCompressor.ts +1848 -0
- package/src/id-compressor/IdRange.ts +33 -0
- package/src/id-compressor/NumericUuid.ts +414 -0
- package/src/id-compressor/index.ts +13 -0
- package/src/id-compressor/persisted-types/0.0.1.ts +179 -0
- package/src/id-compressor/persisted-types/README.md +3 -0
- package/src/id-compressor/persisted-types/index.ts +6 -0
- package/src/index.ts +119 -59
- package/src/persisted-types/0.0.2.ts +442 -0
- package/src/persisted-types/0.1.1.ts +476 -0
- package/src/persisted-types/README.md +22 -0
- package/src/persisted-types/index.ts +9 -0
- package/.mocharc.js +0 -41
- package/api/tree.api.md +0 -729
- package/dist/BasicCheckout.d.ts +0 -23
- package/dist/BasicCheckout.d.ts.map +0 -1
- package/dist/BasicCheckout.js.map +0 -1
- package/dist/Snapshot.d.ts +0 -198
- package/dist/Snapshot.d.ts.map +0 -1
- package/dist/Snapshot.js +0 -267
- package/dist/Snapshot.js.map +0 -1
- package/dist/SnapshotUtilities.d.ts +0 -29
- package/dist/SnapshotUtilities.d.ts.map +0 -1
- package/dist/SnapshotUtilities.js +0 -73
- package/dist/SnapshotUtilities.js.map +0 -1
- package/dist/anchored-edits/AnchorResolution.d.ts +0 -144
- package/dist/anchored-edits/AnchorResolution.d.ts.map +0 -1
- package/dist/anchored-edits/AnchorResolution.js +0 -162
- package/dist/anchored-edits/AnchorResolution.js.map +0 -1
- package/dist/anchored-edits/Factory.d.ts +0 -56
- package/dist/anchored-edits/Factory.d.ts.map +0 -1
- package/dist/anchored-edits/Factory.js +0 -79
- package/dist/anchored-edits/Factory.js.map +0 -1
- package/dist/anchored-edits/PersistedTypes.d.ts +0 -245
- package/dist/anchored-edits/PersistedTypes.d.ts.map +0 -1
- package/dist/anchored-edits/PersistedTypes.js +0 -131
- package/dist/anchored-edits/PersistedTypes.js.map +0 -1
- package/dist/anchored-edits/SharedTreeWithAnchors.d.ts +0 -120
- package/dist/anchored-edits/SharedTreeWithAnchors.d.ts.map +0 -1
- package/dist/anchored-edits/SharedTreeWithAnchors.js +0 -115
- package/dist/anchored-edits/SharedTreeWithAnchors.js.map +0 -1
- package/dist/anchored-edits/TransactionWithAnchors.d.ts +0 -28
- package/dist/anchored-edits/TransactionWithAnchors.d.ts.map +0 -1
- package/dist/anchored-edits/TransactionWithAnchors.js +0 -36
- package/dist/anchored-edits/TransactionWithAnchors.js.map +0 -1
- package/dist/anchored-edits/index.d.ts +0 -10
- package/dist/anchored-edits/index.d.ts.map +0 -1
- package/dist/anchored-edits/index.js +0 -34
- package/dist/anchored-edits/index.js.map +0 -1
- package/dist/default-edits/EditUtilities.d.ts +0 -57
- package/dist/default-edits/EditUtilities.d.ts.map +0 -1
- package/dist/default-edits/EditUtilities.js +0 -192
- package/dist/default-edits/EditUtilities.js.map +0 -1
- package/dist/default-edits/Factory.d.ts +0 -56
- package/dist/default-edits/Factory.d.ts.map +0 -1
- package/dist/default-edits/Factory.js +0 -79
- package/dist/default-edits/Factory.js.map +0 -1
- package/dist/default-edits/HistoryEditFactory.d.ts +0 -19
- package/dist/default-edits/HistoryEditFactory.d.ts.map +0 -1
- package/dist/default-edits/HistoryEditFactory.js +0 -187
- package/dist/default-edits/HistoryEditFactory.js.map +0 -1
- package/dist/default-edits/PersistedTypes.d.ts.map +0 -1
- package/dist/default-edits/PersistedTypes.js.map +0 -1
- package/dist/default-edits/SharedTree.d.ts +0 -111
- package/dist/default-edits/SharedTree.d.ts.map +0 -1
- package/dist/default-edits/SharedTree.js +0 -124
- package/dist/default-edits/SharedTree.js.map +0 -1
- package/dist/default-edits/Summary.d.ts +0 -15
- package/dist/default-edits/Summary.d.ts.map +0 -1
- package/dist/default-edits/Summary.js +0 -35
- package/dist/default-edits/Summary.js.map +0 -1
- package/dist/default-edits/Transaction.d.ts +0 -41
- package/dist/default-edits/Transaction.d.ts.map +0 -1
- package/dist/default-edits/Transaction.js +0 -225
- package/dist/default-edits/Transaction.js.map +0 -1
- package/dist/default-edits/UndoRedoHandler.d.ts.map +0 -1
- package/dist/default-edits/UndoRedoHandler.js.map +0 -1
- package/dist/default-edits/index.d.ts +0 -13
- package/dist/default-edits/index.d.ts.map +0 -1
- package/dist/default-edits/index.js +0 -41
- package/dist/default-edits/index.js.map +0 -1
- package/dist/generic/GenericEditUtilities.d.ts +0 -26
- package/dist/generic/GenericEditUtilities.d.ts.map +0 -1
- package/dist/generic/GenericEditUtilities.js +0 -45
- package/dist/generic/GenericEditUtilities.js.map +0 -1
- package/dist/generic/GenericSharedTree.d.ts +0 -221
- package/dist/generic/GenericSharedTree.d.ts.map +0 -1
- package/dist/generic/GenericSharedTree.js +0 -447
- package/dist/generic/GenericSharedTree.js.map +0 -1
- package/dist/generic/GenericTransaction.d.ts +0 -87
- package/dist/generic/GenericTransaction.d.ts.map +0 -1
- package/dist/generic/GenericTransaction.js +0 -144
- package/dist/generic/GenericTransaction.js.map +0 -1
- package/dist/generic/PersistedTypes.d.ts +0 -194
- package/dist/generic/PersistedTypes.d.ts.map +0 -1
- package/dist/generic/PersistedTypes.js +0 -42
- package/dist/generic/PersistedTypes.js.map +0 -1
- package/dist/generic/Summary.d.ts +0 -63
- package/dist/generic/Summary.d.ts.map +0 -1
- package/dist/generic/Summary.js +0 -64
- package/dist/generic/Summary.js.map +0 -1
- package/dist/generic/index.d.ts +0 -10
- package/dist/generic/index.d.ts.map +0 -1
- package/dist/generic/index.js +0 -26
- package/dist/generic/index.js.map +0 -1
- package/lib/BasicCheckout.d.ts +0 -23
- package/lib/BasicCheckout.d.ts.map +0 -1
- package/lib/BasicCheckout.js.map +0 -1
- package/lib/Snapshot.d.ts +0 -198
- package/lib/Snapshot.d.ts.map +0 -1
- package/lib/Snapshot.js +0 -263
- package/lib/Snapshot.js.map +0 -1
- package/lib/SnapshotUtilities.d.ts +0 -29
- package/lib/SnapshotUtilities.d.ts.map +0 -1
- package/lib/SnapshotUtilities.js +0 -67
- package/lib/SnapshotUtilities.js.map +0 -1
- package/lib/anchored-edits/AnchorResolution.d.ts +0 -144
- package/lib/anchored-edits/AnchorResolution.d.ts.map +0 -1
- package/lib/anchored-edits/AnchorResolution.js +0 -152
- package/lib/anchored-edits/AnchorResolution.js.map +0 -1
- package/lib/anchored-edits/Factory.d.ts +0 -56
- package/lib/anchored-edits/Factory.d.ts.map +0 -1
- package/lib/anchored-edits/Factory.js +0 -74
- package/lib/anchored-edits/Factory.js.map +0 -1
- package/lib/anchored-edits/PersistedTypes.d.ts +0 -245
- package/lib/anchored-edits/PersistedTypes.d.ts.map +0 -1
- package/lib/anchored-edits/PersistedTypes.js +0 -128
- package/lib/anchored-edits/PersistedTypes.js.map +0 -1
- package/lib/anchored-edits/SharedTreeWithAnchors.d.ts +0 -120
- package/lib/anchored-edits/SharedTreeWithAnchors.d.ts.map +0 -1
- package/lib/anchored-edits/SharedTreeWithAnchors.js +0 -110
- package/lib/anchored-edits/SharedTreeWithAnchors.js.map +0 -1
- package/lib/anchored-edits/TransactionWithAnchors.d.ts +0 -28
- package/lib/anchored-edits/TransactionWithAnchors.d.ts.map +0 -1
- package/lib/anchored-edits/TransactionWithAnchors.js +0 -32
- package/lib/anchored-edits/TransactionWithAnchors.js.map +0 -1
- package/lib/anchored-edits/index.d.ts +0 -10
- package/lib/anchored-edits/index.d.ts.map +0 -1
- package/lib/anchored-edits/index.js +0 -11
- package/lib/anchored-edits/index.js.map +0 -1
- package/lib/default-edits/EditUtilities.d.ts +0 -57
- package/lib/default-edits/EditUtilities.d.ts.map +0 -1
- package/lib/default-edits/EditUtilities.js +0 -181
- package/lib/default-edits/EditUtilities.js.map +0 -1
- package/lib/default-edits/Factory.d.ts +0 -56
- package/lib/default-edits/Factory.d.ts.map +0 -1
- package/lib/default-edits/Factory.js +0 -74
- package/lib/default-edits/Factory.js.map +0 -1
- package/lib/default-edits/HistoryEditFactory.d.ts +0 -19
- package/lib/default-edits/HistoryEditFactory.d.ts.map +0 -1
- package/lib/default-edits/HistoryEditFactory.js.map +0 -1
- package/lib/default-edits/PersistedTypes.d.ts.map +0 -1
- package/lib/default-edits/PersistedTypes.js.map +0 -1
- package/lib/default-edits/SharedTree.d.ts +0 -111
- package/lib/default-edits/SharedTree.d.ts.map +0 -1
- package/lib/default-edits/SharedTree.js +0 -100
- package/lib/default-edits/SharedTree.js.map +0 -1
- package/lib/default-edits/Summary.d.ts +0 -15
- package/lib/default-edits/Summary.d.ts.map +0 -1
- package/lib/default-edits/Summary.js +0 -31
- package/lib/default-edits/Summary.js.map +0 -1
- package/lib/default-edits/Transaction.d.ts +0 -41
- package/lib/default-edits/Transaction.d.ts.map +0 -1
- package/lib/default-edits/Transaction.js +0 -221
- package/lib/default-edits/Transaction.js.map +0 -1
- package/lib/default-edits/UndoRedoHandler.d.ts.map +0 -1
- package/lib/default-edits/UndoRedoHandler.js.map +0 -1
- package/lib/default-edits/index.d.ts +0 -13
- package/lib/default-edits/index.d.ts.map +0 -1
- package/lib/default-edits/index.js +0 -14
- package/lib/default-edits/index.js.map +0 -1
- package/lib/generic/GenericEditUtilities.d.ts +0 -26
- package/lib/generic/GenericEditUtilities.d.ts.map +0 -1
- package/lib/generic/GenericEditUtilities.js +0 -38
- package/lib/generic/GenericEditUtilities.js.map +0 -1
- package/lib/generic/GenericSharedTree.d.ts +0 -221
- package/lib/generic/GenericSharedTree.d.ts.map +0 -1
- package/lib/generic/GenericSharedTree.js +0 -443
- package/lib/generic/GenericSharedTree.js.map +0 -1
- package/lib/generic/GenericTransaction.d.ts +0 -87
- package/lib/generic/GenericTransaction.d.ts.map +0 -1
- package/lib/generic/GenericTransaction.js +0 -140
- package/lib/generic/GenericTransaction.js.map +0 -1
- package/lib/generic/PersistedTypes.d.ts +0 -194
- package/lib/generic/PersistedTypes.d.ts.map +0 -1
- package/lib/generic/PersistedTypes.js +0 -39
- package/lib/generic/PersistedTypes.js.map +0 -1
- package/lib/generic/Summary.d.ts +0 -63
- package/lib/generic/Summary.d.ts.map +0 -1
- package/lib/generic/Summary.js +0 -58
- package/lib/generic/Summary.js.map +0 -1
- package/lib/generic/index.d.ts +0 -10
- package/lib/generic/index.d.ts.map +0 -1
- package/lib/generic/index.js +0 -11
- package/lib/generic/index.js.map +0 -1
- package/lib/test/Anchors.glassBox.tests.d.ts.map +0 -1
- package/lib/test/Anchors.glassBox.tests.js +0 -410
- package/lib/test/Anchors.glassBox.tests.js.map +0 -1
- package/lib/test/BasicCheckout.tests.d.ts.map +0 -1
- package/lib/test/BasicCheckout.tests.js +0 -8
- package/lib/test/BasicCheckout.tests.js.map +0 -1
- package/lib/test/GenericTransactionWithAnchors.tests.d.ts.map +0 -1
- package/lib/test/GenericTransactionWithAnchors.tests.js +0 -25
- package/lib/test/GenericTransactionWithAnchors.tests.js.map +0 -1
- package/lib/test/SharedTreeWithAnchors.tests.d.ts.map +0 -1
- package/lib/test/SharedTreeWithAnchors.tests.js +0 -420
- package/lib/test/SharedTreeWithAnchors.tests.js.map +0 -1
- package/lib/test/Snapshot.tests.d.ts.map +0 -1
- package/lib/test/Snapshot.tests.js +0 -96
- package/lib/test/Snapshot.tests.js.map +0 -1
- package/lib/test/SnapshotUtilities.tests.d.ts.map +0 -1
- package/lib/test/SnapshotUtilities.tests.js +0 -168
- package/lib/test/SnapshotUtilities.tests.js.map +0 -1
- package/lib/test/undoRedoStackManager.d.ts +0 -26
- package/lib/test/undoRedoStackManager.d.ts.map +0 -1
- package/lib/test/undoRedoStackManager.js +0 -176
- package/lib/test/undoRedoStackManager.js.map +0 -1
- package/lib/test/utilities/SummaryFormatCompatibilityTests.d.ts +0 -13
- package/lib/test/utilities/SummaryFormatCompatibilityTests.d.ts.map +0 -1
- package/lib/test/utilities/SummaryFormatCompatibilityTests.js +0 -154
- package/lib/test/utilities/SummaryFormatCompatibilityTests.js.map +0 -1
- package/src/BasicCheckout.ts +0 -34
- package/src/Snapshot.ts +0 -363
- package/src/SnapshotUtilities.ts +0 -88
- package/src/anchored-edits/AnchorResolution.ts +0 -442
- package/src/anchored-edits/Factory.ts +0 -94
- package/src/anchored-edits/PersistedTypes.ts +0 -310
- package/src/anchored-edits/SharedTreeWithAnchors.ts +0 -200
- package/src/anchored-edits/TransactionWithAnchors.ts +0 -39
- package/src/anchored-edits/index.ts +0 -21
- package/src/default-edits/EditUtilities.ts +0 -220
- package/src/default-edits/Factory.ts +0 -94
- package/src/default-edits/SharedTree.ts +0 -174
- package/src/default-edits/Summary.ts +0 -44
- package/src/default-edits/Transaction.ts +0 -262
- package/src/default-edits/index.ts +0 -29
- package/src/generic/GenericEditUtilities.ts +0 -46
- package/src/generic/GenericSharedTree.ts +0 -593
- package/src/generic/GenericTransaction.ts +0 -194
- package/src/generic/PersistedTypes.ts +0 -221
- package/src/generic/Summary.ts +0 -113
- package/src/generic/index.ts +0 -41
|
@@ -2,15 +2,34 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Result } from '../../Common';
|
|
6
|
+
import { ChangeInternal, EditStatus } from '../../persisted-types';
|
|
7
|
+
import { RevisionView } from '../../RevisionView';
|
|
8
|
+
import { ChangeResult, GenericTransaction, GenericTransactionPolicy } from '../../TransactionInternal';
|
|
7
9
|
/**
|
|
8
|
-
* A mock implementation of `GenericTransaction` for use in tests.
|
|
9
10
|
* @internal
|
|
10
11
|
*/
|
|
11
|
-
export declare
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
export declare namespace MockTransaction {
|
|
13
|
+
interface Options {
|
|
14
|
+
statusOnClose: EditStatus;
|
|
15
|
+
}
|
|
16
|
+
const defaultOptions: Options;
|
|
17
|
+
/**
|
|
18
|
+
* Makes a new {@link GenericTransaction} that follows the {@link MockTransaction.Policy} policy.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
function factory(view: RevisionView, options?: Options): GenericTransaction;
|
|
23
|
+
/**
|
|
24
|
+
* A mock implementation of `GenericTransaction` for use in tests.
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
class Policy implements GenericTransactionPolicy {
|
|
28
|
+
options: Options;
|
|
29
|
+
constructor(options: Options);
|
|
30
|
+
tryResolveChange(_state: any, change: ChangeInternal): Result.Ok<ChangeInternal>;
|
|
31
|
+
validateOnClose(state: any): ChangeResult;
|
|
32
|
+
dispatchChange(state: any): ChangeResult;
|
|
33
|
+
}
|
|
15
34
|
}
|
|
16
35
|
//# sourceMappingURL=MockTransaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockTransaction.d.ts","sourceRoot":"","sources":["../../../src/test/utilities/MockTransaction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"MockTransaction.d.ts","sourceRoot":"","sources":["../../../src/test/utilities/MockTransaction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,EAExB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,yBAAiB,eAAe,CAAC;IAChC,UAAiB,OAAO;QACvB,aAAa,EAAE,UAAU,CAAC;KAC1B;IAEM,MAAM,cAAc,EAAE,OAE5B,CAAC;IAEF;;;;OAIG;IACH,SAAgB,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,GAAE,OAAwB,GAAG,kBAAkB,CAEjG;IAED;;;OAGG;IACH,MAAa,MAAO,YAAW,wBAAwB;QAC/C,OAAO,EAAE,OAAO,CAAC;oBAEL,OAAO,EAAE,OAAO;QAI5B,gBAAgB,CAAC,MAAM,KAAA,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC,cAAc,CAAC;QAI3E,eAAe,CAAC,KAAK,KAAA,GAAG,YAAY;QASpC,cAAc,CAAC,KAAK,KAAA,GAAG,YAAY;KAG1C;CACD"}
|
|
@@ -2,20 +2,49 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { Result } from '../../Common';
|
|
6
|
+
import { EditStatus } from '../../persisted-types';
|
|
7
|
+
import { GenericTransaction, } from '../../TransactionInternal';
|
|
6
8
|
/**
|
|
7
|
-
* A mock implementation of `GenericTransaction` for use in tests.
|
|
8
9
|
* @internal
|
|
9
10
|
*/
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
export var MockTransaction;
|
|
12
|
+
(function (MockTransaction) {
|
|
13
|
+
MockTransaction.defaultOptions = {
|
|
14
|
+
statusOnClose: EditStatus.Applied,
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Makes a new {@link GenericTransaction} that follows the {@link MockTransaction.Policy} policy.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
function factory(view, options = MockTransaction.defaultOptions) {
|
|
22
|
+
return new GenericTransaction(view, new Policy(options));
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
|
|
24
|
+
MockTransaction.factory = factory;
|
|
25
|
+
/**
|
|
26
|
+
* A mock implementation of `GenericTransaction` for use in tests.
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
class Policy {
|
|
30
|
+
constructor(options) {
|
|
31
|
+
this.options = options;
|
|
32
|
+
}
|
|
33
|
+
tryResolveChange(_state, change) {
|
|
34
|
+
return Result.ok(change);
|
|
35
|
+
}
|
|
36
|
+
validateOnClose(state) {
|
|
37
|
+
return this.options.statusOnClose === EditStatus.Applied
|
|
38
|
+
? Result.ok(state.view)
|
|
39
|
+
: Result.error({
|
|
40
|
+
status: this.options.statusOnClose,
|
|
41
|
+
failure: undefined,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
dispatchChange(state) {
|
|
45
|
+
return Result.ok(state.view);
|
|
46
|
+
}
|
|
16
47
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
}
|
|
48
|
+
MockTransaction.Policy = Policy;
|
|
49
|
+
})(MockTransaction || (MockTransaction = {}));
|
|
21
50
|
//# sourceMappingURL=MockTransaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockTransaction.js","sourceRoot":"","sources":["../../../src/test/utilities/MockTransaction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"MockTransaction.js","sourceRoot":"","sources":["../../../src/test/utilities/MockTransaction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cA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nimport { Result } from '../../Common';\nimport { ChangeInternal, EditStatus } from '../../persisted-types';\nimport { RevisionView } from '../../RevisionView';\nimport {\n\tChangeResult,\n\tGenericTransaction,\n\tGenericTransactionPolicy,\n\tTransactionInternal,\n} from '../../TransactionInternal';\n\n/**\n * @internal\n */\nexport namespace MockTransaction {\n\texport interface Options {\n\t\tstatusOnClose: EditStatus;\n\t}\n\n\texport const defaultOptions: Options = {\n\t\tstatusOnClose: EditStatus.Applied,\n\t};\n\n\t/**\n\t * Makes a new {@link GenericTransaction} that follows the {@link MockTransaction.Policy} policy.\n\t *\n\t * @internal\n\t */\n\texport function factory(view: RevisionView, options: Options = defaultOptions): GenericTransaction {\n\t\treturn new GenericTransaction(view, new Policy(options));\n\t}\n\n\t/**\n\t * A mock implementation of `GenericTransaction` for use in tests.\n\t * @internal\n\t */\n\texport class Policy implements GenericTransactionPolicy {\n\t\tpublic options: Options;\n\n\t\tpublic constructor(options: Options) {\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tpublic tryResolveChange(_state, change: ChangeInternal): Result.Ok<ChangeInternal> {\n\t\t\treturn Result.ok(change);\n\t\t}\n\n\t\tpublic validateOnClose(state): ChangeResult {\n\t\t\treturn this.options.statusOnClose === EditStatus.Applied\n\t\t\t\t? Result.ok(state.view)\n\t\t\t\t: Result.error({\n\t\t\t\t\t\tstatus: this.options.statusOnClose,\n\t\t\t\t\t\tfailure: undefined as unknown as TransactionInternal.Failure,\n\t\t\t\t });\n\t\t}\n\n\t\tpublic dispatchChange(state): ChangeResult {\n\t\t\treturn Result.ok(state.view);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { LocalServerSharedTreeTestingComponents, LocalServerSharedTreeTestingOptions } from './TestUtilities';
|
|
6
|
+
/**
|
|
7
|
+
* Runs a test suite for SharedTree's ability to apply pending local state stashed by the host.
|
|
8
|
+
* See documentation on `applyStashedOp`.
|
|
9
|
+
* This suite can be used to test other implementations that aim to fulfill `SharedTree`'s contract.
|
|
10
|
+
*/
|
|
11
|
+
export declare function runPendingLocalStateTests(title: string, setUpLocalServerTestSharedTree: (options: LocalServerSharedTreeTestingOptions) => Promise<LocalServerSharedTreeTestingComponents>): void;
|
|
12
|
+
//# sourceMappingURL=PendingLocalStateTests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PendingLocalStateTests.d.ts","sourceRoot":"","sources":["../../../src/test/utilities/PendingLocalStateTests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EACN,sCAAsC,EACtC,mCAAmC,EAGnC,MAAM,iBAAiB,CAAC;AAezB;;;;GAIG;AACH,wBAAgB,yBAAyB,CACxC,KAAK,EAAE,MAAM,EACb,8BAA8B,EAAE,CAC/B,OAAO,EAAE,mCAAmC,KACxC,OAAO,CAAC,sCAAsC,CAAC,QAqHpD"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { expect } from 'chai';
|
|
6
|
+
import { requestFluidObject } from '@fluidframework/runtime-utils';
|
|
7
|
+
import { fail } from '../../Common';
|
|
8
|
+
import { WriteFormat } from '../../persisted-types';
|
|
9
|
+
import { Change, StablePlace } from '../../ChangeTypes';
|
|
10
|
+
import { setUpTestTree, stabilizeEdit, } from './TestUtilities';
|
|
11
|
+
async function withContainerOffline(provider, container, action) {
|
|
12
|
+
await provider.ensureSynchronized();
|
|
13
|
+
await provider.opProcessingController.pauseProcessing(container);
|
|
14
|
+
const actionReturn = action();
|
|
15
|
+
const pendingLocalState = container.closeAndGetPendingLocalState();
|
|
16
|
+
provider.opProcessingController.resumeProcessing(container);
|
|
17
|
+
return { actionReturn, pendingLocalState };
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Runs a test suite for SharedTree's ability to apply pending local state stashed by the host.
|
|
21
|
+
* See documentation on `applyStashedOp`.
|
|
22
|
+
* This suite can be used to test other implementations that aim to fulfill `SharedTree`'s contract.
|
|
23
|
+
*/
|
|
24
|
+
export function runPendingLocalStateTests(title, setUpLocalServerTestSharedTree) {
|
|
25
|
+
describe(title, () => {
|
|
26
|
+
const documentId = 'documentId';
|
|
27
|
+
[WriteFormat.v0_0_2 /* TODO: Enable when stashed ops are supported: WriteFormat.v0_1_1 */].forEach((writeFormat) => {
|
|
28
|
+
it(`is applied to all connected containers (v${writeFormat})`, async () => {
|
|
29
|
+
var _a, _b, _c;
|
|
30
|
+
const { container, tree, testObjectProvider } = await setUpLocalServerTestSharedTree({
|
|
31
|
+
id: documentId,
|
|
32
|
+
writeFormat,
|
|
33
|
+
});
|
|
34
|
+
const testTree = setUpTestTree(tree);
|
|
35
|
+
const { tree: tree2 } = await setUpLocalServerTestSharedTree({
|
|
36
|
+
id: documentId,
|
|
37
|
+
testObjectProvider,
|
|
38
|
+
writeFormat,
|
|
39
|
+
});
|
|
40
|
+
const url = (_a = (await container.getAbsoluteUrl('/'))) !== null && _a !== void 0 ? _a : fail('Container unable to resolve "/".');
|
|
41
|
+
await testObjectProvider.ensureSynchronized();
|
|
42
|
+
const initialEditLogLength = tree.edits.length;
|
|
43
|
+
const { pendingLocalState, actionReturn: edit } = await withContainerOffline(testObjectProvider, container, () => tree.applyEdit(...Change.insertTree(testTree.buildLeaf(), StablePlace.after(testTree.left))));
|
|
44
|
+
await testObjectProvider.ensureSynchronized();
|
|
45
|
+
const leftTraitAfterOfflineClose = tree2.currentView.getTrait(testTree.left.traitLocation.translate(tree2));
|
|
46
|
+
const loader = testObjectProvider.makeTestLoader();
|
|
47
|
+
// Simulate reconnect of user 1; a new container will be created which passes the stashed local state in its
|
|
48
|
+
// load request.
|
|
49
|
+
const container3 = await loader.resolve({ url }, pendingLocalState);
|
|
50
|
+
const dataObject3 = await requestFluidObject(container3, '/');
|
|
51
|
+
const tree3 = await dataObject3.getSharedObject(documentId);
|
|
52
|
+
expect(tree3.editsInternal.isLocalEdit(edit.id)).to.be.true; // Kludge
|
|
53
|
+
await testObjectProvider.ensureSynchronized();
|
|
54
|
+
expect(leftTraitAfterOfflineClose.length).to.equal(1, 'Second tree should not receive edits made by first tree after it went offline.');
|
|
55
|
+
expect(tree3.currentView.getTrait(testTree.left.traitLocation.translate(tree3)).length).to.equal(2, 'Tree which loaded with stashed pending edits should apply them.');
|
|
56
|
+
expect(tree2.currentView.getTrait(testTree.left.traitLocation.translate(tree2)).length).to.equal(2, 'Tree collaborating with a client that applies stashed pending edits should see them.');
|
|
57
|
+
const stableEdit = stabilizeEdit(tree, edit);
|
|
58
|
+
expect(stabilizeEdit(tree2, (_b = (await tree2.editsInternal.tryGetEdit(edit.id))) !== null && _b !== void 0 ? _b : fail())).to.deep.equal(stableEdit);
|
|
59
|
+
expect(stabilizeEdit(tree3, (_c = (await tree3.editsInternal.tryGetEdit(edit.id))) !== null && _c !== void 0 ? _c : fail())).to.deep.equal(stableEdit);
|
|
60
|
+
expect(tree2.edits.length).to.equal(initialEditLogLength + 1);
|
|
61
|
+
expect(tree3.edits.length).to.equal(initialEditLogLength + 1);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
it('Deals with stashed handle ops gracefully', async () => {
|
|
65
|
+
var _a;
|
|
66
|
+
// Setup
|
|
67
|
+
const { container, tree, testObjectProvider } = await setUpLocalServerTestSharedTree({
|
|
68
|
+
id: documentId,
|
|
69
|
+
writeFormat: WriteFormat.v0_1_1,
|
|
70
|
+
});
|
|
71
|
+
const testTree = setUpTestTree(tree);
|
|
72
|
+
await setUpLocalServerTestSharedTree({
|
|
73
|
+
id: documentId,
|
|
74
|
+
testObjectProvider,
|
|
75
|
+
writeFormat: WriteFormat.v0_1_1,
|
|
76
|
+
});
|
|
77
|
+
const url = (_a = (await container.getAbsoluteUrl('/'))) !== null && _a !== void 0 ? _a : fail('Container unable to resolve "/".');
|
|
78
|
+
await testObjectProvider.ensureSynchronized();
|
|
79
|
+
await testObjectProvider.opProcessingController.pauseProcessing();
|
|
80
|
+
// Generate enough edits to cause a chunk upload.
|
|
81
|
+
for (let i = 0; i < tree.edits.editsPerChunk; i++) {
|
|
82
|
+
tree.applyEdit(...Change.insertTree(testTree.buildLeaf(), StablePlace.atEndOf(testTree.left.traitLocation)));
|
|
83
|
+
}
|
|
84
|
+
// Process all of those messages, sequencing them but without informing the container that they have been sequenced.
|
|
85
|
+
await testObjectProvider.opProcessingController.processOutgoing(container);
|
|
86
|
+
// Inform the container that all of the edits it generated above have been sequenced, thereby filling an edit chunk
|
|
87
|
+
// whose responsibility to upload is on the container.
|
|
88
|
+
await testObjectProvider.opProcessingController.processIncoming(container);
|
|
89
|
+
// Process outgoing/incoming once more to handle the blob attach op.
|
|
90
|
+
await testObjectProvider.opProcessingController.processOutgoing(container);
|
|
91
|
+
await testObjectProvider.opProcessingController.processIncoming(container);
|
|
92
|
+
const pendingLocalState = container.closeAndGetPendingLocalState();
|
|
93
|
+
const loader = testObjectProvider.makeTestLoader();
|
|
94
|
+
const container2 = await loader.resolve({ url }, pendingLocalState);
|
|
95
|
+
const dataObject2 = await requestFluidObject(container2, '/');
|
|
96
|
+
const tree2 = await dataObject2.getSharedObject(documentId);
|
|
97
|
+
await testObjectProvider.ensureSynchronized();
|
|
98
|
+
const editLog = tree2.edits;
|
|
99
|
+
const unuploadedEditChunks = Array.from(editLog.getEditChunksReadyForUpload());
|
|
100
|
+
expect(unuploadedEditChunks.length).to.equal(0);
|
|
101
|
+
expect(editLog.getEditLogSummary().editChunks.length).to.equal(2);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=PendingLocalStateTests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PendingLocalStateTests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ensed under the MIT License.\n */\n\nimport { expect } from 'chai';\nimport { IContainer } from '@fluidframework/container-definitions';\nimport { requestFluidObject } from '@fluidframework/runtime-utils';\nimport { ITestFluidObject, ITestObjectProvider } from '@fluidframework/test-utils';\nimport { fail } from '../../Common';\nimport { ChangeInternal, Edit, WriteFormat } from '../../persisted-types';\nimport type { EditLog } from '../../EditLog';\nimport { SharedTree } from '../../SharedTree';\nimport { Change, StablePlace } from '../../ChangeTypes';\nimport {\n\tLocalServerSharedTreeTestingComponents,\n\tLocalServerSharedTreeTestingOptions,\n\tsetUpTestTree,\n\tstabilizeEdit,\n} from './TestUtilities';\n\nasync function withContainerOffline<TReturn>(\n\tprovider: ITestObjectProvider,\n\tcontainer: IContainer,\n\taction: () => TReturn\n): Promise<{ actionReturn: TReturn; pendingLocalState: string }> {\n\tawait provider.ensureSynchronized();\n\tawait provider.opProcessingController.pauseProcessing(container);\n\tconst actionReturn = action();\n\tconst pendingLocalState = container.closeAndGetPendingLocalState();\n\tprovider.opProcessingController.resumeProcessing(container);\n\treturn { actionReturn, pendingLocalState };\n}\n\n/**\n * Runs a test suite for SharedTree's ability to apply pending local state stashed by the host.\n * See documentation on `applyStashedOp`.\n * This suite can be used to test other implementations that aim to fulfill `SharedTree`'s contract.\n */\nexport function runPendingLocalStateTests(\n\ttitle: string,\n\tsetUpLocalServerTestSharedTree: (\n\t\toptions: LocalServerSharedTreeTestingOptions\n\t) => Promise<LocalServerSharedTreeTestingComponents>\n) {\n\tdescribe(title, () => {\n\t\tconst documentId = 'documentId';\n\n\t\t[WriteFormat.v0_0_2 /* TODO: Enable when stashed ops are supported: WriteFormat.v0_1_1 */].forEach(\n\t\t\t(writeFormat) => {\n\t\t\t\tit(`is applied to all connected containers (v${writeFormat})`, async () => {\n\t\t\t\t\tconst { container, tree, testObjectProvider } = await setUpLocalServerTestSharedTree({\n\t\t\t\t\t\tid: documentId,\n\t\t\t\t\t\twriteFormat,\n\t\t\t\t\t});\n\t\t\t\t\tconst testTree = setUpTestTree(tree);\n\t\t\t\t\tconst { tree: tree2 } = await setUpLocalServerTestSharedTree({\n\t\t\t\t\t\tid: documentId,\n\t\t\t\t\t\ttestObjectProvider,\n\t\t\t\t\t\twriteFormat,\n\t\t\t\t\t});\n\t\t\t\t\tconst url = (await container.getAbsoluteUrl('/')) ?? fail('Container unable to resolve \"/\".');\n\t\t\t\t\tawait testObjectProvider.ensureSynchronized();\n\t\t\t\t\tconst initialEditLogLength = tree.edits.length;\n\n\t\t\t\t\tconst { pendingLocalState, actionReturn: edit } = await withContainerOffline(\n\t\t\t\t\t\ttestObjectProvider,\n\t\t\t\t\t\tcontainer,\n\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\ttree.applyEdit(\n\t\t\t\t\t\t\t\t...Change.insertTree(testTree.buildLeaf(), StablePlace.after(testTree.left))\n\t\t\t\t\t\t\t) as Edit<ChangeInternal>\n\t\t\t\t\t);\n\t\t\t\t\tawait testObjectProvider.ensureSynchronized();\n\t\t\t\t\tconst leftTraitAfterOfflineClose = tree2.currentView.getTrait(\n\t\t\t\t\t\ttestTree.left.traitLocation.translate(tree2)\n\t\t\t\t\t);\n\t\t\t\t\tconst loader = testObjectProvider.makeTestLoader();\n\n\t\t\t\t\t// Simulate reconnect of user 1; a new container will be created which passes the stashed local state in its\n\t\t\t\t\t// load request.\n\t\t\t\t\tconst container3 = await loader.resolve({ url }, pendingLocalState);\n\t\t\t\t\tconst dataObject3 = await requestFluidObject<ITestFluidObject>(container3, '/');\n\t\t\t\t\tconst tree3 = await dataObject3.getSharedObject<SharedTree>(documentId);\n\t\t\t\t\texpect((tree3.editsInternal as EditLog<ChangeInternal>).isLocalEdit(edit.id)).to.be.true; // Kludge\n\n\t\t\t\t\tawait testObjectProvider.ensureSynchronized();\n\n\t\t\t\t\texpect(leftTraitAfterOfflineClose.length).to.equal(\n\t\t\t\t\t\t1,\n\t\t\t\t\t\t'Second tree should not receive edits made by first tree after it went offline.'\n\t\t\t\t\t);\n\t\t\t\t\texpect(tree3.currentView.getTrait(testTree.left.traitLocation.translate(tree3)).length).to.equal(\n\t\t\t\t\t\t2,\n\t\t\t\t\t\t'Tree which loaded with stashed pending edits should apply them.'\n\t\t\t\t\t);\n\t\t\t\t\texpect(tree2.currentView.getTrait(testTree.left.traitLocation.translate(tree2)).length).to.equal(\n\t\t\t\t\t\t2,\n\t\t\t\t\t\t'Tree collaborating with a client that applies stashed pending edits should see them.'\n\t\t\t\t\t);\n\n\t\t\t\t\tconst stableEdit = stabilizeEdit(tree, edit);\n\t\t\t\t\texpect(\n\t\t\t\t\t\tstabilizeEdit(tree2, (await tree2.editsInternal.tryGetEdit(edit.id)) ?? fail())\n\t\t\t\t\t).to.deep.equal(stableEdit);\n\t\t\t\t\texpect(\n\t\t\t\t\t\tstabilizeEdit(tree3, (await tree3.editsInternal.tryGetEdit(edit.id)) ?? fail())\n\t\t\t\t\t).to.deep.equal(stableEdit);\n\t\t\t\t\texpect(tree2.edits.length).to.equal(initialEditLogLength + 1);\n\t\t\t\t\texpect(tree3.edits.length).to.equal(initialEditLogLength + 1);\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\n\t\tit('Deals with stashed handle ops gracefully', async () => {\n\t\t\t// Setup\n\t\t\tconst { container, tree, testObjectProvider } = await setUpLocalServerTestSharedTree({\n\t\t\t\tid: documentId,\n\t\t\t\twriteFormat: WriteFormat.v0_1_1,\n\t\t\t});\n\t\t\tconst testTree = setUpTestTree(tree);\n\t\t\tawait setUpLocalServerTestSharedTree({\n\t\t\t\tid: documentId,\n\t\t\t\ttestObjectProvider,\n\t\t\t\twriteFormat: WriteFormat.v0_1_1,\n\t\t\t});\n\n\t\t\tconst url = (await container.getAbsoluteUrl('/')) ?? fail('Container unable to resolve \"/\".');\n\n\t\t\tawait testObjectProvider.ensureSynchronized();\n\t\t\tawait testObjectProvider.opProcessingController.pauseProcessing();\n\t\t\t// Generate enough edits to cause a chunk upload.\n\t\t\tfor (let i = 0; i < (tree.edits as EditLog).editsPerChunk; i++) {\n\t\t\t\ttree.applyEdit(\n\t\t\t\t\t...Change.insertTree(testTree.buildLeaf(), StablePlace.atEndOf(testTree.left.traitLocation))\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Process all of those messages, sequencing them but without informing the container that they have been sequenced.\n\t\t\tawait testObjectProvider.opProcessingController.processOutgoing(container);\n\t\t\t// Inform the container that all of the edits it generated above have been sequenced, thereby filling an edit chunk\n\t\t\t// whose responsibility to upload is on the container.\n\t\t\tawait testObjectProvider.opProcessingController.processIncoming(container);\n\t\t\t// Process outgoing/incoming once more to handle the blob attach op.\n\t\t\tawait testObjectProvider.opProcessingController.processOutgoing(container);\n\t\t\tawait testObjectProvider.opProcessingController.processIncoming(container);\n\n\t\t\tconst pendingLocalState = container.closeAndGetPendingLocalState();\n\t\t\tconst loader = testObjectProvider.makeTestLoader();\n\n\t\t\tconst container2 = await loader.resolve({ url }, pendingLocalState);\n\t\t\tconst dataObject2 = await requestFluidObject<ITestFluidObject>(container2, '/');\n\t\t\tconst tree2 = await dataObject2.getSharedObject<SharedTree>(documentId);\n\t\t\tawait testObjectProvider.ensureSynchronized();\n\n\t\t\tconst editLog = tree2.edits as EditLog;\n\t\t\tconst unuploadedEditChunks = Array.from(editLog.getEditChunksReadyForUpload());\n\t\t\texpect(unuploadedEditChunks.length).to.equal(0);\n\t\t\texpect(editLog.getEditLogSummary().editChunks.length).to.equal(2);\n\t\t});\n\t});\n}\n"]}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import { SharedTreeWithAnchors } from '../../anchored-edits';
|
|
5
|
+
import { WriteFormat } from '../../persisted-types';
|
|
7
6
|
import { SharedTreeTestingComponents, SharedTreeTestingOptions } from './TestUtilities';
|
|
8
7
|
/**
|
|
9
|
-
* Runs a test suite for operations on `SharedTree`.
|
|
8
|
+
* Runs a test suite for operations on `SharedTree` writing ops at `writeFormat`.
|
|
10
9
|
* This suite can be used to test other implementations that aim to fulfill `SharedTree`'s contract.
|
|
11
10
|
*/
|
|
12
|
-
export declare function runSharedTreeOperationsTests
|
|
11
|
+
export declare function runSharedTreeOperationsTests(title: string, writeFormat: WriteFormat, setUpTestSharedTreeWithDefaultVersion: (options?: SharedTreeTestingOptions) => SharedTreeTestingComponents): void;
|
|
13
12
|
//# sourceMappingURL=SharedTreeTests.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SharedTreeTests.d.ts","sourceRoot":"","sources":["../../../src/test/utilities/SharedTreeTests.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"SharedTreeTests.d.ts","sourceRoot":"","sources":["../../../src/test/utilities/SharedTreeTests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH,OAAO,EAeN,WAAW,EACX,MAAM,uBAAuB,CAAC;AAY/B,OAAO,EAGN,2BAA2B,EAC3B,wBAAwB,EAaxB,MAAM,iBAAiB,CAAC;AAazB;;;GAGG;AACH,wBAAgB,4BAA4B,CAC3C,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,WAAW,EACxB,qCAAqC,EAAE,CAAC,OAAO,CAAC,EAAE,wBAAwB,KAAK,2BAA2B,QAk2C1G"}
|