@fluid-experimental/tree 2.0.0-rc.2.0.1 → 2.0.0-rc.3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/api-report/experimental-tree.api.md +2 -2
- package/dist/ChangeCompression.d.ts +2 -2
- package/dist/ChangeCompression.d.ts.map +1 -1
- package/dist/ChangeCompression.js +1 -1
- package/dist/ChangeCompression.js.map +1 -1
- package/dist/ChangeTypes.d.ts +1 -1
- package/dist/ChangeTypes.d.ts.map +1 -1
- package/dist/ChangeTypes.js +4 -4
- package/dist/ChangeTypes.js.map +1 -1
- package/dist/Checkout.d.ts +3 -3
- package/dist/Checkout.d.ts.map +1 -1
- package/dist/Checkout.js +17 -17
- package/dist/Checkout.js.map +1 -1
- package/dist/EditLog.d.ts +1 -1
- package/dist/EditLog.d.ts.map +1 -1
- package/dist/EditLog.js +9 -9
- package/dist/EditLog.js.map +1 -1
- package/dist/EditUtilities.d.ts +3 -3
- package/dist/EditUtilities.d.ts.map +1 -1
- package/dist/EditUtilities.js +6 -6
- package/dist/EditUtilities.js.map +1 -1
- package/dist/Forest.d.ts.map +1 -1
- package/dist/Forest.js +23 -23
- package/dist/Forest.js.map +1 -1
- package/dist/HistoryEditFactory.d.ts +1 -1
- package/dist/HistoryEditFactory.d.ts.map +1 -1
- package/dist/HistoryEditFactory.js +7 -7
- package/dist/HistoryEditFactory.js.map +1 -1
- package/dist/IdConversion.d.ts.map +1 -1
- package/dist/IdConversion.js.map +1 -1
- package/dist/LogViewer.d.ts +2 -2
- package/dist/LogViewer.d.ts.map +1 -1
- package/dist/LogViewer.js +7 -7
- package/dist/LogViewer.js.map +1 -1
- package/dist/MergeHealth.d.ts.map +1 -1
- package/dist/MergeHealth.js +1 -1
- package/dist/MergeHealth.js.map +1 -1
- package/dist/NodeIdUtilities.d.ts +1 -1
- package/dist/NodeIdUtilities.d.ts.map +1 -1
- package/dist/NodeIdUtilities.js +1 -1
- package/dist/NodeIdUtilities.js.map +1 -1
- package/dist/PayloadUtilities.d.ts.map +1 -1
- package/dist/PayloadUtilities.js +2 -2
- package/dist/PayloadUtilities.js.map +1 -1
- package/dist/ReconciliationPath.d.ts +1 -1
- package/dist/ReconciliationPath.d.ts.map +1 -1
- package/dist/ReconciliationPath.js.map +1 -1
- package/dist/RevisionValueCache.d.ts.map +1 -1
- package/dist/RevisionValueCache.js +2 -2
- package/dist/RevisionValueCache.js.map +1 -1
- package/dist/RevisionView.d.ts +2 -2
- package/dist/RevisionView.d.ts.map +1 -1
- package/dist/RevisionView.js.map +1 -1
- package/dist/SerializationUtilities.d.ts +1 -1
- package/dist/SerializationUtilities.d.ts.map +1 -1
- package/dist/SerializationUtilities.js.map +1 -1
- package/dist/SharedTree.d.ts +8 -7
- package/dist/SharedTree.d.ts.map +1 -1
- package/dist/SharedTree.js +78 -78
- package/dist/SharedTree.js.map +1 -1
- package/dist/SharedTreeEncoder.d.ts +1 -1
- package/dist/SharedTreeEncoder.d.ts.map +1 -1
- package/dist/SharedTreeEncoder.js +31 -31
- package/dist/SharedTreeEncoder.js.map +1 -1
- package/dist/Summary.d.ts +2 -2
- package/dist/Summary.d.ts.map +1 -1
- package/dist/Summary.js +2 -2
- package/dist/Summary.js.map +1 -1
- package/dist/SummaryBackCompatibility.d.ts.map +1 -1
- package/dist/SummaryBackCompatibility.js.map +1 -1
- package/dist/SummaryTestUtilities.d.ts +1 -1
- package/dist/SummaryTestUtilities.d.ts.map +1 -1
- package/dist/SummaryTestUtilities.js.map +1 -1
- package/dist/Transaction.d.ts +3 -3
- package/dist/Transaction.d.ts.map +1 -1
- package/dist/Transaction.js +3 -3
- package/dist/Transaction.js.map +1 -1
- package/dist/TransactionInternal.d.ts +3 -3
- package/dist/TransactionInternal.d.ts.map +1 -1
- package/dist/TransactionInternal.js +6 -6
- package/dist/TransactionInternal.js.map +1 -1
- package/dist/TreeCompressor.d.ts +5 -1
- package/dist/TreeCompressor.d.ts.map +1 -1
- package/dist/TreeCompressor.js +5 -5
- package/dist/TreeCompressor.js.map +1 -1
- package/dist/TreeNodeHandle.d.ts +1 -1
- package/dist/TreeNodeHandle.d.ts.map +1 -1
- package/dist/TreeNodeHandle.js.map +1 -1
- package/dist/TreeView.d.ts +1 -1
- package/dist/TreeView.d.ts.map +1 -1
- package/dist/TreeView.js +2 -3
- package/dist/TreeView.js.map +1 -1
- package/dist/UuidUtilities.d.ts.map +1 -1
- package/dist/UuidUtilities.js.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.d.ts.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.js +3 -3
- package/dist/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/dist/id-compressor/IdCompressor.d.ts +1 -1
- package/dist/id-compressor/IdCompressor.d.ts.map +1 -1
- package/dist/id-compressor/IdCompressor.js +25 -26
- package/dist/id-compressor/IdCompressor.js.map +1 -1
- package/dist/id-compressor/IdRange.d.ts.map +1 -1
- package/dist/id-compressor/IdRange.js +2 -2
- package/dist/id-compressor/IdRange.js.map +1 -1
- package/dist/id-compressor/NumericUuid.d.ts.map +1 -1
- package/dist/id-compressor/NumericUuid.js +2 -1
- package/dist/id-compressor/NumericUuid.js.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.js +8 -9
- package/dist/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.d.ts +1 -1
- package/dist/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.js +11 -11
- package/dist/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/dist/migration-shim/migrationShim.d.ts +8 -4
- package/dist/migration-shim/migrationShim.d.ts.map +1 -1
- package/dist/migration-shim/migrationShim.js +13 -13
- package/dist/migration-shim/migrationShim.js.map +1 -1
- package/dist/migration-shim/migrationShimFactory.d.ts +2 -2
- package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/migrationShimFactory.js +2 -2
- package/dist/migration-shim/migrationShimFactory.js.map +1 -1
- package/dist/migration-shim/packageVersion.d.ts +0 -2
- package/dist/migration-shim/packageVersion.d.ts.map +1 -1
- package/dist/migration-shim/packageVersion.js +0 -2
- package/dist/migration-shim/packageVersion.js.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.js +8 -8
- package/dist/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/dist/migration-shim/sharedTreeShim.d.ts +2 -2
- package/dist/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShim.js +8 -4
- package/dist/migration-shim/sharedTreeShim.js.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.js +2 -2
- package/dist/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/dist/migration-shim/shimChannelServices.d.ts +1 -1
- package/dist/migration-shim/shimChannelServices.d.ts.map +1 -1
- package/dist/migration-shim/shimChannelServices.js.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.d.ts +1 -1
- package/dist/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.js +2 -2
- package/dist/migration-shim/shimDeltaConnection.js.map +1 -1
- package/dist/migration-shim/shimHandle.d.ts.map +1 -1
- package/dist/migration-shim/shimHandle.js.map +1 -1
- package/dist/migration-shim/types.d.ts +1 -1
- package/dist/migration-shim/types.d.ts.map +1 -1
- package/dist/migration-shim/types.js.map +1 -1
- package/dist/migration-shim/utils.d.ts +1 -1
- package/dist/migration-shim/utils.d.ts.map +1 -1
- package/dist/migration-shim/utils.js.map +1 -1
- package/dist/persisted-types/0.0.2.d.ts +1 -1
- package/dist/persisted-types/0.0.2.d.ts.map +1 -1
- package/dist/persisted-types/0.0.2.js.map +1 -1
- package/dist/persisted-types/0.1.1.d.ts +1 -1
- package/dist/persisted-types/0.1.1.d.ts.map +1 -1
- package/dist/persisted-types/0.1.1.js +3 -3
- package/dist/persisted-types/0.1.1.js.map +1 -1
- package/lib/ChangeCompression.d.ts +2 -2
- package/lib/ChangeCompression.d.ts.map +1 -1
- package/lib/ChangeCompression.js +1 -1
- package/lib/ChangeCompression.js.map +1 -1
- package/lib/ChangeTypes.d.ts +1 -1
- package/lib/ChangeTypes.d.ts.map +1 -1
- package/lib/ChangeTypes.js +2 -2
- package/lib/ChangeTypes.js.map +1 -1
- package/lib/Checkout.d.ts +3 -3
- package/lib/Checkout.d.ts.map +1 -1
- package/lib/Checkout.js +4 -4
- package/lib/Checkout.js.map +1 -1
- package/lib/EditLog.d.ts +1 -1
- package/lib/EditLog.d.ts.map +1 -1
- package/lib/EditLog.js +2 -2
- package/lib/EditLog.js.map +1 -1
- package/lib/EditUtilities.d.ts +3 -3
- package/lib/EditUtilities.d.ts.map +1 -1
- package/lib/EditUtilities.js +5 -5
- package/lib/EditUtilities.js.map +1 -1
- package/lib/Forest.d.ts.map +1 -1
- package/lib/Forest.js +2 -2
- package/lib/Forest.js.map +1 -1
- package/lib/HistoryEditFactory.d.ts +1 -1
- package/lib/HistoryEditFactory.d.ts.map +1 -1
- package/lib/HistoryEditFactory.js +5 -5
- package/lib/HistoryEditFactory.js.map +1 -1
- package/lib/IdConversion.d.ts.map +1 -1
- package/lib/IdConversion.js.map +1 -1
- package/lib/LogViewer.d.ts +2 -2
- package/lib/LogViewer.d.ts.map +1 -1
- package/lib/LogViewer.js +3 -3
- package/lib/LogViewer.js.map +1 -1
- package/lib/MergeHealth.d.ts.map +1 -1
- package/lib/MergeHealth.js +1 -1
- package/lib/MergeHealth.js.map +1 -1
- package/lib/NodeIdUtilities.d.ts +1 -1
- package/lib/NodeIdUtilities.d.ts.map +1 -1
- package/lib/NodeIdUtilities.js +1 -1
- package/lib/NodeIdUtilities.js.map +1 -1
- package/lib/PayloadUtilities.d.ts.map +1 -1
- package/lib/PayloadUtilities.js +1 -1
- package/lib/PayloadUtilities.js.map +1 -1
- package/lib/ReconciliationPath.d.ts +1 -1
- package/lib/ReconciliationPath.d.ts.map +1 -1
- package/lib/ReconciliationPath.js.map +1 -1
- package/lib/RevisionValueCache.d.ts.map +1 -1
- package/lib/RevisionValueCache.js +2 -2
- package/lib/RevisionValueCache.js.map +1 -1
- package/lib/RevisionView.d.ts +2 -2
- package/lib/RevisionView.d.ts.map +1 -1
- package/lib/RevisionView.js.map +1 -1
- package/lib/SerializationUtilities.d.ts +1 -1
- package/lib/SerializationUtilities.d.ts.map +1 -1
- package/lib/SerializationUtilities.js.map +1 -1
- package/lib/SharedTree.d.ts +8 -7
- package/lib/SharedTree.d.ts.map +1 -1
- package/lib/SharedTree.js +13 -13
- package/lib/SharedTree.js.map +1 -1
- package/lib/SharedTreeEncoder.d.ts +1 -1
- package/lib/SharedTreeEncoder.d.ts.map +1 -1
- package/lib/SharedTreeEncoder.js +5 -5
- package/lib/SharedTreeEncoder.js.map +1 -1
- package/lib/Summary.d.ts +2 -2
- package/lib/Summary.d.ts.map +1 -1
- package/lib/Summary.js +1 -1
- package/lib/Summary.js.map +1 -1
- package/lib/SummaryBackCompatibility.d.ts.map +1 -1
- package/lib/SummaryBackCompatibility.js.map +1 -1
- package/lib/SummaryTestUtilities.d.ts +1 -1
- package/lib/SummaryTestUtilities.d.ts.map +1 -1
- package/lib/SummaryTestUtilities.js.map +1 -1
- package/lib/Transaction.d.ts +3 -3
- package/lib/Transaction.d.ts.map +1 -1
- package/lib/Transaction.js +3 -3
- package/lib/Transaction.js.map +1 -1
- package/lib/TransactionInternal.d.ts +3 -3
- package/lib/TransactionInternal.d.ts.map +1 -1
- package/lib/TransactionInternal.js +3 -3
- package/lib/TransactionInternal.js.map +1 -1
- package/lib/TreeCompressor.d.ts +5 -1
- package/lib/TreeCompressor.d.ts.map +1 -1
- package/lib/TreeCompressor.js +2 -2
- package/lib/TreeCompressor.js.map +1 -1
- package/lib/TreeNodeHandle.d.ts +1 -1
- package/lib/TreeNodeHandle.d.ts.map +1 -1
- package/lib/TreeNodeHandle.js.map +1 -1
- package/lib/TreeView.d.ts +1 -1
- package/lib/TreeView.d.ts.map +1 -1
- package/lib/TreeView.js +1 -2
- package/lib/TreeView.js.map +1 -1
- package/lib/UuidUtilities.d.ts.map +1 -1
- package/lib/UuidUtilities.js +1 -1
- package/lib/UuidUtilities.js.map +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.d.ts.map +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/lib/id-compressor/IdCompressor.d.ts +1 -1
- package/lib/id-compressor/IdCompressor.d.ts.map +1 -1
- package/lib/id-compressor/IdCompressor.js +4 -5
- package/lib/id-compressor/IdCompressor.js.map +1 -1
- package/lib/id-compressor/IdRange.d.ts.map +1 -1
- package/lib/id-compressor/IdRange.js +1 -1
- package/lib/id-compressor/IdRange.js.map +1 -1
- package/lib/id-compressor/NumericUuid.d.ts.map +1 -1
- package/lib/id-compressor/NumericUuid.js +2 -1
- package/lib/id-compressor/NumericUuid.js.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.js +1 -2
- package/lib/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.d.ts +1 -1
- package/lib/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.js +1 -1
- package/lib/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/lib/migration-shim/migrationShim.d.ts +8 -4
- package/lib/migration-shim/migrationShim.d.ts.map +1 -1
- package/lib/migration-shim/migrationShim.js +3 -3
- package/lib/migration-shim/migrationShim.js.map +1 -1
- package/lib/migration-shim/migrationShimFactory.d.ts +2 -2
- package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/migrationShimFactory.js +1 -1
- package/lib/migration-shim/migrationShimFactory.js.map +1 -1
- package/lib/migration-shim/packageVersion.d.ts +0 -2
- package/lib/migration-shim/packageVersion.d.ts.map +1 -1
- package/lib/migration-shim/packageVersion.js +0 -2
- package/lib/migration-shim/packageVersion.js.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/lib/migration-shim/sharedTreeShim.d.ts +2 -2
- package/lib/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShim.js +6 -2
- package/lib/migration-shim/sharedTreeShim.js.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.js +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/lib/migration-shim/shimChannelServices.d.ts +1 -1
- package/lib/migration-shim/shimChannelServices.d.ts.map +1 -1
- package/lib/migration-shim/shimChannelServices.js.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.d.ts +1 -1
- package/lib/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.js +1 -1
- package/lib/migration-shim/shimDeltaConnection.js.map +1 -1
- package/lib/migration-shim/shimHandle.d.ts.map +1 -1
- package/lib/migration-shim/shimHandle.js.map +1 -1
- package/lib/migration-shim/types.d.ts +1 -1
- package/lib/migration-shim/types.d.ts.map +1 -1
- package/lib/migration-shim/types.js.map +1 -1
- package/lib/migration-shim/utils.d.ts +1 -1
- package/lib/migration-shim/utils.d.ts.map +1 -1
- package/lib/migration-shim/utils.js.map +1 -1
- package/lib/persisted-types/0.0.2.d.ts +1 -1
- package/lib/persisted-types/0.0.2.d.ts.map +1 -1
- package/lib/persisted-types/0.0.2.js.map +1 -1
- package/lib/persisted-types/0.1.1.d.ts +1 -1
- package/lib/persisted-types/0.1.1.d.ts.map +1 -1
- package/lib/persisted-types/0.1.1.js +1 -1
- package/lib/persisted-types/0.1.1.js.map +1 -1
- package/package.json +33 -32
- package/src/ChangeCompression.ts +8 -8
- package/src/ChangeTypes.ts +5 -4
- package/src/Checkout.ts +9 -7
- package/src/EditLog.ts +4 -3
- package/src/EditUtilities.ts +9 -8
- package/src/Forest.ts +3 -2
- package/src/HistoryEditFactory.ts +12 -11
- package/src/IdConversion.ts +2 -2
- package/src/LogViewer.ts +5 -4
- package/src/MergeHealth.ts +2 -1
- package/src/NodeIdUtilities.ts +2 -2
- package/src/PayloadUtilities.ts +2 -1
- package/src/ReconciliationPath.ts +1 -1
- package/src/RevisionValueCache.ts +3 -2
- package/src/RevisionView.ts +3 -3
- package/src/SerializationUtilities.ts +1 -1
- package/src/SharedTree.ts +46 -49
- package/src/SharedTreeEncoder.ts +30 -29
- package/src/Summary.ts +5 -3
- package/src/SummaryBackCompatibility.ts +1 -0
- package/src/SummaryTestUtilities.ts +2 -1
- package/src/Transaction.ts +7 -6
- package/src/TransactionInternal.ts +17 -16
- package/src/TreeCompressor.ts +6 -4
- package/src/TreeNodeHandle.ts +2 -2
- package/src/TreeView.ts +3 -3
- package/src/UuidUtilities.ts +2 -1
- package/src/id-compressor/AppendOnlySortedMap.ts +2 -1
- package/src/id-compressor/IdCompressor.ts +18 -17
- package/src/id-compressor/IdRange.ts +2 -1
- package/src/id-compressor/NumericUuid.ts +1 -1
- package/src/id-compressor/SessionIdNormalizer.ts +3 -3
- package/src/migration-shim/migrationDeltaHandler.ts +3 -2
- package/src/migration-shim/migrationShim.ts +14 -10
- package/src/migration-shim/migrationShimFactory.ts +6 -4
- package/src/migration-shim/packageVersion.ts +0 -2
- package/src/migration-shim/sharedTreeDeltaHandler.ts +3 -2
- package/src/migration-shim/sharedTreeShim.ts +7 -5
- package/src/migration-shim/sharedTreeShimFactory.ts +3 -3
- package/src/migration-shim/shimChannelServices.ts +1 -1
- package/src/migration-shim/shimDeltaConnection.ts +3 -2
- package/src/migration-shim/shimHandle.ts +1 -0
- package/src/migration-shim/types.ts +3 -1
- package/src/migration-shim/utils.ts +2 -1
- package/src/persisted-types/0.0.2.ts +2 -2
- package/src/persisted-types/0.1.1.ts +10 -8
- package/dist/tree-alpha.d.ts +0 -2901
- package/dist/tree-beta.d.ts +0 -348
- package/dist/tree-public.d.ts +0 -348
- package/dist/tree-untrimmed.d.ts +0 -3820
- package/lib/test/AppendOnlySortedMap.perf.tests.d.ts +0 -6
- package/lib/test/AppendOnlySortedMap.perf.tests.d.ts.map +0 -1
- package/lib/test/AppendOnlySortedMap.perf.tests.js +0 -49
- package/lib/test/AppendOnlySortedMap.perf.tests.js.map +0 -1
- package/lib/test/AppendOnlySortedMap.tests.d.ts +0 -6
- package/lib/test/AppendOnlySortedMap.tests.d.ts.map +0 -1
- package/lib/test/AppendOnlySortedMap.tests.js +0 -213
- package/lib/test/AppendOnlySortedMap.tests.js.map +0 -1
- package/lib/test/ChangeCompression.tests.d.ts +0 -6
- package/lib/test/ChangeCompression.tests.d.ts.map +0 -1
- package/lib/test/ChangeCompression.tests.js +0 -154
- package/lib/test/ChangeCompression.tests.js.map +0 -1
- package/lib/test/Checkout.tests.d.ts +0 -10
- package/lib/test/Checkout.tests.d.ts.map +0 -1
- package/lib/test/Checkout.tests.js +0 -460
- package/lib/test/Checkout.tests.js.map +0 -1
- package/lib/test/Common.tests.d.ts +0 -6
- package/lib/test/Common.tests.d.ts.map +0 -1
- package/lib/test/Common.tests.js +0 -102
- package/lib/test/Common.tests.js.map +0 -1
- package/lib/test/EagerCheckout.tests.d.ts +0 -6
- package/lib/test/EagerCheckout.tests.d.ts.map +0 -1
- package/lib/test/EagerCheckout.tests.js +0 -20
- package/lib/test/EagerCheckout.tests.js.map +0 -1
- package/lib/test/Edit.tests.d.ts +0 -6
- package/lib/test/Edit.tests.d.ts.map +0 -1
- package/lib/test/Edit.tests.js +0 -60
- package/lib/test/Edit.tests.js.map +0 -1
- package/lib/test/EditLog.perf.tests.d.ts +0 -6
- package/lib/test/EditLog.perf.tests.d.ts.map +0 -1
- package/lib/test/EditLog.perf.tests.js +0 -41
- package/lib/test/EditLog.perf.tests.js.map +0 -1
- package/lib/test/EditLog.tests.d.ts +0 -6
- package/lib/test/EditLog.tests.d.ts.map +0 -1
- package/lib/test/EditLog.tests.js +0 -355
- package/lib/test/EditLog.tests.js.map +0 -1
- package/lib/test/EditUtilities.tests.d.ts +0 -6
- package/lib/test/EditUtilities.tests.d.ts.map +0 -1
- package/lib/test/EditUtilities.tests.js +0 -512
- package/lib/test/EditUtilities.tests.js.map +0 -1
- package/lib/test/Forest.perf.tests.d.ts +0 -6
- package/lib/test/Forest.perf.tests.d.ts.map +0 -1
- package/lib/test/Forest.perf.tests.js +0 -135
- package/lib/test/Forest.perf.tests.js.map +0 -1
- package/lib/test/Forest.tests.d.ts +0 -6
- package/lib/test/Forest.tests.d.ts.map +0 -1
- package/lib/test/Forest.tests.js +0 -213
- package/lib/test/Forest.tests.js.map +0 -1
- package/lib/test/GenericTransaction.tests.d.ts +0 -6
- package/lib/test/GenericTransaction.tests.d.ts.map +0 -1
- package/lib/test/GenericTransaction.tests.js +0 -31
- package/lib/test/GenericTransaction.tests.js.map +0 -1
- package/lib/test/HistoryEditFactory.tests.d.ts +0 -6
- package/lib/test/HistoryEditFactory.tests.d.ts.map +0 -1
- package/lib/test/HistoryEditFactory.tests.js +0 -170
- package/lib/test/HistoryEditFactory.tests.js.map +0 -1
- package/lib/test/IdCompressor.perf.tests.d.ts +0 -6
- package/lib/test/IdCompressor.perf.tests.d.ts.map +0 -1
- package/lib/test/IdCompressor.perf.tests.js +0 -290
- package/lib/test/IdCompressor.perf.tests.js.map +0 -1
- package/lib/test/IdCompressor.tests.d.ts +0 -6
- package/lib/test/IdCompressor.tests.d.ts.map +0 -1
- package/lib/test/IdCompressor.tests.js +0 -1542
- package/lib/test/IdCompressor.tests.js.map +0 -1
- package/lib/test/IdConversion.tests.d.ts +0 -6
- package/lib/test/IdConversion.tests.d.ts.map +0 -1
- package/lib/test/IdConversion.tests.js +0 -36
- package/lib/test/IdConversion.tests.js.map +0 -1
- package/lib/test/LazyCheckout.tests.d.ts +0 -6
- package/lib/test/LazyCheckout.tests.d.ts.map +0 -1
- package/lib/test/LazyCheckout.tests.js +0 -22
- package/lib/test/LazyCheckout.tests.js.map +0 -1
- package/lib/test/LogViewer.tests.d.ts +0 -6
- package/lib/test/LogViewer.tests.d.ts.map +0 -1
- package/lib/test/LogViewer.tests.js +0 -588
- package/lib/test/LogViewer.tests.js.map +0 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.d.ts +0 -6
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.d.ts.map +0 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js +0 -351
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js.map +0 -1
- package/lib/test/NumericUuid.perf.tests.d.ts +0 -6
- package/lib/test/NumericUuid.perf.tests.d.ts.map +0 -1
- package/lib/test/NumericUuid.perf.tests.js +0 -68
- package/lib/test/NumericUuid.perf.tests.js.map +0 -1
- package/lib/test/NumericUuid.tests.d.ts +0 -6
- package/lib/test/NumericUuid.tests.d.ts.map +0 -1
- package/lib/test/NumericUuid.tests.js +0 -192
- package/lib/test/NumericUuid.tests.js.map +0 -1
- package/lib/test/RevisionValueCache.tests.d.ts +0 -6
- package/lib/test/RevisionValueCache.tests.d.ts.map +0 -1
- package/lib/test/RevisionValueCache.tests.js +0 -106
- package/lib/test/RevisionValueCache.tests.js.map +0 -1
- package/lib/test/RevisionView.tests.d.ts +0 -6
- package/lib/test/RevisionView.tests.d.ts.map +0 -1
- package/lib/test/RevisionView.tests.js +0 -131
- package/lib/test/RevisionView.tests.js.map +0 -1
- package/lib/test/SessionIdNormalizer.tests.d.ts +0 -6
- package/lib/test/SessionIdNormalizer.tests.d.ts.map +0 -1
- package/lib/test/SessionIdNormalizer.tests.js +0 -377
- package/lib/test/SessionIdNormalizer.tests.js.map +0 -1
- package/lib/test/SharedTree.fuzz.tests.d.ts +0 -6
- package/lib/test/SharedTree.fuzz.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.fuzz.tests.js +0 -9
- package/lib/test/SharedTree.fuzz.tests.js.map +0 -1
- package/lib/test/SharedTree.perf.tests.d.ts +0 -6
- package/lib/test/SharedTree.perf.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.perf.tests.js +0 -39
- package/lib/test/SharedTree.perf.tests.js.map +0 -1
- package/lib/test/SharedTree.tests.d.ts +0 -6
- package/lib/test/SharedTree.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.tests.js +0 -22
- package/lib/test/SharedTree.tests.js.map +0 -1
- package/lib/test/StringInterner.tests.d.ts +0 -6
- package/lib/test/StringInterner.tests.d.ts.map +0 -1
- package/lib/test/StringInterner.tests.js +0 -73
- package/lib/test/StringInterner.tests.js.map +0 -1
- package/lib/test/Summary.tests.d.ts +0 -7
- package/lib/test/Summary.tests.d.ts.map +0 -1
- package/lib/test/Summary.tests.js +0 -386
- package/lib/test/Summary.tests.js.map +0 -1
- package/lib/test/Transaction.tests.d.ts +0 -6
- package/lib/test/Transaction.tests.d.ts.map +0 -1
- package/lib/test/Transaction.tests.js +0 -124
- package/lib/test/Transaction.tests.js.map +0 -1
- package/lib/test/TransactionInternal.tests.d.ts +0 -6
- package/lib/test/TransactionInternal.tests.d.ts.map +0 -1
- package/lib/test/TransactionInternal.tests.js +0 -576
- package/lib/test/TransactionInternal.tests.js.map +0 -1
- package/lib/test/TreeCompression.tests.d.ts +0 -6
- package/lib/test/TreeCompression.tests.d.ts.map +0 -1
- package/lib/test/TreeCompression.tests.js +0 -291
- package/lib/test/TreeCompression.tests.js.map +0 -1
- package/lib/test/TreeView.tests.d.ts +0 -6
- package/lib/test/TreeView.tests.d.ts.map +0 -1
- package/lib/test/TreeView.tests.js +0 -178
- package/lib/test/TreeView.tests.js.map +0 -1
- package/lib/test/UndoRedoHandler.tests.d.ts +0 -6
- package/lib/test/UndoRedoHandler.tests.d.ts.map +0 -1
- package/lib/test/UndoRedoHandler.tests.js +0 -37
- package/lib/test/UndoRedoHandler.tests.js.map +0 -1
- package/lib/test/fuzz/Generators.d.ts +0 -8
- package/lib/test/fuzz/Generators.d.ts.map +0 -1
- package/lib/test/fuzz/Generators.js +0 -345
- package/lib/test/fuzz/Generators.js.map +0 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts +0 -23
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts.map +0 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.js +0 -241
- package/lib/test/fuzz/SharedTreeFuzzTests.js.map +0 -1
- package/lib/test/fuzz/Types.d.ts +0 -136
- package/lib/test/fuzz/Types.d.ts.map +0 -1
- package/lib/test/fuzz/Types.js +0 -6
- package/lib/test/fuzz/Types.js.map +0 -1
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts +0 -246
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts.map +0 -1
- package/lib/test/utilities/IdCompressorTestUtilities.js +0 -608
- package/lib/test/utilities/IdCompressorTestUtilities.js.map +0 -1
- package/lib/test/utilities/MockTransaction.d.ts +0 -35
- package/lib/test/utilities/MockTransaction.d.ts.map +0 -1
- package/lib/test/utilities/MockTransaction.js +0 -51
- package/lib/test/utilities/MockTransaction.js.map +0 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts +0 -12
- package/lib/test/utilities/PendingLocalStateTests.d.ts.map +0 -1
- package/lib/test/utilities/PendingLocalStateTests.js +0 -223
- package/lib/test/utilities/PendingLocalStateTests.js.map +0 -1
- package/lib/test/utilities/SharedTreeTests.d.ts +0 -12
- package/lib/test/utilities/SharedTreeTests.d.ts.map +0 -1
- package/lib/test/utilities/SharedTreeTests.js +0 -949
- package/lib/test/utilities/SharedTreeTests.js.map +0 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts +0 -11
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts.map +0 -1
- package/lib/test/utilities/SharedTreeVersioningTests.js +0 -439
- package/lib/test/utilities/SharedTreeVersioningTests.js.map +0 -1
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts +0 -10
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts.map +0 -1
- package/lib/test/utilities/SummaryLoadPerfTests.js +0 -105
- package/lib/test/utilities/SummaryLoadPerfTests.js.map +0 -1
- package/lib/test/utilities/SummarySizeTests.d.ts +0 -11
- package/lib/test/utilities/SummarySizeTests.d.ts.map +0 -1
- package/lib/test/utilities/SummarySizeTests.js +0 -160
- package/lib/test/utilities/SummarySizeTests.js.map +0 -1
- package/lib/test/utilities/TestCommon.d.ts +0 -13
- package/lib/test/utilities/TestCommon.d.ts.map +0 -1
- package/lib/test/utilities/TestCommon.js +0 -19
- package/lib/test/utilities/TestCommon.js.map +0 -1
- package/lib/test/utilities/TestNode.d.ts +0 -140
- package/lib/test/utilities/TestNode.d.ts.map +0 -1
- package/lib/test/utilities/TestNode.js +0 -282
- package/lib/test/utilities/TestNode.js.map +0 -1
- package/lib/test/utilities/TestSerializer.d.ts +0 -24
- package/lib/test/utilities/TestSerializer.d.ts.map +0 -1
- package/lib/test/utilities/TestSerializer.js +0 -40
- package/lib/test/utilities/TestSerializer.js.map +0 -1
- package/lib/test/utilities/TestUtilities.d.ts +0 -212
- package/lib/test/utilities/TestUtilities.d.ts.map +0 -1
- package/lib/test/utilities/TestUtilities.js +0 -413
- package/lib/test/utilities/TestUtilities.js.map +0 -1
- package/lib/test/utilities/UndoRedoTests.d.ts +0 -32
- package/lib/test/utilities/UndoRedoTests.d.ts.map +0 -1
- package/lib/test/utilities/UndoRedoTests.js +0 -317
- package/lib/test/utilities/UndoRedoTests.js.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { type IChannelAttributes, type
|
|
5
|
+
import { type IChannelAttributes, type IChannelFactory, type IChannelServices, type IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
6
6
|
import { type ITree } from '@fluidframework/tree';
|
|
7
|
-
import { type
|
|
7
|
+
import { type SharedTree as LegacySharedTree, type SharedTreeFactory as LegacySharedTreeFactory } from '../SharedTree.js';
|
|
8
8
|
import { MigrationShim } from './migrationShim.js';
|
|
9
9
|
/**
|
|
10
10
|
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link MigrationShim}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrationShimFactory.d.ts","sourceRoot":"","sources":["../../src/migration-shim/migrationShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"migrationShimFactory.d.ts","sourceRoot":"","sources":["../../src/migration-shim/migrationShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EACN,KAAK,UAAU,IAAI,gBAAgB,EACnC,KAAK,iBAAiB,IAAI,uBAAuB,EACjD,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD;;;;;;;;;;;GAWG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IAE1D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAFpB,UAAU,EAAE,uBAAuB,EACnC,UAAU,EAAE,eAAe,EAC3B,oBAAoB,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,KAAK,IAAI;IAGjG;;;;OAIG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;;OAIG;IACH,IAAW,UAAU,IAAI,kBAAkB,CAE1C;IAED;;;;;OAKG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,aAAa,CAAC;IAczB;;;;;;OAMG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa;CAYzE"}
|
|
@@ -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 { assert } from '@fluidframework/core-utils';
|
|
5
|
+
import { assert } from '@fluidframework/core-utils/internal';
|
|
6
6
|
import { MigrationShim } from './migrationShim.js';
|
|
7
7
|
import { attributesMatch } from './utils.js';
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrationShimFactory.js","sourceRoot":"","sources":["../../src/migration-shim/migrationShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"migrationShimFactory.js","sourceRoot":"","sources":["../../src/migration-shim/migrationShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAc7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,oBAAoB;IAChC,YACkB,UAAmC,EACnC,UAA2B,EAC3B,oBAA+E;QAF/E,eAAU,GAAV,UAAU,CAAyB;QACnC,eAAU,GAAV,UAAU,CAAiB;QAC3B,yBAAoB,GAApB,oBAAoB,CAA2D;IAC9F,CAAC;IAEJ;;;;OAIG;IACH,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,mKAAmK;QACnK,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACrG,MAAM,aAAa,GAAG,IAAI,aAAa,CACtC,EAAE,EACF,OAAO,EACP,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,oBAAoB,CACzB,CAAC;QACF,MAAM,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnC,OAAO,aAAa,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,oCAAoC;QACpC,MAAM,aAAa,GAAG,IAAI,aAAa,CACtC,EAAE,EACF,OAAO,EACP,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,oBAAoB,CACzB,CAAC;QACF,aAAa,CAAC,MAAM,EAAE,CAAC;QACvB,OAAO,aAAa,CAAC;IACtB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils/internal';\nimport {\n\ttype IChannelAttributes,\n\ttype IChannelFactory,\n\ttype IChannelServices,\n\ttype IFluidDataStoreRuntime,\n} from '@fluidframework/datastore-definitions';\nimport { type ITree } from '@fluidframework/tree';\n\nimport {\n\ttype SharedTree as LegacySharedTree,\n\ttype SharedTreeFactory as LegacySharedTreeFactory,\n} from '../SharedTree.js';\n\nimport { MigrationShim } from './migrationShim.js';\nimport { attributesMatch } from './utils.js';\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link MigrationShim}.\n *\n * Creates the migration shim that allows a migration from legacy shared tree to shared tree.\n * @remarks\n *\n * It takes over the attributes of the legacy factory, so that it is loaded instead of the normal legacy factory. Once migration finishes, the shim it produces will change its attributes to those of the new factory - meaning that on the next summarization the shim will write a summary that will cause future clients to load a different factory and shim (the SharedTreeShimFactory and SharedTreeShim).\n * 1. pre-migration\n *\n * @sealed\n * @internal\n */\nexport class MigrationShimFactory implements IChannelFactory {\n\tpublic constructor(\n\t\tprivate readonly oldFactory: LegacySharedTreeFactory,\n\t\tprivate readonly newFactory: IChannelFactory,\n\t\tprivate readonly populateNewChannelFn: (oldChannel: LegacySharedTree, newChannel: ITree) => void\n\t) {}\n\n\t/**\n\t * This factory takes over the type of the oldFactory to load in its place. The user must not include the MigrationShimFactory and the oldFactory in the same registry to avoid conflict.\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn this.oldFactory.type;\n\t}\n\n\t/**\n\t * Should be the LegacySharedTree attributes\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn this.oldFactory.attributes;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.load}\n\t *\n\t * Should be loading the MigrationShim - it should just load the old tree as this makes the factory's\n\t * responsibility simple. Trying to follow the Single Responsibility Principle here.\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes\n\t): Promise<MigrationShim> {\n\t\t// TODO: remove attributes check and move it to an automated test that constructing a MigrationShimFactory and checking its attributes/type matches the oldFactory.\n\t\tassert(attributesMatch(attributes, this.oldFactory.attributes), 0x7ea /* Attributes do not match */);\n\t\tconst migrationShim = new MigrationShim(\n\t\t\tid,\n\t\t\truntime,\n\t\t\tthis.oldFactory,\n\t\t\tthis.newFactory,\n\t\t\tthis.populateNewChannelFn\n\t\t);\n\t\tawait migrationShim.load(services);\n\t\treturn migrationShim;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.create}\n\t *\n\t * Create MigrationShim that can hot swap from one DDS to a new DDS. We want the capability of creating an old tree\n\t * as when this code rolls out, there may be clients on the v1 version of the code, and we may want to have a dark\n\t * rollout capability.\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): MigrationShim {\n\t\t// Maybe this should throw an error.\n\t\tconst migrationShim = new MigrationShim(\n\t\t\tid,\n\t\t\truntime,\n\t\t\tthis.oldFactory,\n\t\t\tthis.newFactory,\n\t\t\tthis.populateNewChannelFn\n\t\t);\n\t\tmigrationShim.create();\n\t\treturn migrationShim;\n\t}\n}\n"]}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
|
-
*
|
|
5
|
-
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
4
|
*/
|
|
7
5
|
export declare const pkgName = "@fluid-experimental/migration-shim";
|
|
8
6
|
export declare const pkgVersion = "2.0.0-internal.8.0.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../../src/migration-shim/packageVersion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../../src/migration-shim/packageVersion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO,uCAAuC,CAAC;AAC5D,eAAO,MAAM,UAAU,yBAAyB,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
|
-
*
|
|
5
|
-
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
4
|
*/
|
|
7
5
|
export const pkgName = '@fluid-experimental/migration-shim';
|
|
8
6
|
export const pkgVersion = '2.0.0-internal.8.0.0';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../../src/migration-shim/packageVersion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../../src/migration-shim/packageVersion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,oCAAoC,CAAC;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport const pkgName = '@fluid-experimental/migration-shim';\nexport const pkgVersion = '2.0.0-internal.8.0.0';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeDeltaHandler.d.ts","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeDeltaHandler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACpG,OAAO,
|
|
1
|
+
{"version":3,"file":"sharedTreeDeltaHandler.d.ts","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeDeltaHandler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACpG,OAAO,EAAE,KAAK,yBAAyB,EAAe,MAAM,sCAAsC,CAAC;AAEnG,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGtE;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,YAAW,iBAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,kBAAkB;IAElE,OAAO,CAAC,QAAQ,CAAC,CAAgB;IACjC,OAAO,KAAK,OAAO,GAIlB;IAED,OAAO,CAAC,SAAS,CAAS;IAC1B,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAEM,YAAY,IAAI,IAAI;IAIpB,sBAAsB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAKpD,mBAAmB,IAAI,OAAO;IAI9B,OAAO,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAgB3F,kBAAkB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAK5C,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAS3D,cAAc,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAQ9C;;;OAGG;IACI,QAAQ,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAQnE;;;;OAIG;IACH,OAAO,CAAC,YAAY;CAYpB"}
|
|
@@ -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 { assert } from '@fluidframework/core-utils';
|
|
5
|
+
import { assert } from '@fluidframework/core-utils/internal';
|
|
6
6
|
import { MessageType } from '@fluidframework/protocol-definitions';
|
|
7
7
|
import { attributesMatch, isStampedOp } from './utils.js';
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeDeltaHandler.js","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeDeltaHandler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sharedTreeDeltaHandler.js","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeDeltaHandler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAAkC,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAGnG,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,OAAO,0BAA0B;IACtC,YAAoC,UAA8B;QAA9B,eAAU,GAAV,UAAU,CAAoB;QAS1D,cAAS,GAAG,KAAK,CAAC;IAT2C,CAAC;IAGtE,IAAY,OAAO;QAClB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IAChB,CAAC;IAGD,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAEM,YAAY;QAClB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACvB,CAAC;IAEM,sBAAsB,CAAC,OAAsB;QACnD,MAAM,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,KAAK,CAAC,0CAA0C,CAAC,CAAC;QACtF,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,mBAAmB;QACzB,OAAO,IAAI,CAAC,QAAQ,KAA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AAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC3D,CAAC;IAED;;;;OAIG;IACK,YAAY,CAAC,QAAqB;QACzC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC;SACZ;QAED,gCAAgC;QAChC,MAAM,CACL,eAAe,CAAC,QAAQ,CAAC,mBAAmB,EAAE,IAAI,CAAC,UAAU,CAAC,EAC9D,KAAK,CAAC,iDAAiD,CACvD,CAAC;QACF,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils/internal';\nimport { type IChannelAttributes, type IDeltaHandler } from '@fluidframework/datastore-definitions';\nimport { type ISequencedDocumentMessage, MessageType } from '@fluidframework/protocol-definitions';\n\nimport { type IOpContents, type IShimDeltaHandler } from './types.js';\nimport { attributesMatch, isStampedOp } from './utils.js';\n\n/**\n * Handles incoming and outgoing deltas/ops for the SharedTreeShim distributed data structure.\n * This serves as an adapter to the real DeltaHandler, filter/process migration ops\n *\n * This should just have the ability to drop v1 & migrate ops, and process v2 ops. There may be an opportunity to\n * combine this class with the MigrationShimDeltaHandler, but for now the classes are separated. Once it is clear what\n * exact code can be shared between the two classes is and how it can be merge, we may figure out a way of merging\n * MigrationShimDeltaHandler and SharedTreeShimDeltaHandler.\n */\nexport class SharedTreeShimDeltaHandler implements IShimDeltaHandler {\n\tpublic constructor(private readonly attributes: IChannelAttributes) {}\n\n\tprivate _handler?: IDeltaHandler;\n\tprivate get handler(): IDeltaHandler {\n\t\tconst handler = this._handler;\n\t\tassert(handler !== undefined, 0x7eb /* No handler to process op */);\n\t\treturn handler;\n\t}\n\n\tprivate _attached = false;\n\tpublic get attached(): boolean {\n\t\treturn this._attached;\n\t}\n\n\tpublic markAttached(): void {\n\t\tthis._attached = true;\n\t}\n\n\tpublic attachTreeDeltaHandler(handler: IDeltaHandler): void {\n\t\tassert(this._handler === undefined, 0x7ec /* Should only be able to connect once! */);\n\t\tthis._handler = handler;\n\t}\n\n\tpublic hasTreeDeltaHandler(): boolean {\n\t\treturn this._handler !== undefined;\n\t}\n\n\tpublic process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void {\n\t\t// This allows us to process the migrate op and prevent the shared object from processing the wrong ops\n\t\t// Drop v1 ops\n\t\tassert(this.hasTreeDeltaHandler(), 0x831 /* Can't process ops before attaching tree handler */);\n\n\t\tif (message.type !== MessageType.Operation) {\n\t\t\treturn;\n\t\t}\n\t\tconst contents = message.contents as IOpContents;\n\t\tif (this.shouldDropOp(contents)) {\n\t\t\treturn;\n\t\t}\n\t\treturn this.handler.process(message, local, localOpMetadata);\n\t}\n\n\t// No idea whether any of the below 4 methods work as expected\n\tpublic setConnectionState(connected: boolean): void {\n\t\treturn this.handler.setConnectionState(connected);\n\t}\n\n\t// Resubmitting v1 ops should fail. We should not be resubmitting v1 ops.\n\tpublic reSubmit(contents: unknown, localOpMetadata: unknown): void {\n\t\tassert(\n\t\t\t!this.shouldDropOp(contents as IOpContents),\n\t\t\t0x832 /* Should not be able to rollback v1 ops as they shouldn't have been created locally. */\n\t\t);\n\t\treturn this.handler.reSubmit(contents, localOpMetadata);\n\t}\n\n\t// We are not capable of applying stashed v1 ops.\n\tpublic applyStashedOp(contents: unknown): void {\n\t\tassert(\n\t\t\t!this.shouldDropOp(contents as IOpContents),\n\t\t\t0x8ab /* SharedTreeShim should not be able to apply v1 ops as they shouldn't have been created locally. */\n\t\t);\n\t\tthis.handler.applyStashedOp(contents);\n\t}\n\n\t/**\n\t * We cannot rollback v1 ops, we have already migrated and are in v2 state, thus we should not be able to generate.\n\t * v1 ops\n\t */\n\tpublic rollback?(contents: unknown, localOpMetadata: unknown): void {\n\t\tassert(\n\t\t\t!this.shouldDropOp(contents as IOpContents),\n\t\t\t0x833 /* Should not be able to rollback v1 ops as they shouldn't have been created locally. */\n\t\t);\n\t\treturn this.handler.rollback?.(contents, localOpMetadata);\n\t}\n\n\t/**\n\t * The SharedTreeShimDeltaHandler is already in a v2 state. Thus it should drop all v1 and migrate ops.\n\t * @param contents - the interrogable op contents to figure out if this is a v1 op, a migrate op, or a v2 op.\n\t * @returns whether or not the op is a v1 or migrate op and should be dropped/ignored.\n\t */\n\tprivate shouldDropOp(contents: IOpContents): boolean {\n\t\tif (!isStampedOp(contents)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Don't drop v2 ops in v2 state\n\t\tassert(\n\t\t\tattributesMatch(contents.fluidMigrationStamp, this.attributes),\n\t\t\t0x834 /* Unexpected v2 op with mismatched attributes */\n\t\t);\n\t\treturn false;\n\t}\n}\n"]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { type IFluidHandle, type IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { type
|
|
7
|
-
import { type IExperimentalIncrementalSummaryContext, type IGarbageCollectionData, type
|
|
6
|
+
import { type IChannelAttributes, type IChannelFactory, type IChannelServices, type IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
7
|
+
import { type IExperimentalIncrementalSummaryContext, type IGarbageCollectionData, type ISummaryTreeWithStats, type ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
8
8
|
import { type ITree } from '@fluidframework/tree';
|
|
9
9
|
import { type IShim } from './types.js';
|
|
10
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeShim.d.ts","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShim.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"sharedTreeShim.d.ts","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShim.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,YAAY,EA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CAAsC,GAAG,SAAS,GAC5E,OAAO,CAAC,qBAAqB,CAAC;IAG1B,UAAU,IAAI,OAAO;IAGrB,OAAO,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAMnC,IAAI,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAerD,MAAM,IAAI,IAAI;IAIrB,OAAO,CAAC,wBAAwB;IAczB,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,sBAAsB;CAGtE"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
1
5
|
import { AttachState } from '@fluidframework/container-definitions';
|
|
2
|
-
import { assert } from '@fluidframework/core-utils';
|
|
3
|
-
import { NoDeltasChannelServices } from './shimChannelServices.js';
|
|
6
|
+
import { assert } from '@fluidframework/core-utils/internal';
|
|
4
7
|
import { SharedTreeShimDeltaHandler } from './sharedTreeDeltaHandler.js';
|
|
8
|
+
import { NoDeltasChannelServices } from './shimChannelServices.js';
|
|
5
9
|
import { StampDeltaConnection } from './shimDeltaConnection.js';
|
|
6
10
|
import { ShimHandle } from './shimHandle.js';
|
|
7
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeShim.js","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShim.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sharedTreeShim.js","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShim.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAe7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAA6B,uBAAuB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B;QAC5C,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AttachState } from '@fluidframework/container-definitions';\nimport { type IFluidHandle, type IFluidLoadable } from '@fluidframework/core-interfaces';\nimport { assert } from '@fluidframework/core-utils/internal';\nimport {\n\ttype IChannelAttributes,\n\ttype IChannelFactory,\n\ttype IChannelServices,\n\ttype IFluidDataStoreRuntime,\n} from '@fluidframework/datastore-definitions';\nimport {\n\ttype IExperimentalIncrementalSummaryContext,\n\ttype IGarbageCollectionData,\n\ttype ISummaryTreeWithStats,\n\ttype ITelemetryContext,\n} from '@fluidframework/runtime-definitions';\nimport { type ITree } from '@fluidframework/tree';\n\nimport { SharedTreeShimDeltaHandler } from './sharedTreeDeltaHandler.js';\nimport { type IShimChannelServices, NoDeltasChannelServices } from './shimChannelServices.js';\nimport { StampDeltaConnection } from './shimDeltaConnection.js';\nimport { ShimHandle } from './shimHandle.js';\nimport { type IShim } from './types.js';\n\n/**\n * SharedTreeShim is loaded by clients that join after the migration completes, and holds the new SharedTree.\n *\n * @remarks\n *\n * Its sole responsibility should be to drop v1 & migrate ops. It should not be responsible for any other migration\n * logic. This should make the classes easier to reason about.\n * about.\n *\n * @internal\n */\nexport class SharedTreeShim implements IShim {\n\tpublic constructor(\n\t\tpublic readonly id: string,\n\t\tpublic readonly runtime: IFluidDataStoreRuntime,\n\t\tpublic readonly sharedTreeFactory: IChannelFactory\n\t) {\n\t\tthis.newTreeShimDeltaHandler = new SharedTreeShimDeltaHandler(sharedTreeFactory.attributes);\n\t\tthis.handle = new ShimHandle<SharedTreeShim>(this);\n\t}\n\n\tprivate readonly newTreeShimDeltaHandler: SharedTreeShimDeltaHandler;\n\tprivate services?: IChannelServices;\n\tprivate _currentTree?: ITree;\n\tpublic get currentTree(): ITree {\n\t\tassert(this._currentTree !== undefined, 0x7ed /* No current tree initialized */);\n\t\treturn this._currentTree;\n\t}\n\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn this.currentTree.attributes;\n\t}\n\n\tpublic handle: IFluidHandle<SharedTreeShim>;\n\tpublic get IFluidLoadable(): IFluidLoadable {\n\t\treturn this;\n\t}\n\tpublic getAttachSummary(\n\t\tfullTree?: boolean | undefined,\n\t\ttrackState?: boolean | undefined,\n\t\ttelemetryContext?: ITelemetryContext | undefined\n\t): ISummaryTreeWithStats {\n\t\treturn this.currentTree.getAttachSummary(fullTree, trackState, telemetryContext);\n\t}\n\tpublic async summarize(\n\t\tfullTree?: boolean | undefined,\n\t\ttrackState?: boolean | undefined,\n\t\ttelemetryContext?: ITelemetryContext | undefined,\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext | undefined\n\t): Promise<ISummaryTreeWithStats> {\n\t\treturn this.currentTree.summarize(fullTree, trackState, telemetryContext, incrementalSummaryContext);\n\t}\n\tpublic isAttached(): boolean {\n\t\treturn this.currentTree.isAttached();\n\t}\n\tpublic connect(services: IChannelServices): void {\n\t\tconst shimServices = this.generateShimServicesOnce(services);\n\t\treturn this.currentTree.connect(shimServices);\n\t}\n\n\t// The goal here is to mimic the SharedObject.load functionality\n\tpublic async load(services: IChannelServices): Promise<void> {\n\t\t// This weird shimServices logic is to enable rehydration of the SharedTreeShim from a snapshot in a detached\n\t\t// state.\n\t\tconst shimServices =\n\t\t\tthis.runtime.attachState === AttachState.Detached\n\t\t\t\t? new NoDeltasChannelServices(services)\n\t\t\t\t: this.generateShimServicesOnce(services);\n\t\tthis._currentTree = (await this.sharedTreeFactory.load(\n\t\t\tthis.runtime,\n\t\t\tthis.id,\n\t\t\tshimServices,\n\t\t\tthis.sharedTreeFactory.attributes\n\t\t)) as ITree;\n\t}\n\n\tpublic create(): void {\n\t\tthis._currentTree = this.sharedTreeFactory.create(this.runtime, this.id) as ITree;\n\t}\n\n\tprivate generateShimServicesOnce(services: IChannelServices): IShimChannelServices {\n\t\tassert(this.services === undefined, 0x7ee /* Already connected */);\n\t\tthis.services = services;\n\t\tconst shimServices = {\n\t\t\tobjectStorage: this.services.objectStorage,\n\t\t\tdeltaConnection: new StampDeltaConnection(\n\t\t\t\tthis.services.deltaConnection,\n\t\t\t\tthis.newTreeShimDeltaHandler,\n\t\t\t\tthis.sharedTreeFactory.attributes\n\t\t\t),\n\t\t};\n\t\treturn shimServices;\n\t}\n\n\tpublic getGCData(fullGC?: boolean | undefined): IGarbageCollectionData {\n\t\treturn this.currentTree.getGCData(fullGC);\n\t}\n}\n"]}
|
|
@@ -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 { type IChannelAttributes, type
|
|
5
|
+
import { type IChannelAttributes, type IChannelFactory, type IChannelServices, type IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
6
6
|
import { SharedTreeShim } from './sharedTreeShim.js';
|
|
7
7
|
/**
|
|
8
8
|
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedTreeShim}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeShimFactory.d.ts","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"sharedTreeShimFactory.d.ts","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD;;;;;;;;;;;;GAYG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,eAAe;IAE5D;;;;;OAKG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;;;OAKG;IACH,IAAW,UAAU,IAAI,kBAAkB,CAE1C;IAED;;;;OAIG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,cAAc,CAAC;IAQ1B;;;;;OAKG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,cAAc;CAK1E"}
|
|
@@ -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 { assert } from '@fluidframework/core-utils';
|
|
5
|
+
import { assert } from '@fluidframework/core-utils/internal';
|
|
6
6
|
import { SharedTreeShim } from './sharedTreeShim.js';
|
|
7
7
|
import { attributesMatch } from './utils.js';
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeShimFactory.js","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sharedTreeShimFactory.js","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAQ7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,qBAAqB;IACjC,YAAoC,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;IAAG,CAAC;IAEhE;;;;;OAKG;IACH,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,oKAAoK;QACpK,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAClG,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACrE,MAAM,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,OAAO,cAAc,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACrE,cAAc,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,cAAc,CAAC;IACvB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from '@fluidframework/core-utils/internal';\nimport {\n\ttype IChannelAttributes,\n\ttype IChannelFactory,\n\ttype IChannelServices,\n\ttype IFluidDataStoreRuntime,\n} from '@fluidframework/datastore-definitions';\n\nimport { SharedTreeShim } from './sharedTreeShim.js';\nimport { attributesMatch } from './utils.js';\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedTreeShim}.\n *\n * Creates the migration shim that allows a migration from legacy shared tree to shared tree.\n * Note: There may be a need for 3 different factories for different parts of the migration.\n * That or three different shims. Potentially we can just do 2 as 2 and 3 can be combined.\n * 1. pre-migration\n * 2. after a summary has been generated but there may still be potential v1 ops\n * 3. post-migration after a summary has been generated and the msn has moved far enough forward for only v2 ops\n *\n * @sealed\n * @internal\n */\nexport class SharedTreeShimFactory implements IChannelFactory {\n\tpublic constructor(private readonly factory: IChannelFactory) {}\n\n\t/**\n\t * Can only load the new SharedTree - this allows our snapshots to be simple. We do not have to consider any new\n\t * unique snapshot formats and how to load from them.\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn this.factory.type;\n\t}\n\n\t/**\n\t * Should be the new SharedTree attributes - this should indicate what type of tree snapshot we are expecting or\n\t * are capable of loading from.\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn this.factory.attributes;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.load}\n\t *\n\t * Should be loading the SharedTreeShim from a new SharedTree snapshot only.\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes\n\t): Promise<SharedTreeShim> {\n\t\t// TODO: remove attributes check and move it to an automated test that constructing a SharedTreeShimFactory and checking its attributes/type matches the oldFactory.\n\t\tassert(attributesMatch(attributes, this.factory.attributes), 0x7ef /* Attributes do not match */);\n\t\tconst sharedTreeShim = new SharedTreeShim(id, runtime, this.factory);\n\t\tawait sharedTreeShim.load(services);\n\t\treturn sharedTreeShim;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.create}\n\t *\n\t * Should be only creating the SharedTreeShim, which will only generate a new SharedTree snapshot. That way we do\n\t * not have the capability of accidentally creating a LegacySharedTree snapshot.\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): SharedTreeShim {\n\t\tconst sharedTreeShim = new SharedTreeShim(id, runtime, this.factory);\n\t\tsharedTreeShim.create();\n\t\treturn sharedTreeShim;\n\t}\n}\n"]}
|
|
@@ -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 { type
|
|
5
|
+
import { type IChannelServices, type IChannelStorageService, type IDeltaConnection } from '@fluidframework/datastore-definitions';
|
|
6
6
|
/**
|
|
7
7
|
* ShimChannelServices wraps an existing IChannelServices object and provides a new ShimDeltaConnection
|
|
8
8
|
* object in place of the original deltaConnection object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shimChannelServices.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimChannelServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,
|
|
1
|
+
{"version":3,"file":"shimChannelServices.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimChannelServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,MAAM,uCAAuC,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC7D,QAAQ,CAAC,aAAa,EAAE,sBAAsB,CAAC;IAC/C,QAAQ,CAAC,eAAe,EAAE,gBAAgB,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,uBAAwB,YAAW,gBAAgB;gBAC5C,eAAe,EAAE,gBAAgB;IAIpD,IAAW,eAAe,IAAI,gBAAgB,CAE7C;IACD,SAAgB,aAAa,EAAE,sBAAsB,CAAC;CACtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shimChannelServices.js","sourceRoot":"","sources":["../../src/migration-shim/shimChannelServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,uBAAuB;IACnC,YAAmB,eAAiC;QACnD,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC,aAAa,CAAC;IACpD,CAAC;IAED,IAAW,eAAe;QACzB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IACjD,CAAC;CAED","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype
|
|
1
|
+
{"version":3,"file":"shimChannelServices.js","sourceRoot":"","sources":["../../src/migration-shim/shimChannelServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,uBAAuB;IACnC,YAAmB,eAAiC;QACnD,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC,aAAa,CAAC;IACpD,CAAC;IAED,IAAW,eAAe;QACzB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IACjD,CAAC;CAED","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype IChannelServices,\n\ttype IChannelStorageService,\n\ttype IDeltaConnection,\n} from '@fluidframework/datastore-definitions';\n\n/**\n * ShimChannelServices wraps an existing IChannelServices object and provides a new ShimDeltaConnection\n * object in place of the original deltaConnection object.\n *\n * ShimChannelServices allows us to encapsulate all the wrapping logic without having to modify the original services.\n *\n * At some point, in the SharedObject code we call this.services.deltaConnection.attach(this.handler). Therefore before\n * we call attach, we need to swap out the deltaConnection object for the ShimDeltaConnection object. This makes\n * it consistent as we will always be passing this shim\n */\nexport interface IShimChannelServices extends IChannelServices {\n\treadonly objectStorage: IChannelStorageService;\n\treadonly deltaConnection: IDeltaConnection;\n}\n\n/**\n * NoDeltasChannelServices wraps an existing IChannelServices object. During rehydration of a container, loading in a\n * detached state, we only want to connect to the deltaConnection once on attached. We also only want to set the\n * channel services once. This enables us to allow deltaHandler attach only once, even though there are flows that\n * call only load, only connect, and load and then connect.\n *\n * Steps:\n * 1. Rehydrate/load SharedObject in detached container runtime state\n * 2. Attach detached container runtime\n * 3. Connect SharedObject.\n *\n * Refer to SharedObject.load for the scenario.\n *\n * This potentially can be baked into the ShimChannelServices.\n *\n * TODO: convert this to a test and remove usage of this class\n */\nexport class NoDeltasChannelServices implements IChannelServices {\n\tpublic constructor(channelServices: IChannelServices) {\n\t\tthis.objectStorage = channelServices.objectStorage;\n\t}\n\n\tpublic get deltaConnection(): IDeltaConnection {\n\t\tthrow new Error('No deltaConnection available');\n\t}\n\tpublic readonly objectStorage: IChannelStorageService;\n}\n"]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type IFluidHandle } from '@fluidframework/core-interfaces';
|
|
6
6
|
import { type IChannelAttributes, type IDeltaConnection, type IDeltaHandler } from '@fluidframework/datastore-definitions';
|
|
7
|
-
import { type
|
|
7
|
+
import { type IShimDeltaHandler, type IUnstampedContents } from './types.js';
|
|
8
8
|
/**
|
|
9
9
|
* Represents a connection to a Shim data store that can receive and submit deltas.
|
|
10
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shimDeltaConnection.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"shimDeltaConnection.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KA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 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { assert } from '@fluidframework/core-utils';
|
|
5
|
+
import { assert } from '@fluidframework/core-utils/internal';
|
|
6
6
|
/**
|
|
7
7
|
* Represents a connection to a Shim data store that can receive and submit deltas.
|
|
8
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shimDeltaConnection.js","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"shimDeltaConnection.js","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAS7D;;;;;;;;;GASG;AACH,MAAM,OAAO,2BAA2B;IACvC,YACkB,eAAiC,EACjC,gBAAmC;QADnC,oBAAe,GAAf,eAAe,CAAkB;QACjC,qBAAgB,GAAhB,gBAAgB,CAAmB;QAO7C,cAAS,GAAG,IAAI,CAAC;IANtB,CAAC;IAEJ,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;IACvC,CAAC;IAGM,aAAa;QACnB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,gCAAgC;IACzB,MAAM,CAAC,cAAuB,EAAE,eAAwB;QAC9D,IAAI,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;SAC7D;QACD,gFAAgF;IACjF,CAAC;IAED,mHAAmH;IACnH,uEAAuE;IAChE,MAAM,CAAC,OAAsB;QACnC,wGAAwG;QACxG,6GAA6G;QAC7G,+EAA+E;QAC/E,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,OAAO,CAAC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AC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACnD,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;SACrC;IACF,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACI,wBAAwB,CAAE,SAAuB,EAAE,cAA4B;QACrF,IAAI,CAAC,eAAe,CAAC,wBAAwB,EAAE,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAC5E,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IFluidHandle } from '@fluidframework/core-interfaces';\nimport { assert } from '@fluidframework/core-utils/internal';\nimport {\n\ttype IChannelAttributes,\n\ttype IDeltaConnection,\n\ttype IDeltaHandler,\n} from '@fluidframework/datastore-definitions';\n\nimport { type IShimDeltaHandler, type IUnstampedContents } from './types.js';\n\n/**\n * Represents a connection to a Shim data store that can receive and submit deltas.\n *\n * This allows the Shim class to swap out the delta handler on the fly.\n *\n * The PreMigrationDeltaConnection does not stamp ops so that those ops can be considered v1 ops.\n *\n * This special logic allows for connect to be called for the underlying new SharedObject without the need for\n * modifications on the current ChannelDeltaConnection.\n */\nexport class PreMigrationDeltaConnection implements IDeltaConnection {\n\tpublic constructor(\n\t\tprivate readonly deltaConnection: IDeltaConnection,\n\t\tprivate readonly shimDeltaHandler: IShimDeltaHandler\n\t) {}\n\n\tpublic get connected(): boolean {\n\t\treturn this.deltaConnection.connected;\n\t}\n\n\tprivate canSubmit = true;\n\tpublic disableSubmit(): void {\n\t\tthis.canSubmit = false;\n\t}\n\n\t// This is for submitting v1 ops\n\tpublic submit(messageContent: unknown, localOpMetadata: unknown): void {\n\t\tif (this.canSubmit) {\n\t\t\tthis.deltaConnection.submit(messageContent, localOpMetadata);\n\t\t}\n\t\t// We don't want to throw so we can revert local changes on the LegacySharedTree\n\t}\n\n\t// We only want to call attach on the underlying delta connection once, as we'll hit an assert if we call it twice.\n\t// Note: SharedObject.load calls attach as well as SharedObject.connect\n\tpublic attach(handler: IDeltaHandler): void {\n\t\t// There are essentially two delta handlers that process ops, the shim delta handler to process shim ops\n\t\t// preventing them from being processed by the tree delta handler, and the tree delta handler to process tree\n\t\t// ops. Post migration v1 ops can be considered \"shim\" ops as they are dropped.\n\t\tthis.shimDeltaHandler.attachTreeDeltaHandler(handler);\n\t\tif (!this.shimDeltaHandler.attached) {\n\t\t\tthis.deltaConnection.attach(this.shimDeltaHandler);\n\t\t\tthis.shimDeltaHandler.markAttached();\n\t\t}\n\t}\n\tpublic dirty(): void {\n\t\tthis.deltaConnection.dirty();\n\t}\n\n\t/**\n\t * Passes through to the underlying delta connection.\n\t *\n\t * @deprecated There is no replacement for this, its functionality is no longer needed at this layer.\n\t * It will be removed in a future release, sometime after 2.0.0-internal.8.0.0\n\t *\n\t * @privateRemarks This needs to be more thoroughly thought through. What happens when the source handle is changed?\n\t */\n\tpublic addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void {\n\t\tthis.deltaConnection.addedGCOutboundReference?.(srcHandle, outboundHandle);\n\t}\n}\n\n/**\n * A delta connection that stamps ops with a particular channel attributes so that those ops won't get dropped\n */\nexport class StampDeltaConnection implements IDeltaConnection {\n\tpublic constructor(\n\t\tprivate readonly deltaConnection: IDeltaConnection,\n\t\tprivate readonly shimDeltaHandler: IShimDeltaHandler,\n\t\tprivate readonly attributes: IChannelAttributes\n\t) {}\n\n\tpublic get connected(): boolean {\n\t\treturn this.deltaConnection.connected;\n\t}\n\n\t// This is for submitting v2 ops\n\tpublic submit(messageContent: IUnstampedContents, localOpMetadata: unknown): void {\n\t\tassert(messageContent.fluidMigrationStamp === undefined, 0x835 /* Should not be stamping ops twice! */);\n\t\tmessageContent.fluidMigrationStamp = {\n\t\t\t...this.attributes,\n\t\t};\n\t\tthis.deltaConnection.submit(messageContent, localOpMetadata);\n\t}\n\n\t/**\n\t * For the MigrationShim because we only attach once to the actual delta connection, we store state in the\n\t * migrationDeltaHandler to know if we've already attached. We will call attach once on the\n\t * PreMigrationDeltaConnection and once on the StampDeltaConnection.\n\t *\n\t * The SharedTreeShim should not be swapping delta connections and thus the if statement should always be executed.\n\t *\n\t * @param handler - this delta handler can only connect once.\n\t */\n\tpublic attach(handler: IDeltaHandler): void {\n\t\t// Maybe put an assert here to only call attach once?\n\t\tthis.shimDeltaHandler.attachTreeDeltaHandler(handler);\n\t\tif (!this.shimDeltaHandler.attached) {\n\t\t\tthis.deltaConnection.attach(this.shimDeltaHandler);\n\t\t\tthis.shimDeltaHandler.markAttached();\n\t\t}\n\t}\n\n\tpublic dirty(): void {\n\t\tthis.deltaConnection.dirty();\n\t}\n\n\t/**\n\t * Passes through to the underlying delta connection.\n\t *\n\t * @deprecated There is no replacement for this, its functionality is no longer needed at this layer.\n\t * It will be removed in a future release, sometime after 2.0.0-internal.8.0.0\n\t *\n\t * @privateRemarks This needs to be more thoroughly thought through. What happens when the source handle is changed?\n\t */\n\tpublic addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void {\n\t\tthis.deltaConnection.addedGCOutboundReference?.(srcHandle, outboundHandle);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shimHandle.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"shimHandle.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;GAOG;AACH,qBAAa,UAAU,CAAC,KAAK,SAAS,KAAK,CAAE,YAAW,YAAY,CAAC,KAAK,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,KAAK;IAE/C,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,IAAW,UAAU,IAAI,OAAO,CAE/B;IACM,WAAW,IAAI,IAAI;IAGb,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;IAG3B,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAGvC,IAAW,YAAY,IAAI,YAAY,CAAC,KAAK,CAAC,CAE7C;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shimHandle.js","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"shimHandle.js","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;;;;GAOG;AACH,MAAM,OAAO,UAAU;IACtB,YAAoC,IAAW;QAAX,SAAI,GAAJ,IAAI,CAAO;IAAG,CAAC;IAEnD,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC;IAClD,CAAC;IACD,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;IAChD,CAAC;IACM,WAAW;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;IACnD,CAAC;IACM,KAAK,CAAC,GAAG;QACf,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IACM,IAAI,CAAC,MAAoB;QAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;IACD,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IFluidHandle } from '@fluidframework/core-interfaces';\n\nimport { type IShim } from './types.js';\n\n/**\n * ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.\n *\n * ShimHandle is designed for MigrationShim and SharedTreeShim.\n *\n * Local handles such as the FluidObjectHandle and the SharedObjectHandle don't work as they do not properly bind the\n * Shim's underlying DDS.\n */\nexport class ShimHandle<TShim extends IShim> implements IFluidHandle<TShim> {\n\tpublic constructor(private readonly shim: TShim) {}\n\n\tpublic get absolutePath(): string {\n\t\treturn this.shim.currentTree.handle.absolutePath;\n\t}\n\tpublic get isAttached(): boolean {\n\t\treturn this.shim.currentTree.handle.isAttached;\n\t}\n\tpublic attachGraph(): void {\n\t\treturn this.shim.currentTree.handle.attachGraph();\n\t}\n\tpublic async get(): Promise<TShim> {\n\t\treturn this.shim;\n\t}\n\tpublic bind(handle: IFluidHandle): void {\n\t\treturn this.shim.currentTree.handle.bind(handle);\n\t}\n\tpublic get IFluidHandle(): IFluidHandle<TShim> {\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { type ITree } from '@fluidframework/tree';
|
|
6
5
|
import { type IChannel, type IChannelAttributes, type IChannelServices, type IDeltaHandler } from '@fluidframework/datastore-definitions';
|
|
6
|
+
import { type ITree } from '@fluidframework/tree';
|
|
7
7
|
import { type SharedTree as LegacySharedTree } from '../SharedTree.js';
|
|
8
8
|
import { type IMigrationOp } from './migrationShim.js';
|
|
9
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype IChannel,\n\ttype IChannelAttributes,\n\ttype IChannelServices,\n\ttype IDeltaHandler,\n} from '@fluidframework/datastore-definitions';\nimport { type ITree } from '@fluidframework/tree';\n\nimport { type SharedTree as LegacySharedTree } from '../SharedTree.js';\n\nimport { type IMigrationOp } from './migrationShim.js';\n\n/**\n * An interface for a shim delta handler intercepts another delta handler.\n *\n * @internal\n */\nexport interface IShimDeltaHandler extends IDeltaHandler {\n\t/**\n\t * Provide the real tree delta handler (either legacy or new) to the shim that will be used to process the tree ops.\n\t * @param treeDeltaHandler - The appropriate tree delta handler.\n\t */\n\tattachTreeDeltaHandler(treeDeltaHandler: IDeltaHandler): void;\n\n\t/**\n\t * The delta handler needs to be attached to the IShimDeltaHandler before attaching it to the delta connection.\n\t * Otherwise the IShimDeltaHandler will not be able to process ops.\n\t */\n\thasTreeDeltaHandler(): boolean;\n\n\tattached: boolean;\n\n\tmarkAttached(): void;\n}\n\n/**\n * A v1 op or a v2 unstamped op\n */\nexport interface IUnstampedContents {\n\tfluidMigrationStamp?: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A v2 op will have a `fluidMigrationStamp` property. This is a type guard to check if the op is a v2 op.\n */\nexport interface IStampedContents {\n\tfluidMigrationStamp: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A type for interrogating ops to see if they are v2 stamped ops or migrate ops. Otherwise, we try not to care\n * what the contents of the op are. The contents could be of type `any` or `unknown`.\n *\n * If `type` specifically === \"barrier\", then we know we are dealing with a barrier op\n *\n * If `fluidMigrationStamp` is present, then we know we are dealing with a v2 op\n *\n * @internal\n */\nexport type IOpContents = IStampedContents | IUnstampedContents | IMigrationOp;\n\n/**\n * An interface for a shim channel that intercepts a LegacySharedTree or new SharedTree DDS.\n *\n * @internal\n */\nexport interface IShim extends IChannel {\n\tcreate(): void;\n\tload(channelServices: IChannelServices): Promise<void>;\n\tcurrentTree: ITree | LegacySharedTree;\n}\n"]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { type IChannelAttributes } from '@fluidframework/datastore-definitions';
|
|
6
|
-
import { type IStampedContents, type IOpContents } from './types.js';
|
|
7
6
|
import { type IMigrationOp } from './migrationShim.js';
|
|
7
|
+
import { type IOpContents, type IStampedContents } from './types.js';
|
|
8
8
|
/**
|
|
9
9
|
* Checks if two channel attributes objects match.
|
|
10
10
|
* @param attributes1 - The first channel attributes object to compare.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAMzG;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,IAAI,YAAY,CAE3E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,IAAI,gBAAgB,CAE/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,WAA+B,EAAE,WAA+B;IAC/F,OAAO,CACN,WAAW,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI;QACrC,WAAW,CAAC,cAAc,KAAK,WAAW,CAAC,cAAc;QACzD,WAAW,CAAC,qBAAqB,KAAK,WAAW,CAAC,qBAAqB,CACvE,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAqB;IAChD,OAAO,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAqB;IAChD,OAAO,qBAAqB,IAAI,QAAQ,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IChannelAttributes } from '@fluidframework/datastore-definitions';\n\nimport { type IMigrationOp } from './migrationShim.js';\nimport { type IOpContents, type IStampedContents } from './types.js';\n\n/**\n * Checks if two channel attributes objects match.\n * @param attributes1 - The first channel attributes object to compare.\n * @param attributes2 - The second channel attributes object to compare.\n * @returns True if the two channel attributes objects match, false otherwise.\n */\nexport function attributesMatch(attributes1: IChannelAttributes, attributes2: IChannelAttributes): boolean {\n\treturn (\n\t\tattributes1.type === attributes2.type &&\n\t\tattributes1.packageVersion === attributes2.packageVersion &&\n\t\tattributes1.snapshotFormatVersion === attributes2.snapshotFormatVersion\n\t);\n}\n\n/**\n * Checks if the given op is a barrier op.\n * @param contents - The op to check.\n * @returns True if the op is a barrier op, false otherwise.\n */\nexport function isBarrierOp(contents: IOpContents): contents is IMigrationOp {\n\treturn contents.type === 'barrier';\n}\n\n/**\n * Checks if the given op is a barrier op.\n * @param contents - The op to check.\n * @returns True if the op is a barrier op, false otherwise.\n */\nexport function isStampedOp(contents: IOpContents): contents is IStampedContents {\n\treturn 'fluidMigrationStamp' in contents;\n}\n"]}
|
|
@@ -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 type {
|
|
5
|
+
import type { Definition, DetachedSequenceId, EditId, NodeId, StableNodeId, TraitLabel, UuidString } from '../Identifiers.js';
|
|
6
6
|
/**
|
|
7
7
|
* Defines a place relative to sibling.
|
|
8
8
|
* The "outside" of a trait is the `undefined` sibling,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0.0.2.d.ts","sourceRoot":"","sources":["../../src/persisted-types/0.0.2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,
|
|
1
|
+
{"version":3,"file":"0.0.2.d.ts","sourceRoot":"","sources":["../../src/persisted-types/0.0.2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,UAAU,EACV,kBAAkB,EAClB,MAAM,EACN,MAAM,EACN,YAAY,EACZ,UAAU,EACV,UAAU,EACV,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,IAAI;IACf,MAAM,IAAI;IACV,KAAK,IAAI;CACT;AAED;;;;GAIG;AACH,MAAM,WAAW,IAAI,CAAC,OAAO,CAAE,SAAQ,QAAQ,CA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