@fluidframework/tree 2.12.0 → 2.13.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 +136 -0
- package/api-report/tree.alpha.api.md +86 -10
- package/api-report/tree.beta.api.md +22 -10
- package/api-report/tree.legacy.alpha.api.md +22 -10
- package/api-report/tree.legacy.public.api.md +22 -10
- package/api-report/tree.public.api.md +22 -10
- package/dist/alpha.d.ts +11 -0
- package/dist/beta.d.ts +2 -0
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +10 -0
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +3 -0
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +0 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +2 -4
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js +8 -2
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +12 -5
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +2 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +89 -25
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +12 -0
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +24 -4
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +14 -5
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +2 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +2 -0
- package/dist/shared-tree/index.d.ts +2 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +2 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +10 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +43 -0
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +6 -3
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +3 -1
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/transactionTypes.d.ts +105 -0
- package/dist/shared-tree/transactionTypes.d.ts.map +1 -0
- package/dist/shared-tree/transactionTypes.js +13 -0
- package/dist/shared-tree/transactionTypes.js.map +1 -0
- package/dist/shared-tree/treeApi.d.ts +1 -25
- package/dist/shared-tree/treeApi.d.ts.map +1 -1
- package/dist/shared-tree/treeApi.js +4 -8
- package/dist/shared-tree/treeApi.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +4 -1
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +130 -15
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +1 -0
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +3 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/jsonSchema.d.ts +6 -0
- package/dist/simple-tree/api/jsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/jsonSchema.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +21 -12
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +5 -2
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +83 -0
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -0
- package/dist/simple-tree/api/schemaFactoryAlpha.js +90 -0
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -0
- package/dist/simple-tree/api/simpleSchema.d.ts +5 -1
- package/dist/simple-tree/api/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchema.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +13 -10
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/testRecursiveDomain.d.ts +5 -5
- package/dist/simple-tree/api/tree.d.ts +60 -0
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +11 -11
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/dist/simple-tree/arrayNode.d.ts +2 -2
- package/dist/simple-tree/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/arrayNode.js +2 -1
- package/dist/simple-tree/arrayNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +10 -6
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +2 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +3 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +5 -5
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/mapNode.d.ts +2 -2
- package/dist/simple-tree/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/mapNode.js +2 -1
- package/dist/simple-tree/mapNode.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts +2 -2
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +2 -1
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/objectNodeTypes.d.ts +2 -2
- package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/objectNodeTypes.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +47 -1
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/util/index.d.ts +2 -2
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +3 -5
- package/dist/util/index.js.map +1 -1
- package/dist/util/rangeMap.d.ts +72 -42
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +161 -151
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/utils.d.ts +22 -1
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +10 -1
- package/dist/util/utils.js.map +1 -1
- package/lib/alpha.d.ts +11 -0
- package/lib/beta.d.ts +2 -0
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +10 -0
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +3 -0
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +0 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +0 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js +9 -3
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +12 -5
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +2 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +89 -25
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +12 -0
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +24 -4
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +14 -5
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +2 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +2 -0
- package/lib/shared-tree/index.d.ts +2 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +2 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +10 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +46 -3
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +6 -3
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +3 -1
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/transactionTypes.d.ts +105 -0
- package/lib/shared-tree/transactionTypes.d.ts.map +1 -0
- package/lib/shared-tree/transactionTypes.js +10 -0
- package/lib/shared-tree/transactionTypes.js.map +1 -0
- package/lib/shared-tree/treeApi.d.ts +1 -25
- package/lib/shared-tree/treeApi.d.ts.map +1 -1
- package/lib/shared-tree/treeApi.js +1 -5
- package/lib/shared-tree/treeApi.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +4 -1
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +130 -15
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +1 -0
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +1 -0
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/jsonSchema.d.ts +6 -0
- package/lib/simple-tree/api/jsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/jsonSchema.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +21 -12
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +5 -2
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +83 -0
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -0
- package/lib/simple-tree/api/schemaFactoryAlpha.js +86 -0
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -0
- package/lib/simple-tree/api/simpleSchema.d.ts +5 -1
- package/lib/simple-tree/api/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchema.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +14 -11
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/testRecursiveDomain.d.ts +5 -5
- package/lib/simple-tree/api/tree.d.ts +60 -0
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +12 -12
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/lib/simple-tree/arrayNode.d.ts +2 -2
- package/lib/simple-tree/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/arrayNode.js +2 -1
- package/lib/simple-tree/arrayNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +10 -6
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +2 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +5 -5
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/mapNode.d.ts +2 -2
- package/lib/simple-tree/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/mapNode.js +2 -1
- package/lib/simple-tree/mapNode.js.map +1 -1
- package/lib/simple-tree/objectNode.d.ts +2 -2
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +2 -1
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/objectNodeTypes.d.ts +2 -2
- package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/objectNodeTypes.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +47 -1
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/util/index.d.ts +2 -2
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -2
- package/lib/util/index.js.map +1 -1
- package/lib/util/rangeMap.d.ts +72 -42
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +159 -146
- package/lib/util/rangeMap.js.map +1 -1
- package/lib/util/utils.d.ts +22 -1
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +8 -0
- package/lib/util/utils.js.map +1 -1
- package/package.json +22 -22
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +14 -1
- package/src/feature-libraries/index.ts +0 -1
- package/src/feature-libraries/modular-schema/crossFieldQueries.ts +9 -9
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +13 -9
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +4 -2
- package/src/feature-libraries/modular-schema/index.ts +1 -0
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +124 -31
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +12 -0
- package/src/feature-libraries/optional-field/optionalField.ts +34 -5
- package/src/feature-libraries/sequence-field/utils.ts +18 -7
- package/src/index.ts +11 -0
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/index.ts +12 -2
- package/src/shared-tree/schematizingTreeView.ts +91 -2
- package/src/shared-tree/sharedTree.ts +9 -4
- package/src/shared-tree/transactionTypes.ts +125 -0
- package/src/shared-tree/treeApi.ts +1 -28
- package/src/shared-tree/treeCheckout.ts +147 -13
- package/src/shared-tree-core/sharedTreeCore.ts +1 -1
- package/src/simple-tree/api/index.ts +1 -0
- package/src/simple-tree/api/jsonSchema.ts +7 -0
- package/src/simple-tree/api/schemaFactory.ts +33 -6
- package/src/simple-tree/api/schemaFactoryAlpha.ts +253 -0
- package/src/simple-tree/api/simpleSchema.ts +6 -1
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +22 -12
- package/src/simple-tree/api/tree.ts +76 -4
- package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +19 -13
- package/src/simple-tree/arrayNode.ts +7 -1
- package/src/simple-tree/core/treeNodeSchema.ts +51 -7
- package/src/simple-tree/index.ts +3 -0
- package/src/simple-tree/mapNode.ts +7 -1
- package/src/simple-tree/objectNode.ts +7 -1
- package/src/simple-tree/objectNodeTypes.ts +4 -1
- package/src/simple-tree/schemaTypes.ts +50 -1
- package/src/util/index.ts +2 -6
- package/src/util/rangeMap.ts +199 -189
- package/src/util/utils.ts +47 -1
- package/dist/feature-libraries/memoizedIdRangeAllocator.d.ts +0 -38
- package/dist/feature-libraries/memoizedIdRangeAllocator.d.ts.map +0 -1
- package/dist/feature-libraries/memoizedIdRangeAllocator.js +0 -74
- package/dist/feature-libraries/memoizedIdRangeAllocator.js.map +0 -1
- package/lib/feature-libraries/memoizedIdRangeAllocator.d.ts +0 -38
- package/lib/feature-libraries/memoizedIdRangeAllocator.d.ts.map +0 -1
- package/lib/feature-libraries/memoizedIdRangeAllocator.js +0 -71
- package/lib/feature-libraries/memoizedIdRangeAllocator.js.map +0 -1
- package/src/feature-libraries/memoizedIdRangeAllocator.ts +0 -112
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
CrossFieldTarget,
|
|
20
20
|
type NodeId,
|
|
21
21
|
type CrossFieldKeyRange,
|
|
22
|
+
type NestedChangesIndices,
|
|
22
23
|
} from "../modular-schema/index.js";
|
|
23
24
|
|
|
24
25
|
import type {
|
|
@@ -61,15 +62,25 @@ export function createEmpty(): Changeset {
|
|
|
61
62
|
return [];
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
export function getNestedChanges(change: Changeset):
|
|
65
|
-
const output:
|
|
66
|
-
let
|
|
67
|
-
|
|
65
|
+
export function getNestedChanges(change: Changeset): NestedChangesIndices {
|
|
66
|
+
const output: NestedChangesIndices = [];
|
|
67
|
+
let inputIndex = 0;
|
|
68
|
+
let outputIndex = 0;
|
|
69
|
+
for (const mark of change) {
|
|
70
|
+
const { changes, count } = mark;
|
|
68
71
|
if (changes !== undefined) {
|
|
69
|
-
output.push([
|
|
72
|
+
output.push([
|
|
73
|
+
changes,
|
|
74
|
+
!areInputCellsEmpty(mark) ? inputIndex : undefined /* inputIndex */,
|
|
75
|
+
!areOutputCellsEmpty(mark) ? outputIndex : undefined /* outputIndex */,
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
if (!areInputCellsEmpty(mark)) {
|
|
79
|
+
inputIndex += count;
|
|
70
80
|
}
|
|
71
|
-
|
|
72
|
-
|
|
81
|
+
|
|
82
|
+
if (!areOutputCellsEmpty(mark)) {
|
|
83
|
+
outputIndex += count;
|
|
73
84
|
}
|
|
74
85
|
}
|
|
75
86
|
return output;
|
package/src/index.ts
CHANGED
|
@@ -48,6 +48,13 @@ export {
|
|
|
48
48
|
type ViewContent,
|
|
49
49
|
TreeAlpha,
|
|
50
50
|
independentView,
|
|
51
|
+
type RunTransactionParams,
|
|
52
|
+
type VoidTransactionCallbackStatus,
|
|
53
|
+
type TransactionCallbackStatus,
|
|
54
|
+
type TransactionResult,
|
|
55
|
+
type TransactionResultExt,
|
|
56
|
+
type TransactionResultSuccess,
|
|
57
|
+
type TransactionResultFailed,
|
|
51
58
|
} from "./shared-tree/index.js";
|
|
52
59
|
|
|
53
60
|
export {
|
|
@@ -64,6 +71,8 @@ export {
|
|
|
64
71
|
type TreeView,
|
|
65
72
|
type TreeViewEvents,
|
|
66
73
|
SchemaFactory,
|
|
74
|
+
SchemaFactoryAlpha,
|
|
75
|
+
type SchemaFactoryObjectOptions,
|
|
67
76
|
type ImplicitFieldSchema,
|
|
68
77
|
type TreeFieldFromImplicitField,
|
|
69
78
|
type TreeChangeEvents,
|
|
@@ -175,6 +184,8 @@ export {
|
|
|
175
184
|
type TreeBranch,
|
|
176
185
|
type TreeBranchEvents,
|
|
177
186
|
asTreeViewAlpha,
|
|
187
|
+
type NodeSchemaOptions,
|
|
188
|
+
type NodeSchemaMetadata,
|
|
178
189
|
} from "./simple-tree/index.js";
|
|
179
190
|
export {
|
|
180
191
|
SharedTree,
|
package/src/packageVersion.ts
CHANGED
package/src/shared-tree/index.ts
CHANGED
|
@@ -40,11 +40,21 @@ export type { ISharedTreeEditor, ISchemaEditor } from "./sharedTreeEditBuilder.j
|
|
|
40
40
|
export {
|
|
41
41
|
treeApi as Tree,
|
|
42
42
|
type TreeApi,
|
|
43
|
+
type RunTransaction,
|
|
44
|
+
} from "./treeApi.js";
|
|
45
|
+
|
|
46
|
+
export {
|
|
43
47
|
type TransactionConstraint,
|
|
44
48
|
type NodeInDocumentConstraint,
|
|
45
|
-
type
|
|
49
|
+
type RunTransactionParams,
|
|
50
|
+
type VoidTransactionCallbackStatus,
|
|
51
|
+
type TransactionCallbackStatus,
|
|
52
|
+
type TransactionResult,
|
|
53
|
+
type TransactionResultExt,
|
|
54
|
+
type TransactionResultSuccess,
|
|
55
|
+
type TransactionResultFailed,
|
|
46
56
|
rollback,
|
|
47
|
-
} from "./
|
|
57
|
+
} from "./transactionTypes.js";
|
|
48
58
|
|
|
49
59
|
export { TreeAlpha } from "./treeApiAlpha.js";
|
|
50
60
|
|
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
Listenable,
|
|
10
10
|
} from "@fluidframework/core-interfaces/internal";
|
|
11
11
|
import { createEmitter } from "@fluid-internal/client-utils";
|
|
12
|
-
import { assert } from "@fluidframework/core-utils/internal";
|
|
12
|
+
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
13
13
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
14
14
|
|
|
15
15
|
import { AllowedUpdateType, anchorSlot, type SchemaPolicy } from "../core/index.js";
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
ContextSlot,
|
|
20
20
|
cursorForMapTreeNode,
|
|
21
21
|
type FullSchemaPolicy,
|
|
22
|
+
TreeStatus,
|
|
22
23
|
} from "../feature-libraries/index.js";
|
|
23
24
|
import {
|
|
24
25
|
type FieldSchema,
|
|
@@ -43,6 +44,8 @@ import {
|
|
|
43
44
|
type UnsafeUnknownSchema,
|
|
44
45
|
type TreeBranch,
|
|
45
46
|
type TreeBranchEvents,
|
|
47
|
+
getOrCreateInnerNode,
|
|
48
|
+
getKernel,
|
|
46
49
|
} from "../simple-tree/index.js";
|
|
47
50
|
import { Breakable, breakingClass, disposeSymbol, type WithBreakable } from "../util/index.js";
|
|
48
51
|
|
|
@@ -55,6 +58,14 @@ import {
|
|
|
55
58
|
areImplicitFieldSchemaEqual,
|
|
56
59
|
createUnknownOptionalFieldPolicy,
|
|
57
60
|
} from "../simple-tree/index.js";
|
|
61
|
+
import type {
|
|
62
|
+
VoidTransactionCallbackStatus,
|
|
63
|
+
TransactionCallbackStatus,
|
|
64
|
+
TransactionResult,
|
|
65
|
+
TransactionResultExt,
|
|
66
|
+
RunTransactionParams,
|
|
67
|
+
TransactionConstraint,
|
|
68
|
+
} from "./transactionTypes.js";
|
|
58
69
|
|
|
59
70
|
/**
|
|
60
71
|
* Creating multiple tree views from the same checkout is not supported. This slot is used to detect if one already
|
|
@@ -213,6 +224,84 @@ export class SchematizingSimpleTreeView<
|
|
|
213
224
|
return this.view;
|
|
214
225
|
}
|
|
215
226
|
|
|
227
|
+
/**
|
|
228
|
+
* {@inheritDoc @fluidframework/shared-tree#TreeViewAlpha.runTransaction}
|
|
229
|
+
*/
|
|
230
|
+
public runTransaction<TSuccessValue, TFailureValue>(
|
|
231
|
+
transaction: () => TransactionCallbackStatus<TSuccessValue, TFailureValue>,
|
|
232
|
+
params?: RunTransactionParams,
|
|
233
|
+
): TransactionResultExt<TSuccessValue, TFailureValue>;
|
|
234
|
+
/**
|
|
235
|
+
* {@inheritDoc @fluidframework/shared-tree#TreeViewAlpha.runTransaction}
|
|
236
|
+
*/
|
|
237
|
+
public runTransaction(
|
|
238
|
+
transaction: () => VoidTransactionCallbackStatus | void,
|
|
239
|
+
params?: RunTransactionParams,
|
|
240
|
+
): TransactionResult;
|
|
241
|
+
public runTransaction<TSuccessValue, TFailureValue>(
|
|
242
|
+
transaction: () =>
|
|
243
|
+
| TransactionCallbackStatus<TSuccessValue, TFailureValue>
|
|
244
|
+
| VoidTransactionCallbackStatus
|
|
245
|
+
| void,
|
|
246
|
+
params?: RunTransactionParams,
|
|
247
|
+
): TransactionResultExt<TSuccessValue, TFailureValue> | TransactionResult {
|
|
248
|
+
const addConstraints = (
|
|
249
|
+
constraintsOnRevert: boolean,
|
|
250
|
+
constraints: readonly TransactionConstraint[] = [],
|
|
251
|
+
): void => {
|
|
252
|
+
for (const constraint of constraints) {
|
|
253
|
+
switch (constraint.type) {
|
|
254
|
+
case "nodeInDocument": {
|
|
255
|
+
const node = getOrCreateInnerNode(constraint.node);
|
|
256
|
+
const nodeStatus = getKernel(constraint.node).getStatus();
|
|
257
|
+
if (nodeStatus !== TreeStatus.InDocument) {
|
|
258
|
+
const revertText = constraintsOnRevert ? " on revert" : "";
|
|
259
|
+
throw new UsageError(
|
|
260
|
+
`Attempted to add a "nodeInDocument" constraint${revertText}, but the node is not currently in the document. Node status: ${nodeStatus}`,
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
if (constraintsOnRevert) {
|
|
264
|
+
this.checkout.editor.addNodeExistsConstraintOnRevert(node.anchorNode);
|
|
265
|
+
} else {
|
|
266
|
+
this.checkout.editor.addNodeExistsConstraint(node.anchorNode);
|
|
267
|
+
}
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
default:
|
|
271
|
+
unreachableCase(constraint.type);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
this.checkout.transaction.start();
|
|
277
|
+
|
|
278
|
+
// Validate preconditions before running the transaction callback.
|
|
279
|
+
addConstraints(false /* constraintsOnRevert */, params?.preconditions);
|
|
280
|
+
const transactionCallbackStatus = transaction();
|
|
281
|
+
const rollback = transactionCallbackStatus?.rollback;
|
|
282
|
+
const value = (
|
|
283
|
+
transactionCallbackStatus as TransactionCallbackStatus<TSuccessValue, TFailureValue>
|
|
284
|
+
)?.value;
|
|
285
|
+
|
|
286
|
+
if (rollback === true) {
|
|
287
|
+
this.checkout.transaction.abort();
|
|
288
|
+
return value !== undefined
|
|
289
|
+
? { success: false, value: value as TFailureValue }
|
|
290
|
+
: { success: false };
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Validate preconditions on revert after running the transaction callback and was successful.
|
|
294
|
+
addConstraints(
|
|
295
|
+
true /* constraintsOnRevert */,
|
|
296
|
+
transactionCallbackStatus?.preconditionsOnRevert,
|
|
297
|
+
);
|
|
298
|
+
|
|
299
|
+
this.checkout.transaction.commit();
|
|
300
|
+
return value !== undefined
|
|
301
|
+
? { success: true, value: value as TSuccessValue }
|
|
302
|
+
: { success: true };
|
|
303
|
+
}
|
|
304
|
+
|
|
216
305
|
private ensureUndisposed(): void {
|
|
217
306
|
if (this.disposed) {
|
|
218
307
|
this.failDisposed();
|
|
@@ -383,7 +472,7 @@ export class SchematizingSimpleTreeView<
|
|
|
383
472
|
|
|
384
473
|
// #region Branching
|
|
385
474
|
|
|
386
|
-
public fork(): ReturnType<TreeBranch["fork"]> &
|
|
475
|
+
public fork(): ReturnType<TreeBranch["fork"]> & SchematizingSimpleTreeView<TRootSchema> {
|
|
387
476
|
return this.checkout.branch().viewWith(this.config);
|
|
388
477
|
}
|
|
389
478
|
|
|
@@ -229,7 +229,7 @@ export class SharedTree
|
|
|
229
229
|
id: string,
|
|
230
230
|
runtime: IFluidDataStoreRuntime,
|
|
231
231
|
attributes: IChannelAttributes,
|
|
232
|
-
optionsParam:
|
|
232
|
+
optionsParam: SharedTreeOptionsInternal,
|
|
233
233
|
telemetryContextPrefix: string = "fluid_sharedTree_",
|
|
234
234
|
) {
|
|
235
235
|
if (runtime.idCompressor === undefined) {
|
|
@@ -333,6 +333,7 @@ export class SharedTree
|
|
|
333
333
|
chunkCompressionStrategy: options.treeEncodeType,
|
|
334
334
|
logger: this.logger,
|
|
335
335
|
breaker: this.breaker,
|
|
336
|
+
disposeForksAfterTransaction: options.disposeForksAfterTransaction,
|
|
336
337
|
},
|
|
337
338
|
);
|
|
338
339
|
|
|
@@ -459,7 +460,7 @@ export class SharedTree
|
|
|
459
460
|
): void {
|
|
460
461
|
assert(
|
|
461
462
|
!this.checkout.transaction.isInProgress(),
|
|
462
|
-
|
|
463
|
+
0xaa6 /* Cannot submit a commit while a transaction is in progress */,
|
|
463
464
|
);
|
|
464
465
|
if (isResubmit) {
|
|
465
466
|
return super.submitCommit(commit, schemaAndPolicy, isResubmit);
|
|
@@ -555,6 +556,9 @@ export type SharedTreeOptions = Partial<ICodecOptions> &
|
|
|
555
556
|
Partial<SharedTreeFormatOptions> &
|
|
556
557
|
ForestOptions;
|
|
557
558
|
|
|
559
|
+
export interface SharedTreeOptionsInternal extends SharedTreeOptions {
|
|
560
|
+
disposeForksAfterTransaction?: boolean;
|
|
561
|
+
}
|
|
558
562
|
/**
|
|
559
563
|
* Configuration options for SharedTree's internal tree storage.
|
|
560
564
|
* @alpha
|
|
@@ -609,11 +613,12 @@ export enum ForestType {
|
|
|
609
613
|
Expensive = 2,
|
|
610
614
|
}
|
|
611
615
|
|
|
612
|
-
export const defaultSharedTreeOptions: Required<
|
|
616
|
+
export const defaultSharedTreeOptions: Required<SharedTreeOptionsInternal> = {
|
|
613
617
|
jsonValidator: noopValidator,
|
|
614
618
|
forest: ForestType.Reference,
|
|
615
619
|
treeEncodeType: TreeCompressionStrategy.Compressed,
|
|
616
620
|
formatVersion: SharedTreeFormatVersion.v3,
|
|
621
|
+
disposeForksAfterTransaction: true,
|
|
617
622
|
};
|
|
618
623
|
|
|
619
624
|
/**
|
|
@@ -628,7 +633,7 @@ export class SharedTreeFactory implements IChannelFactory<ISharedTree> {
|
|
|
628
633
|
packageVersion: "0.0.0",
|
|
629
634
|
};
|
|
630
635
|
|
|
631
|
-
public constructor(private readonly options:
|
|
636
|
+
public constructor(private readonly options: SharedTreeOptionsInternal = {}) {}
|
|
632
637
|
|
|
633
638
|
public async load(
|
|
634
639
|
runtime: IFluidDataStoreRuntime,
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { TreeNode } from "../simple-tree/index.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A special object that signifies when a SharedTree {@link RunTransaction | transaction} should "roll back".
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export const rollback = Symbol("SharedTree Transaction Rollback");
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A requirement for a SharedTree transaction to succeed.
|
|
16
|
+
* @remarks Transaction constraints are useful for validating that the state of the tree meets some requirement when a transaction runs.
|
|
17
|
+
* In general, when running a transaction a client can validate their tree state in whatever way they wish and decide to either proceed with the transaction or not.
|
|
18
|
+
* However, they cannot know what the tree state will be when the transaction is _sequenced_.
|
|
19
|
+
* There may have been any number of edits from other clients that get sequenced before the transaction is eventually sequenced.
|
|
20
|
+
* Constraints provide a way to validate the tree state after the transaction has been sequenced and abort the transaction if the constraints are not met.
|
|
21
|
+
* All clients will validate the constraints of a transaction when it is sequenced, so all clients will agree on whether the transaction succeeds or not.
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export type TransactionConstraint = NodeInDocumentConstraint; // TODO: Add more constraint types here
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A transaction {@link TransactionConstraint | constraint} which requires that the given node exists in the tree.
|
|
28
|
+
* @remarks The node must be in the document (its {@link TreeStatus | status} must be {@link TreeStatus.InDocument | InDocument}) to qualify as "existing".
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export interface NodeInDocumentConstraint {
|
|
32
|
+
readonly type: "nodeInDocument";
|
|
33
|
+
readonly node: TreeNode;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The status of the transaction callback in the {@link RunTransaction | RunTransaction} API.
|
|
38
|
+
* @alpha
|
|
39
|
+
*/
|
|
40
|
+
export type TransactionCallbackStatus<TSuccessValue, TFailureValue> = (
|
|
41
|
+
| {
|
|
42
|
+
/** Indicates that the transaction callback ran successfully. */
|
|
43
|
+
rollback?: false;
|
|
44
|
+
/** The user defined value when the transaction ran successfully. */
|
|
45
|
+
value: TSuccessValue;
|
|
46
|
+
}
|
|
47
|
+
| {
|
|
48
|
+
/** Indicates that the transaction callback failed and the transaction should be rolled back. */
|
|
49
|
+
rollback: true;
|
|
50
|
+
/** The user defined value when the transaction failed. */
|
|
51
|
+
value: TFailureValue;
|
|
52
|
+
}
|
|
53
|
+
) & {
|
|
54
|
+
/**
|
|
55
|
+
* An optional list of {@link TransactionConstraint | constraints} that will be checked when the commit corresponding
|
|
56
|
+
* to this transaction is reverted. If any of these constraints are not met when the revert is being applied either
|
|
57
|
+
* locally or on remote clients, the revert will be ignored.
|
|
58
|
+
* These constraints must also be met at the time they are first introduced. If they are not met after the transaction
|
|
59
|
+
* callback returns, then `runTransaction` (which invokes the transaction callback) will throw a `UsageError`.
|
|
60
|
+
*/
|
|
61
|
+
preconditionsOnRevert?: readonly TransactionConstraint[];
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The status of a the transaction callback in the {@link RunTransaction | RunTransaction} API where the transaction doesn't
|
|
66
|
+
* need to return a value. This is the same as {@link TransactionCallbackStatus} but with the `value` field omitted. This
|
|
67
|
+
* @alpha
|
|
68
|
+
*/
|
|
69
|
+
export type VoidTransactionCallbackStatus = Omit<
|
|
70
|
+
TransactionCallbackStatus<unknown, unknown>,
|
|
71
|
+
"value"
|
|
72
|
+
>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The result of the {@link RunTransaction | RunTransaction} API when it was successful.
|
|
76
|
+
* @alpha
|
|
77
|
+
*/
|
|
78
|
+
export interface TransactionResultSuccess<TSuccessValue> {
|
|
79
|
+
/** Indicates that the transaction was successful. */
|
|
80
|
+
success: true;
|
|
81
|
+
/** The user defined value when the transaction was successful. */
|
|
82
|
+
value: TSuccessValue;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The result of the {@link RunTransaction | RunTransaction} API when it failed.
|
|
87
|
+
* @alpha
|
|
88
|
+
*/
|
|
89
|
+
export interface TransactionResultFailed<TFailureValue> {
|
|
90
|
+
/** Indicates that the transaction failed. */
|
|
91
|
+
success: false;
|
|
92
|
+
/** The user defined value when the transaction failed. */
|
|
93
|
+
value: TFailureValue;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The result of the {@link RunTransaction | RunTransaction} API.
|
|
98
|
+
* @alpha
|
|
99
|
+
*/
|
|
100
|
+
export type TransactionResultExt<TSuccessValue, TFailureValue> =
|
|
101
|
+
| TransactionResultSuccess<TSuccessValue>
|
|
102
|
+
| TransactionResultFailed<TFailureValue>;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The result of the {@link RunTransaction | RunTransaction} API. This is the same as {@link TransactionResultExt}
|
|
106
|
+
* but with the `value` field omitted. This is useful when the transaction callback doesn't need to return a value.
|
|
107
|
+
* @alpha
|
|
108
|
+
*/
|
|
109
|
+
export type TransactionResult =
|
|
110
|
+
| Omit<TransactionResultSuccess<unknown>, "value">
|
|
111
|
+
| Omit<TransactionResultFailed<unknown>, "value">;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The parameters for the {@link RunTransaction | RunTransaction} API.
|
|
115
|
+
* @alpha
|
|
116
|
+
*/
|
|
117
|
+
export interface RunTransactionParams {
|
|
118
|
+
/**
|
|
119
|
+
* An optional list of {@link TransactionConstraint | constraints} that are checked just before the transaction begins.
|
|
120
|
+
* If any of the constraints are not met when `runTransaction` is called, an error will be thrown.
|
|
121
|
+
* If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on
|
|
122
|
+
* this client and ignored by all other clients.
|
|
123
|
+
*/
|
|
124
|
+
readonly preconditions?: readonly TransactionConstraint[];
|
|
125
|
+
}
|
|
@@ -19,12 +19,7 @@ import {
|
|
|
19
19
|
import { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
|
|
20
20
|
import type { ITreeCheckout } from "./treeCheckout.js";
|
|
21
21
|
import { getCheckoutFlexTreeView } from "./checkoutFlexTreeView.js";
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* A special object that signifies when a SharedTree {@link RunTransaction | transaction} should "roll back".
|
|
25
|
-
* @public
|
|
26
|
-
*/
|
|
27
|
-
export const rollback = Symbol("SharedTree Transaction Rollback");
|
|
22
|
+
import { rollback, type TransactionConstraint } from "./transactionTypes.js";
|
|
28
23
|
|
|
29
24
|
/**
|
|
30
25
|
* A function which runs a transaction in a SharedTree.
|
|
@@ -380,28 +375,6 @@ export const treeApi: TreeApi = {
|
|
|
380
375
|
},
|
|
381
376
|
};
|
|
382
377
|
|
|
383
|
-
/**
|
|
384
|
-
* A requirement for a SharedTree transaction to succeed.
|
|
385
|
-
* @remarks Transaction constraints are useful for validating that the state of the tree meets some requirement when a transaction runs.
|
|
386
|
-
* In general, when running a transaction a client can validate their tree state in whatever way they wish and decide to either proceed with the transaction or not.
|
|
387
|
-
* However, they cannot know what the tree state will be when the transaction is _sequenced_.
|
|
388
|
-
* There may have been any number of edits from other clients that get sequenced before the transaction is eventually sequenced.
|
|
389
|
-
* Constraints provide a way to validate the tree state after the transaction has been sequenced and abort the transaction if the constraints are not met.
|
|
390
|
-
* All clients will validate the constraints of a transaction when it is sequenced, so all clients will agree on whether the transaction succeeds or not.
|
|
391
|
-
* @public
|
|
392
|
-
*/
|
|
393
|
-
export type TransactionConstraint = NodeInDocumentConstraint; // TODO: Add more constraint types here
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* A transaction {@link TransactionConstraint | constraint} which requires that the given node exists in the tree.
|
|
397
|
-
* @remarks The node must be in the document (its {@link TreeStatus | status} must be {@link TreeStatus.InDocument | InDocument}) to qualify as "existing".
|
|
398
|
-
* @public
|
|
399
|
-
*/
|
|
400
|
-
export interface NodeInDocumentConstraint {
|
|
401
|
-
readonly type: "nodeInDocument";
|
|
402
|
-
readonly node: TreeNode;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
378
|
// TODO: Add more constraint types here
|
|
406
379
|
|
|
407
380
|
/** Creates a copy of `runTransaction` with the `rollback` property added so as to satisfy the `RunTransaction` interface. */
|