@fluidframework/tree 2.74.0-365691 → 2.74.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/.vscode/settings.json +4 -2
- package/CHANGELOG.md +11 -0
- package/api-report/tree.alpha.api.md +125 -87
- package/api-report/tree.beta.api.md +0 -1
- package/api-report/tree.legacy.beta.api.md +0 -1
- package/api-report/tree.legacy.public.api.md +0 -1
- package/api-report/tree.public.api.md +0 -1
- package/assertTagging.config.mjs +1 -1
- package/dist/alpha.d.ts +6 -2
- package/dist/codec/codec.d.ts +41 -13
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +46 -19
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +1 -1
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/codec/versioned/format.d.ts +4 -1
- package/dist/codec/versioned/format.d.ts.map +1 -1
- package/dist/codec/versioned/format.js +4 -1
- package/dist/codec/versioned/format.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +4 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +20 -1
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +4 -7
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +2 -2
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +34 -13
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +12 -12
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +4 -4
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.js +2 -2
- package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/dist/core/tree/index.d.ts +3 -2
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +3 -0
- package/dist/core/tree/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +5 -5
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +4 -4
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +14 -6
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +3 -3
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +22 -26
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +30 -8
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js +41 -11
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts +7 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +13 -11
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +10 -13
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +35 -31
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts +61 -0
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/formatCommon.js +27 -0
- package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -0
- package/dist/feature-libraries/forest-summary/formatV1.d.ts +51 -0
- package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/formatV1.js +11 -0
- package/dist/feature-libraries/forest-summary/formatV1.js.map +1 -0
- package/dist/feature-libraries/forest-summary/formatV2.d.ts +51 -0
- package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/formatV2.js +11 -0
- package/dist/feature-libraries/forest-summary/formatV2.js.map +1 -0
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +18 -24
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +21 -43
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts +2 -2
- package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/index.js +3 -4
- package/dist/feature-libraries/forest-summary/index.js.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryFormatCommon.d.ts +35 -0
- package/dist/feature-libraries/forest-summary/summaryFormatCommon.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryFormatCommon.js +43 -0
- package/dist/feature-libraries/forest-summary/summaryFormatCommon.js.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts +11 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.js +14 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.js.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV3.d.ts +18 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV3.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV3.js +21 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV3.js.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts +17 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.js +35 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
- package/dist/feature-libraries/index.d.ts +1 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +3 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.d.ts +18 -2
- package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.js +54 -3
- package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts +25 -13
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.js +0 -21
- package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +4 -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 +2 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +2 -3
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +4 -4
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.d.ts +1 -1
- package/dist/feature-libraries/schema-index/formatV2.d.ts +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +27 -8
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +42 -16
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +1 -1
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +2 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +3 -0
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +2 -2
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +4 -4
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +2 -2
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +20 -8
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js +25 -11
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +1 -1
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +10 -5
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +72 -17
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +10 -8
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/{lib/shared-tree-core/editManagerCodecsV5.d.ts → dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts} +3 -3
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{editManagerCodecsV5.js → editManagerCodecsVSharedBranches.js} +7 -7
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +8 -30
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +18 -9
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +1 -1
- package/dist/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts} +3 -3
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{editManagerFormatV5.js → editManagerFormatVSharedBranches.js} +2 -2
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/editManagerSummarizer.d.ts +29 -9
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +41 -13
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +5 -2
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +7 -1
- package/dist/shared-tree-core/index.js.map +1 -1
- package/{lib/shared-tree-core/messageCodecV5.d.ts → dist/shared-tree-core/messageCodecVSharedBranches.d.ts} +2 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{messageCodecV5.js → messageCodecVSharedBranches.js} +6 -6
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +12 -10
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +9 -36
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +19 -9
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/{lib/shared-tree-core/messageFormatV5.d.ts → dist/shared-tree-core/messageFormatVSharedBranches.d.ts} +5 -7
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{messageFormatV5.js → messageFormatVSharedBranches.js} +3 -2
- package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/sharedTreeCore.d.ts +13 -47
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +29 -17
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/summaryTypes.d.ts +94 -0
- package/dist/shared-tree-core/summaryTypes.d.ts.map +1 -0
- package/dist/shared-tree-core/summaryTypes.js +47 -0
- package/dist/shared-tree-core/summaryTypes.js.map +1 -0
- package/dist/shared-tree-core/versionedSummarizer.d.ts +72 -0
- package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
- package/dist/shared-tree-core/versionedSummarizer.js +64 -0
- package/dist/shared-tree-core/versionedSummarizer.js.map +1 -0
- package/dist/simple-tree/api/configuration.d.ts +3 -26
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js +10 -21
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.d.ts +11 -0
- package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.js +7 -0
- package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/eraseSchemaDetails.d.ts +89 -0
- package/dist/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -0
- package/dist/simple-tree/api/eraseSchemaDetails.js +97 -0
- package/dist/simple-tree/api/eraseSchemaDetails.js.map +1 -0
- package/dist/simple-tree/api/getSimpleSchema.d.ts +3 -3
- package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getSimpleSchema.js +9 -3
- package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js +7 -0
- package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +4 -4
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +8 -5
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js +0 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts +6 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js +5 -0
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts +12 -12
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.js +18 -6
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +13 -8
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +1 -2
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +15 -2
- 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/typesUnsafe.d.ts +3 -3
- package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +2 -2
- package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +1 -1
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +2 -3
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/toStored.d.ts +17 -15
- package/dist/simple-tree/core/toStored.d.ts.map +1 -1
- package/dist/simple-tree/core/toStored.js +5 -40
- package/dist/simple-tree/core/toStored.js.map +1 -1
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNode.js +1 -0
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/walkSchema.js +4 -0
- package/dist/simple-tree/core/walkSchema.js.map +1 -1
- package/dist/simple-tree/createContext.d.ts.map +1 -1
- package/dist/simple-tree/createContext.js +20 -5
- package/dist/simple-tree/createContext.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +3 -3
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +6 -5
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +16 -11
- 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/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +3 -3
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +3 -3
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +2 -2
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -3
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +55 -23
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js +17 -0
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.js +8 -1
- package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts +58 -11
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +205 -30
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/simple-tree/treeSchema.d.ts +23 -0
- package/dist/simple-tree/treeSchema.d.ts.map +1 -0
- package/dist/simple-tree/treeSchema.js +25 -0
- package/dist/simple-tree/treeSchema.js.map +1 -0
- package/dist/tableSchema.d.ts +107 -64
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +161 -60
- package/dist/tableSchema.js.map +1 -1
- package/dist/util/brand.d.ts +49 -0
- package/dist/util/brand.d.ts.map +1 -1
- package/dist/util/brand.js +47 -1
- package/dist/util/brand.js.map +1 -1
- package/dist/util/index.d.ts +2 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +6 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/readSnapshotBlob.d.ts +13 -0
- package/dist/util/readSnapshotBlob.d.ts.map +1 -0
- package/dist/util/readSnapshotBlob.js +18 -0
- package/dist/util/readSnapshotBlob.js.map +1 -0
- package/eslint.config.mts +98 -0
- package/lib/alpha.d.ts +6 -2
- package/lib/codec/codec.d.ts +41 -13
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +40 -13
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts +1 -1
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/codec/versioned/format.d.ts +4 -1
- package/lib/codec/versioned/format.d.ts.map +1 -1
- package/lib/codec/versioned/format.js +4 -1
- package/lib/codec/versioned/format.js.map +1 -1
- package/lib/core/index.d.ts +2 -2
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/types.d.ts +20 -1
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +4 -7
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +3 -3
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +34 -13
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +12 -12
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +4 -4
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.js +3 -3
- package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/lib/core/tree/index.d.ts +3 -2
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +2 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +3 -3
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +5 -5
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +5 -5
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +14 -6
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +3 -3
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +23 -27
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +30 -8
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js +38 -8
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts +7 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +12 -11
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +10 -13
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +33 -29
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts +61 -0
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/formatCommon.js +23 -0
- package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -0
- package/lib/feature-libraries/forest-summary/formatV1.d.ts +51 -0
- package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/formatV1.js +8 -0
- package/lib/feature-libraries/forest-summary/formatV1.js.map +1 -0
- package/lib/feature-libraries/forest-summary/formatV2.d.ts +51 -0
- package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/formatV2.js +8 -0
- package/lib/feature-libraries/forest-summary/formatV2.js.map +1 -0
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +18 -24
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +20 -42
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts +2 -2
- package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/index.js +2 -2
- package/lib/feature-libraries/forest-summary/index.js.map +1 -1
- package/lib/feature-libraries/forest-summary/summaryFormatCommon.d.ts +35 -0
- package/lib/feature-libraries/forest-summary/summaryFormatCommon.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryFormatCommon.js +40 -0
- package/lib/feature-libraries/forest-summary/summaryFormatCommon.js.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts +11 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.js +11 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.js.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV3.d.ts +18 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV3.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV3.js +18 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV3.js.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts +17 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.js +30 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
- package/lib/feature-libraries/index.d.ts +1 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.d.ts +18 -2
- package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.js +55 -5
- package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts +25 -13
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.js +0 -21
- package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +4 -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 +1 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +2 -3
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +5 -5
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.d.ts +1 -1
- package/lib/feature-libraries/schema-index/formatV2.d.ts +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +27 -8
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +38 -12
- package/lib/feature-libraries/schema-index/schemaSummarizer.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/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +2 -2
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +2 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +3 -0
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +2 -2
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +4 -4
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +2 -2
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +20 -8
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +25 -11
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +2 -2
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +10 -5
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +73 -18
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +11 -9
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/{dist/shared-tree-core/editManagerCodecsV5.d.ts → lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts} +3 -3
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{editManagerCodecsV5.js → editManagerCodecsVSharedBranches.js} +4 -4
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +8 -30
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +19 -10
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +1 -1
- package/lib/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts} +3 -3
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{editManagerFormatV5.js → editManagerFormatVSharedBranches.js} +2 -2
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/editManagerSummarizer.d.ts +29 -9
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +39 -11
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +5 -2
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +3 -1
- package/lib/shared-tree-core/index.js.map +1 -1
- package/{dist/shared-tree-core/messageCodecV5.d.ts → lib/shared-tree-core/messageCodecVSharedBranches.d.ts} +2 -2
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{messageCodecV5.js → messageCodecVSharedBranches.js} +3 -3
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +13 -11
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +9 -36
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +19 -9
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/{dist/shared-tree-core/messageFormatV5.d.ts → lib/shared-tree-core/messageFormatVSharedBranches.d.ts} +5 -7
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{messageFormatV5.js → messageFormatVSharedBranches.js} +3 -2
- package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/sharedTreeCore.d.ts +13 -47
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +27 -15
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/summaryTypes.d.ts +94 -0
- package/lib/shared-tree-core/summaryTypes.d.ts.map +1 -0
- package/lib/shared-tree-core/summaryTypes.js +43 -0
- package/lib/shared-tree-core/summaryTypes.js.map +1 -0
- package/lib/shared-tree-core/versionedSummarizer.d.ts +72 -0
- package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
- package/lib/shared-tree-core/versionedSummarizer.js +60 -0
- package/lib/shared-tree-core/versionedSummarizer.js.map +1 -0
- package/lib/simple-tree/api/configuration.d.ts +3 -26
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js +14 -25
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.d.ts +11 -0
- package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.js +7 -0
- package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/lib/simple-tree/api/discrepancies.js.map +1 -1
- package/lib/simple-tree/api/eraseSchemaDetails.d.ts +89 -0
- package/lib/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -0
- package/lib/simple-tree/api/eraseSchemaDetails.js +92 -0
- package/lib/simple-tree/api/eraseSchemaDetails.js.map +1 -0
- package/lib/simple-tree/api/getSimpleSchema.d.ts +3 -3
- package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getSimpleSchema.js +9 -3
- package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js +8 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +4 -4
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +3 -3
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js +0 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts +6 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js +5 -0
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts +12 -12
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.js +15 -3
- package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +15 -10
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +1 -2
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +15 -2
- 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/typesUnsafe.d.ts +3 -3
- package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +2 -2
- package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +1 -1
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +1 -1
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/toStored.d.ts +17 -15
- package/lib/simple-tree/core/toStored.d.ts.map +1 -1
- package/lib/simple-tree/core/toStored.js +4 -37
- package/lib/simple-tree/core/toStored.js.map +1 -1
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNode.js +1 -0
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/walkSchema.js +5 -1
- package/lib/simple-tree/core/walkSchema.js.map +1 -1
- package/lib/simple-tree/createContext.d.ts.map +1 -1
- package/lib/simple-tree/createContext.js +20 -5
- package/lib/simple-tree/createContext.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +3 -3
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +6 -5
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +5 -4
- 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/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +3 -3
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +3 -3
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +2 -2
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -3
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +55 -23
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js +16 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js +8 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts +58 -11
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +204 -31
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/simple-tree/treeSchema.d.ts +23 -0
- package/lib/simple-tree/treeSchema.d.ts.map +1 -0
- package/lib/simple-tree/treeSchema.js +21 -0
- package/lib/simple-tree/treeSchema.js.map +1 -0
- package/lib/tableSchema.d.ts +107 -64
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +162 -61
- package/lib/tableSchema.js.map +1 -1
- package/lib/util/brand.d.ts +49 -0
- package/lib/util/brand.d.ts.map +1 -1
- package/lib/util/brand.js +44 -0
- package/lib/util/brand.js.map +1 -1
- package/lib/util/index.d.ts +2 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/readSnapshotBlob.d.ts +13 -0
- package/lib/util/readSnapshotBlob.d.ts.map +1 -0
- package/lib/util/readSnapshotBlob.js +14 -0
- package/lib/util/readSnapshotBlob.js.map +1 -0
- package/package.json +24 -23
- package/src/codec/codec.ts +44 -14
- package/src/codec/versioned/codec.ts +1 -1
- package/src/codec/versioned/format.ts +4 -1
- package/src/core/index.ts +4 -1
- package/src/core/rebase/index.ts +1 -0
- package/src/core/rebase/types.ts +25 -0
- package/src/core/schema-stored/schema.ts +5 -7
- package/src/core/tree/detachedFieldIndex.ts +54 -13
- package/src/core/tree/detachedFieldIndexFormatCommon.ts +4 -7
- package/src/core/tree/index.ts +7 -2
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +3 -2
- package/src/feature-libraries/chunked-forest/codec/format.ts +6 -9
- package/src/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.ts +15 -7
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +9 -9
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +22 -33
- package/src/feature-libraries/detachedFieldIndexSummarizer.ts +62 -15
- package/src/feature-libraries/forest-summary/codec.ts +22 -10
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +77 -44
- package/src/feature-libraries/forest-summary/{format.ts → formatCommon.ts} +12 -13
- package/src/feature-libraries/forest-summary/formatV1.ts +12 -0
- package/src/feature-libraries/forest-summary/formatV2.ts +12 -0
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +37 -56
- package/src/feature-libraries/forest-summary/index.ts +2 -2
- package/src/feature-libraries/forest-summary/summaryFormatCommon.ts +41 -0
- package/src/feature-libraries/forest-summary/summaryFormatV1ToV2.ts +11 -0
- package/src/feature-libraries/forest-summary/summaryFormatV3.ts +18 -0
- package/src/feature-libraries/forest-summary/summaryTypes.ts +41 -0
- package/src/feature-libraries/index.ts +1 -1
- package/src/feature-libraries/modular-schema/comparison.ts +64 -5
- package/src/feature-libraries/modular-schema/fieldKind.ts +24 -40
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +4 -1
- package/src/feature-libraries/modular-schema/index.ts +1 -0
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +2 -3
- package/src/feature-libraries/schema-index/codec.ts +7 -9
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +59 -18
- package/src/index.ts +6 -2
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +2 -3
- package/src/shared-tree/schematizingTreeView.ts +5 -0
- package/src/shared-tree/sharedTree.ts +20 -9
- package/src/shared-tree/sharedTreeChangeCodecs.ts +2 -2
- package/src/shared-tree/sharedTreeChangeEnricher.ts +31 -11
- package/src/shared-tree/treeAlpha.ts +2 -3
- package/src/shared-tree/treeCheckout.ts +103 -20
- package/src/shared-tree-core/editManagerCodecs.ts +11 -9
- package/src/shared-tree-core/{editManagerCodecsV5.ts → editManagerCodecsVSharedBranches.ts} +3 -3
- package/src/shared-tree-core/editManagerFormatCommons.ts +22 -16
- package/src/shared-tree-core/{editManagerFormatV5.ts → editManagerFormatVSharedBranches.ts} +2 -2
- package/src/shared-tree-core/editManagerSummarizer.ts +58 -16
- package/src/shared-tree-core/index.ts +12 -3
- package/src/shared-tree-core/{messageCodecV5.ts → messageCodecVSharedBranches.ts} +3 -3
- package/src/shared-tree-core/messageCodecs.ts +13 -11
- package/src/shared-tree-core/messageFormat.ts +23 -16
- package/src/shared-tree-core/{messageFormatV5.ts → messageFormatVSharedBranches.ts} +4 -6
- package/src/shared-tree-core/sharedTreeCore.ts +63 -75
- package/src/shared-tree-core/summaryTypes.ts +122 -0
- package/src/shared-tree-core/versionedSummarizer.ts +114 -0
- package/src/simple-tree/api/configuration.ts +21 -68
- package/src/simple-tree/api/dirtyIndex.ts +11 -0
- package/src/simple-tree/api/discrepancies.ts +1 -1
- package/src/simple-tree/api/eraseSchemaDetails.ts +123 -0
- package/src/simple-tree/api/getSimpleSchema.ts +13 -6
- package/src/simple-tree/api/incrementalAllowedTypes.ts +15 -3
- package/src/simple-tree/api/index.ts +7 -4
- package/src/simple-tree/api/schemaCompatibilityTester.ts +1 -1
- package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -2
- package/src/simple-tree/api/schemaFactoryRecursive.ts +0 -2
- package/src/simple-tree/api/schemaFromSimple.ts +11 -5
- package/src/simple-tree/api/simpleSchemaCodec.ts +17 -3
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -1
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +18 -10
- package/src/simple-tree/api/storedSchema.ts +2 -2
- package/src/simple-tree/api/tree.ts +16 -1
- package/src/simple-tree/api/typesUnsafe.ts +7 -3
- package/src/simple-tree/core/allowedTypes.ts +3 -3
- package/src/simple-tree/core/index.ts +2 -2
- package/src/simple-tree/core/toStored.ts +22 -55
- package/src/simple-tree/core/treeNode.ts +1 -0
- package/src/simple-tree/core/walkSchema.ts +6 -0
- package/src/simple-tree/createContext.ts +29 -11
- package/src/simple-tree/fieldSchema.ts +10 -3
- package/src/simple-tree/index.ts +12 -10
- package/src/simple-tree/node-kinds/array/arrayNode.ts +5 -2
- package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +3 -3
- package/src/simple-tree/node-kinds/map/mapNode.ts +5 -2
- package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +3 -3
- package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +6 -2
- package/src/simple-tree/node-kinds/record/recordNode.ts +5 -2
- package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +3 -3
- package/src/simple-tree/simpleSchema.ts +79 -32
- package/src/simple-tree/simpleSchemaFormatV1.ts +9 -1
- package/src/simple-tree/toStoredSchema.ts +319 -61
- package/src/simple-tree/treeSchema.ts +54 -0
- package/src/tableSchema.ts +487 -173
- package/src/util/brand.ts +61 -0
- package/src/util/index.ts +5 -0
- package/src/util/readSnapshotBlob.ts +23 -0
- package/dist/feature-libraries/forest-summary/format.d.ts +0 -23
- package/dist/feature-libraries/forest-summary/format.d.ts.map +0 -1
- package/dist/feature-libraries/forest-summary/format.js +0 -24
- package/dist/feature-libraries/forest-summary/format.js.map +0 -1
- package/dist/shared-tree-core/editManagerCodecsV5.d.ts.map +0 -1
- package/dist/shared-tree-core/editManagerCodecsV5.js.map +0 -1
- package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +0 -1
- package/dist/shared-tree-core/editManagerFormatV5.js.map +0 -1
- package/dist/shared-tree-core/messageCodecV5.d.ts.map +0 -1
- package/dist/shared-tree-core/messageCodecV5.js.map +0 -1
- package/dist/shared-tree-core/messageFormatV5.d.ts.map +0 -1
- package/dist/shared-tree-core/messageFormatV5.js.map +0 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +0 -40
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +0 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +0 -177
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +0 -1
- package/lib/feature-libraries/forest-summary/format.d.ts +0 -23
- package/lib/feature-libraries/forest-summary/format.d.ts.map +0 -1
- package/lib/feature-libraries/forest-summary/format.js +0 -21
- package/lib/feature-libraries/forest-summary/format.js.map +0 -1
- package/lib/shared-tree-core/editManagerCodecsV5.d.ts.map +0 -1
- package/lib/shared-tree-core/editManagerCodecsV5.js.map +0 -1
- package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +0 -1
- package/lib/shared-tree-core/editManagerFormatV5.js.map +0 -1
- package/lib/shared-tree-core/messageCodecV5.d.ts.map +0 -1
- package/lib/shared-tree-core/messageCodecV5.js.map +0 -1
- package/lib/shared-tree-core/messageFormatV5.d.ts.map +0 -1
- package/lib/shared-tree-core/messageFormatV5.js.map +0 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +0 -40
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +0 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +0 -171
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +0 -1
- package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +0 -209
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { assert, unreachableCase, fail } from "@fluidframework/core-utils/internal";
|
|
7
7
|
import type { IFluidHandle, Listenable } from "@fluidframework/core-interfaces/internal";
|
|
8
8
|
import { createEmitter } from "@fluid-internal/client-utils";
|
|
9
|
-
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
9
|
+
import type { IIdCompressor, SessionId } from "@fluidframework/id-compressor";
|
|
10
10
|
import {
|
|
11
11
|
UsageError,
|
|
12
12
|
type ITelemetryLoggerExt,
|
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
type AnchorSetRootEvents,
|
|
21
21
|
type ChangeFamily,
|
|
22
22
|
CommitKind,
|
|
23
|
-
type CommitMetadata,
|
|
24
23
|
type DeltaVisitor,
|
|
25
24
|
type DetachedFieldIndex,
|
|
26
25
|
type IEditableForest,
|
|
@@ -48,6 +47,9 @@ import {
|
|
|
48
47
|
type TreeNodeStoredSchema,
|
|
49
48
|
LeafNodeStoredSchema,
|
|
50
49
|
diffHistories,
|
|
50
|
+
type ChangeMetadata,
|
|
51
|
+
type ChangeEncodingContext,
|
|
52
|
+
type ReadOnlyDetachedFieldIndex,
|
|
51
53
|
} from "../core/index.js";
|
|
52
54
|
import {
|
|
53
55
|
type FieldBatchCodec,
|
|
@@ -68,7 +70,13 @@ import {
|
|
|
68
70
|
type SharedTreeBranchChange,
|
|
69
71
|
type Transactor,
|
|
70
72
|
} from "../shared-tree-core/index.js";
|
|
71
|
-
import {
|
|
73
|
+
import {
|
|
74
|
+
Breakable,
|
|
75
|
+
disposeSymbol,
|
|
76
|
+
getOrCreate,
|
|
77
|
+
type JsonCompatibleReadOnly,
|
|
78
|
+
type WithBreakable,
|
|
79
|
+
} from "../util/index.js";
|
|
72
80
|
|
|
73
81
|
import { SharedTreeChangeFamily, hasSchemaChange } from "./sharedTreeChangeFamily.js";
|
|
74
82
|
import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
@@ -89,6 +97,7 @@ import {
|
|
|
89
97
|
type CustomTreeNode,
|
|
90
98
|
} from "../simple-tree/index.js";
|
|
91
99
|
import { getCheckout, SchematizingSimpleTreeView } from "./schematizingTreeView.js";
|
|
100
|
+
import { isStableId } from "@fluidframework/id-compressor/internal";
|
|
92
101
|
|
|
93
102
|
/**
|
|
94
103
|
* Events for {@link ITreeCheckout}.
|
|
@@ -122,7 +131,7 @@ export interface CheckoutEvents {
|
|
|
122
131
|
* @param getRevertible - a function provided that allows users to get a revertible for the change. If not provided,
|
|
123
132
|
* this change is not revertible.
|
|
124
133
|
*/
|
|
125
|
-
changed(data:
|
|
134
|
+
changed(data: ChangeMetadata, getRevertible?: RevertibleAlphaFactory): void;
|
|
126
135
|
|
|
127
136
|
/**
|
|
128
137
|
* Fired when a new branch is created from this checkout.
|
|
@@ -406,7 +415,7 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
406
415
|
private readonly mintRevisionTag: () => RevisionTag,
|
|
407
416
|
private readonly revisionTagCodec: RevisionTagCodec,
|
|
408
417
|
private readonly idCompressor: IIdCompressor,
|
|
409
|
-
|
|
418
|
+
private readonly _removedRoots: DetachedFieldIndex = makeDetachedFieldIndex(
|
|
410
419
|
"repair",
|
|
411
420
|
revisionTagCodec,
|
|
412
421
|
idCompressor,
|
|
@@ -421,6 +430,10 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
421
430
|
this.registerForBranchEvents();
|
|
422
431
|
}
|
|
423
432
|
|
|
433
|
+
public get removedRoots(): ReadOnlyDetachedFieldIndex {
|
|
434
|
+
return this._removedRoots;
|
|
435
|
+
}
|
|
436
|
+
|
|
424
437
|
private registerForBranchEvents(): void {
|
|
425
438
|
this.#transaction.branch.events.on("afterChange", this.onAfterBranchChange);
|
|
426
439
|
this.#transaction.activeBranchEvents.on("afterChange", this.onAfterChange);
|
|
@@ -441,7 +454,7 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
441
454
|
(commits) => {
|
|
442
455
|
const revision = this.mintRevisionTag();
|
|
443
456
|
for (const transactionStep of commits) {
|
|
444
|
-
this.
|
|
457
|
+
this._removedRoots.updateMajor(transactionStep.revision, revision);
|
|
445
458
|
}
|
|
446
459
|
|
|
447
460
|
const squashedChange = this.changeFamily.rebaser.compose(commits);
|
|
@@ -452,12 +465,12 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
452
465
|
const disposeForks = this.disposeForksAfterTransaction
|
|
453
466
|
? trackForksForDisposal(this)
|
|
454
467
|
: undefined;
|
|
455
|
-
// When each transaction is started,
|
|
456
|
-
const
|
|
468
|
+
// When each transaction is started, make a restorable checkpoint of the current state of removed roots
|
|
469
|
+
const restoreRemovedRoots = this._removedRoots.createCheckpoint();
|
|
457
470
|
return (result) => {
|
|
458
471
|
switch (result) {
|
|
459
472
|
case TransactionResult.Abort:
|
|
460
|
-
|
|
473
|
+
restoreRemovedRoots();
|
|
461
474
|
break;
|
|
462
475
|
case TransactionResult.Commit:
|
|
463
476
|
if (!this.transaction.isInProgress()) {
|
|
@@ -532,7 +545,34 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
532
545
|
};
|
|
533
546
|
|
|
534
547
|
let withinEventContext = true;
|
|
535
|
-
|
|
548
|
+
|
|
549
|
+
const metadata: ChangeMetadata = {
|
|
550
|
+
kind,
|
|
551
|
+
isLocal: true,
|
|
552
|
+
getChange: () => {
|
|
553
|
+
const context: ChangeEncodingContext = {
|
|
554
|
+
idCompressor: this.idCompressor,
|
|
555
|
+
originatorId: this.idCompressor.localSessionId,
|
|
556
|
+
revision,
|
|
557
|
+
};
|
|
558
|
+
const encodedChange = this.changeFamily.codecs
|
|
559
|
+
.resolve(4)
|
|
560
|
+
.json.encode(change, context);
|
|
561
|
+
|
|
562
|
+
assert(
|
|
563
|
+
commit.parent !== undefined,
|
|
564
|
+
0xca4 /* Expected applied commit to be parented */,
|
|
565
|
+
);
|
|
566
|
+
return {
|
|
567
|
+
version: 1,
|
|
568
|
+
revision,
|
|
569
|
+
originatorId: this.idCompressor.localSessionId,
|
|
570
|
+
change: encodedChange,
|
|
571
|
+
} satisfies SerializedChange;
|
|
572
|
+
},
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
this.#events.emit("changed", metadata, getRevertible);
|
|
536
576
|
withinEventContext = false;
|
|
537
577
|
}
|
|
538
578
|
} else if (this.isRemoteChangeEvent(event)) {
|
|
@@ -559,6 +599,28 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
559
599
|
}
|
|
560
600
|
};
|
|
561
601
|
|
|
602
|
+
/**
|
|
603
|
+
* Applies the given serialized change (as was produced via a `"changed"` event of another checkout) to this checkout.
|
|
604
|
+
*/
|
|
605
|
+
public applySerializedChange(serializedChange: JsonCompatibleReadOnly): void {
|
|
606
|
+
if (!isSerializedChange(serializedChange)) {
|
|
607
|
+
throw new UsageError(`Cannot apply change. Invalid serialized change format.`);
|
|
608
|
+
}
|
|
609
|
+
const { revision, originatorId, change } = serializedChange;
|
|
610
|
+
if (originatorId !== this.idCompressor.localSessionId) {
|
|
611
|
+
throw new UsageError(
|
|
612
|
+
`Cannot apply change. A serialized changed must be applied to the same SharedTree as it was created from.`,
|
|
613
|
+
);
|
|
614
|
+
}
|
|
615
|
+
const context: ChangeEncodingContext = {
|
|
616
|
+
idCompressor: this.idCompressor,
|
|
617
|
+
originatorId: this.idCompressor.localSessionId,
|
|
618
|
+
revision,
|
|
619
|
+
};
|
|
620
|
+
const decodedChange = this.changeFamily.codecs.resolve(4).json.decode(change, context);
|
|
621
|
+
this.applyChange(decodedChange, revision);
|
|
622
|
+
}
|
|
623
|
+
|
|
562
624
|
// Revision is the revision of the commit, if any, which caused this change.
|
|
563
625
|
private applyChange(change: SharedTreeChange, revision?: RevisionTag): void {
|
|
564
626
|
// Conflicts due to schema will be empty and thus are not applied.
|
|
@@ -566,7 +628,7 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
566
628
|
if (innerChange.type === "data") {
|
|
567
629
|
const delta = intoDelta(tagChange(innerChange.innerChange, revision));
|
|
568
630
|
this.withCombinedVisitor((visitor) => {
|
|
569
|
-
visitDelta(delta, visitor, this.
|
|
631
|
+
visitDelta(delta, visitor, this._removedRoots, revision);
|
|
570
632
|
});
|
|
571
633
|
} else if (innerChange.type === "schema") {
|
|
572
634
|
// Schema changes from a current to a new schema are expected to be backwards compatible.
|
|
@@ -597,14 +659,14 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
597
659
|
this.withCombinedVisitor((visitor) => {
|
|
598
660
|
revisions.forEach((revision) => {
|
|
599
661
|
// get all the roots last created or used by the revision
|
|
600
|
-
const roots = this.
|
|
662
|
+
const roots = this._removedRoots.getRootsLastTouchedByRevision(revision);
|
|
601
663
|
|
|
602
664
|
// get the detached field for the root and delete it from the removed roots
|
|
603
665
|
for (const root of roots) {
|
|
604
|
-
visitor.destroy(this.
|
|
666
|
+
visitor.destroy(this._removedRoots.toFieldKey(root), 1);
|
|
605
667
|
}
|
|
606
668
|
|
|
607
|
-
this.
|
|
669
|
+
this._removedRoots.deleteRootsLastTouchedByRevision(revision);
|
|
608
670
|
});
|
|
609
671
|
});
|
|
610
672
|
};
|
|
@@ -774,7 +836,7 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
774
836
|
this.mintRevisionTag,
|
|
775
837
|
this.revisionTagCodec,
|
|
776
838
|
this.idCompressor,
|
|
777
|
-
this.
|
|
839
|
+
this._removedRoots.clone(),
|
|
778
840
|
this.logger,
|
|
779
841
|
this.breaker,
|
|
780
842
|
this.disposeForksAfterTransaction,
|
|
@@ -894,8 +956,8 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
894
956
|
this.assertNoUntrackedRoots();
|
|
895
957
|
const trees: [string | number | undefined, number, JsonableTree][] = [];
|
|
896
958
|
const cursor = this.forest.allocateCursor("getRemovedRoots");
|
|
897
|
-
for (const { id, root } of this.
|
|
898
|
-
const parentField = this.
|
|
959
|
+
for (const { id, root } of this._removedRoots.entries()) {
|
|
960
|
+
const parentField = this._removedRoots.toFieldKey(root);
|
|
899
961
|
this.forest.moveCursorToPath({ parent: undefined, parentField, parentIndex: 0 }, cursor);
|
|
900
962
|
const tree = jsonableTreeFromCursor(cursor);
|
|
901
963
|
// This method is used for tree consistency comparison.
|
|
@@ -915,7 +977,7 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
915
977
|
public load(): void {
|
|
916
978
|
// Set the tip revision as the latest relevant revision for any removed roots that are loaded from a summary - this allows them to be garbage collected later.
|
|
917
979
|
// When a load happens, the head of the trunk and the head of the local/main branch must be the same (this is enforced by SharedTree).
|
|
918
|
-
this.
|
|
980
|
+
this._removedRoots.setRevisionsForLoadedData(this.#transaction.branch.getHead().revision);
|
|
919
981
|
// The content of the checkout (e.g. the forest) has (maybe) changed, so fire an afterBatch event.
|
|
920
982
|
this.#events.emit("afterBatch");
|
|
921
983
|
}
|
|
@@ -987,8 +1049,8 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
987
1049
|
private assertNoUntrackedRoots(): void {
|
|
988
1050
|
const cursor = this.forest.getCursorAboveDetachedFields();
|
|
989
1051
|
const rootFields = new Set([rootFieldKey]);
|
|
990
|
-
for (const { root } of this.
|
|
991
|
-
rootFields.add(this.
|
|
1052
|
+
for (const { root } of this._removedRoots.entries()) {
|
|
1053
|
+
rootFields.add(this._removedRoots.toFieldKey(root));
|
|
992
1054
|
}
|
|
993
1055
|
|
|
994
1056
|
if (!cursor.firstField()) {
|
|
@@ -1205,3 +1267,24 @@ function verboseFromCursor(
|
|
|
1205
1267
|
fields: fields as CustomTreeNode<IFluidHandle>,
|
|
1206
1268
|
};
|
|
1207
1269
|
}
|
|
1270
|
+
|
|
1271
|
+
interface SerializedChange {
|
|
1272
|
+
version: 1;
|
|
1273
|
+
revision: RevisionTag;
|
|
1274
|
+
change: JsonCompatibleReadOnly;
|
|
1275
|
+
originatorId: SessionId;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
function isSerializedChange(value: unknown): value is SerializedChange {
|
|
1279
|
+
if (typeof value !== "object" || value === null) {
|
|
1280
|
+
return false;
|
|
1281
|
+
}
|
|
1282
|
+
const change = value as Partial<SerializedChange>;
|
|
1283
|
+
return (
|
|
1284
|
+
change.version === 1 &&
|
|
1285
|
+
(change.revision === "root" || typeof change.revision === "number") &&
|
|
1286
|
+
typeof change.originatorId === "string" &&
|
|
1287
|
+
isStableId(change.originatorId) &&
|
|
1288
|
+
change.change !== undefined
|
|
1289
|
+
);
|
|
1290
|
+
}
|
|
@@ -29,11 +29,11 @@ import type {
|
|
|
29
29
|
RevisionTag,
|
|
30
30
|
SchemaAndPolicy,
|
|
31
31
|
} from "../core/index.js";
|
|
32
|
-
import { brand, type JsonCompatibleReadOnly } from "../util/index.js";
|
|
32
|
+
import { brand, unbrand, type JsonCompatibleReadOnly } from "../util/index.js";
|
|
33
33
|
|
|
34
34
|
import type { SummaryData } from "./editManager.js";
|
|
35
35
|
import { makeV1CodecWithVersion } from "./editManagerCodecsV1toV4.js";
|
|
36
|
-
import {
|
|
36
|
+
import { makeSharedBranchesCodecWithVersion } from "./editManagerCodecsVSharedBranches.js";
|
|
37
37
|
import type { MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
|
|
38
38
|
import {
|
|
39
39
|
EditManagerFormatVersion,
|
|
@@ -70,7 +70,7 @@ export function clientVersionToEditManagerFormatVersion(
|
|
|
70
70
|
export function editManagerFormatVersionSelectorForSharedBranches(
|
|
71
71
|
clientVersion: MinimumVersionForCollab,
|
|
72
72
|
): EditManagerFormatVersion {
|
|
73
|
-
return brand(EditManagerFormatVersion.
|
|
73
|
+
return brand(EditManagerFormatVersion.vSharedBranches);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
export interface EditManagerCodecOptions {
|
|
@@ -134,22 +134,24 @@ export function makeEditManagerCodecs<TChangeset>(
|
|
|
134
134
|
>,
|
|
135
135
|
][] = Array.from(editManagerFormatVersions, (version) => {
|
|
136
136
|
switch (version) {
|
|
137
|
-
case EditManagerFormatVersion.v1:
|
|
138
|
-
case EditManagerFormatVersion.v2:
|
|
137
|
+
case unbrand(EditManagerFormatVersion.v1):
|
|
138
|
+
case unbrand(EditManagerFormatVersion.v2):
|
|
139
139
|
return [version, makeDiscontinuedCodecVersion(options, version, "2.73.0")];
|
|
140
|
-
case EditManagerFormatVersion.v3:
|
|
141
|
-
case EditManagerFormatVersion.v4: {
|
|
140
|
+
case unbrand(EditManagerFormatVersion.v3):
|
|
141
|
+
case unbrand(EditManagerFormatVersion.v4): {
|
|
142
142
|
const changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version));
|
|
143
143
|
return [
|
|
144
144
|
version,
|
|
145
145
|
makeV1CodecWithVersion(changeCodec, revisionTagCodec, options, version),
|
|
146
146
|
];
|
|
147
147
|
}
|
|
148
|
-
case EditManagerFormatVersion.v5:
|
|
148
|
+
case unbrand(EditManagerFormatVersion.v5):
|
|
149
|
+
return [version, makeDiscontinuedCodecVersion(options, version, "2.74.0")];
|
|
150
|
+
case unbrand(EditManagerFormatVersion.vSharedBranches): {
|
|
149
151
|
const changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version));
|
|
150
152
|
return [
|
|
151
153
|
version,
|
|
152
|
-
|
|
154
|
+
makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, options, version),
|
|
153
155
|
];
|
|
154
156
|
}
|
|
155
157
|
default:
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "../util/index.js";
|
|
26
26
|
|
|
27
27
|
import type { SharedBranchSummaryData, SummaryData } from "./editManager.js";
|
|
28
|
-
import { EncodedEditManager } from "./
|
|
28
|
+
import { EncodedEditManager } from "./editManagerFormatVSharedBranches.js";
|
|
29
29
|
import { decodeSharedBranch, encodeSharedBranch } from "./editManagerCodecsCommons.js";
|
|
30
30
|
import type { EncodedSharedBranch } from "./editManagerFormatCommons.js";
|
|
31
31
|
import type { BranchId } from "./branch.js";
|
|
@@ -35,7 +35,7 @@ export interface EditManagerEncodingContext {
|
|
|
35
35
|
readonly schema?: SchemaAndPolicy;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
export function
|
|
38
|
+
export function makeSharedBranchesCodecWithVersion<TChangeset>(
|
|
39
39
|
changeCodec: IMultiFormatCodec<
|
|
40
40
|
TChangeset,
|
|
41
41
|
JsonCompatibleReadOnly,
|
|
@@ -78,7 +78,7 @@ export function makeV5CodecWithVersion<TChangeset>(
|
|
|
78
78
|
);
|
|
79
79
|
assert(
|
|
80
80
|
data.originator !== undefined,
|
|
81
|
-
|
|
81
|
+
0xca5 /* Cannot encode vSharedBranches summary without originator */,
|
|
82
82
|
);
|
|
83
83
|
const json: Mutable<EncodedEditManager<TChangeset>> = {
|
|
84
84
|
main: mainBranch,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
RevisionTagSchema,
|
|
13
13
|
SessionIdSchema,
|
|
14
14
|
} from "../core/index.js";
|
|
15
|
-
import { type Brand, brandedNumberType } from "../util/index.js";
|
|
15
|
+
import { type Brand, brandedNumberType, strictEnum, type Values } from "../util/index.js";
|
|
16
16
|
import type { EncodedBranchId } from "./branch.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -123,7 +123,7 @@ export const EncodedSharedBranch = <ChangeSchema extends TSchema>(tChange: Chang
|
|
|
123
123
|
/**
|
|
124
124
|
* The format version for the EditManager.
|
|
125
125
|
*/
|
|
126
|
-
export const EditManagerFormatVersion = {
|
|
126
|
+
export const EditManagerFormatVersion = strictEnum("editManager.FormatVersion", {
|
|
127
127
|
/**
|
|
128
128
|
* Introduced and retired prior to 2.0.
|
|
129
129
|
* Reading and writing capability removed in 2.73.0.
|
|
@@ -136,34 +136,40 @@ export const EditManagerFormatVersion = {
|
|
|
136
136
|
v2: 2,
|
|
137
137
|
/**
|
|
138
138
|
* Introduced prior to 2.0 and used beyond.
|
|
139
|
-
* Reading capability
|
|
140
|
-
* Writing capability needs to be maintained.
|
|
139
|
+
* Reading capability must be maintained for backwards compatibility.
|
|
140
|
+
* Writing capability needs to be maintained so long as {@link lowestMinVersionForCollab} is less than 2.2.0.
|
|
141
141
|
*/
|
|
142
142
|
v3: 3,
|
|
143
143
|
/**
|
|
144
|
-
*
|
|
144
|
+
* Introduced in 2.2.0.
|
|
145
|
+
* Was inadvertently made usable for writing in 2.43.0 (through configuredSharedTree) and remains available.
|
|
145
146
|
* Reading capability must be maintained for backwards compatibility.
|
|
146
|
-
* Writing capability
|
|
147
|
-
*
|
|
147
|
+
* Writing capability could be dropped in favor of {@link EditManagerFormatVersion.v3},
|
|
148
|
+
* but doing so would make the pattern of writable versions more complex and gain little
|
|
149
|
+
* because most of the logic for this format is shared with {@link EditManagerFormatVersion.v3}.
|
|
148
150
|
*/
|
|
149
151
|
v4: 4,
|
|
152
|
+
/**
|
|
153
|
+
* This version number was used internally for testing shared branches.
|
|
154
|
+
* This format was never made stable.
|
|
155
|
+
* This version number is kept here solely to avoid reusing the number: it is not supported for either reading or writing.
|
|
156
|
+
* @deprecated Use {@link EditManagerFormatVersion.vSharedBranches} for testing shared branches.
|
|
157
|
+
*/
|
|
158
|
+
v5: 5,
|
|
150
159
|
/**
|
|
151
160
|
* Not yet released.
|
|
152
161
|
* Only used for testing shared branches.
|
|
153
162
|
*/
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
export type EditManagerFormatVersion =
|
|
157
|
-
(typeof EditManagerFormatVersion)[keyof typeof EditManagerFormatVersion],
|
|
158
|
-
"EditManagerFormatVersion"
|
|
159
|
-
>;
|
|
163
|
+
vSharedBranches: "shared-branches|v0.1",
|
|
164
|
+
});
|
|
165
|
+
export type EditManagerFormatVersion = Values<typeof EditManagerFormatVersion>;
|
|
160
166
|
export const supportedEditManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> =
|
|
161
167
|
new Set([
|
|
162
168
|
EditManagerFormatVersion.v3,
|
|
163
169
|
EditManagerFormatVersion.v4,
|
|
164
|
-
EditManagerFormatVersion.
|
|
165
|
-
]
|
|
170
|
+
EditManagerFormatVersion.vSharedBranches,
|
|
171
|
+
]);
|
|
166
172
|
export const editManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> = new Set(
|
|
167
|
-
Object.values(EditManagerFormatVersion)
|
|
173
|
+
Object.values(EditManagerFormatVersion),
|
|
168
174
|
);
|
|
169
175
|
/* eslint-enable @typescript-eslint/explicit-function-return-type */
|
|
@@ -15,7 +15,7 @@ const noAdditionalProps: ObjectOptions = { additionalProperties: false };
|
|
|
15
15
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
16
16
|
|
|
17
17
|
export interface EncodedEditManager<TChangeset> {
|
|
18
|
-
readonly version: typeof EditManagerFormatVersion.
|
|
18
|
+
readonly version: typeof EditManagerFormatVersion.vSharedBranches;
|
|
19
19
|
readonly originator: SessionId;
|
|
20
20
|
readonly main: EncodedSharedBranch<TChangeset>;
|
|
21
21
|
readonly branches?: readonly EncodedSharedBranch<TChangeset>[];
|
|
@@ -24,7 +24,7 @@ export interface EncodedEditManager<TChangeset> {
|
|
|
24
24
|
export const EncodedEditManager = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>
|
|
25
25
|
Type.Object(
|
|
26
26
|
{
|
|
27
|
-
version: Type.
|
|
27
|
+
version: Type.Literal(EditManagerFormatVersion.vSharedBranches),
|
|
28
28
|
originator: SessionIdSchema,
|
|
29
29
|
main: EncodedSharedBranch(tChange),
|
|
30
30
|
branches: Type.Optional(Type.Array(EncodedSharedBranch(tChange))),
|
|
@@ -9,10 +9,10 @@ import type { IChannelStorageService } from "@fluidframework/datastore-definitio
|
|
|
9
9
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
10
10
|
import type {
|
|
11
11
|
IExperimentalIncrementalSummaryContext,
|
|
12
|
-
ISummaryTreeWithStats,
|
|
13
12
|
ITelemetryContext,
|
|
13
|
+
MinimumVersionForCollab,
|
|
14
14
|
} from "@fluidframework/runtime-definitions/internal";
|
|
15
|
-
import {
|
|
15
|
+
import type { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
|
|
16
16
|
|
|
17
17
|
import type { IJsonCodec } from "../codec/index.js";
|
|
18
18
|
import type { ChangeFamily, ChangeFamilyEditor, SchemaAndPolicy } from "../core/index.js";
|
|
@@ -24,16 +24,52 @@ import type {
|
|
|
24
24
|
Summarizable,
|
|
25
25
|
SummaryElementParser,
|
|
26
26
|
SummaryElementStringifier,
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./summaryTypes.js";
|
|
28
|
+
import { VersionedSummarizer } from "./versionedSummarizer.js";
|
|
28
29
|
|
|
29
|
-
const stringKey = "String";
|
|
30
|
+
export const stringKey = "String";
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
|
-
*
|
|
33
|
+
* The versions for the edit manager summary format.
|
|
33
34
|
*/
|
|
34
|
-
export
|
|
35
|
-
|
|
35
|
+
export const enum EditManagerSummaryFormatVersion {
|
|
36
|
+
/**
|
|
37
|
+
* This version represents summary format before summary versioning was introduced.
|
|
38
|
+
*/
|
|
39
|
+
v1 = 1,
|
|
40
|
+
/**
|
|
41
|
+
* This version adds metadata to the summary. This is backward compatible with version 1.
|
|
42
|
+
*/
|
|
43
|
+
v2 = 2,
|
|
44
|
+
/**
|
|
45
|
+
* The latest version of the summary. Must be updated when a new version is added.
|
|
46
|
+
*/
|
|
47
|
+
vLatest = v2,
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const supportedVersions = new Set<EditManagerSummaryFormatVersion>([
|
|
51
|
+
EditManagerSummaryFormatVersion.v1,
|
|
52
|
+
EditManagerSummaryFormatVersion.v2,
|
|
53
|
+
]);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Returns the summary version to use as per the given minimum version for collab.
|
|
57
|
+
*/
|
|
58
|
+
function minVersionToEditManagerSummaryFormatVersion(
|
|
59
|
+
version: MinimumVersionForCollab,
|
|
60
|
+
): EditManagerSummaryFormatVersion {
|
|
61
|
+
// Currently, version 2 is written which adds metadata blob to the summary.
|
|
62
|
+
return EditManagerSummaryFormatVersion.v2;
|
|
63
|
+
}
|
|
36
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Provides methods for summarizing and loading an `EditManager`
|
|
67
|
+
*/
|
|
68
|
+
export class EditManagerSummarizer<TChangeset>
|
|
69
|
+
extends VersionedSummarizer<EditManagerSummaryFormatVersion>
|
|
70
|
+
implements Summarizable
|
|
71
|
+
{
|
|
72
|
+
public static readonly key = "EditManager";
|
|
37
73
|
public constructor(
|
|
38
74
|
private readonly editManager: EditManager<
|
|
39
75
|
ChangeFamilyEditor,
|
|
@@ -47,30 +83,36 @@ export class EditManagerSummarizer<TChangeset> implements Summarizable {
|
|
|
47
83
|
EditManagerEncodingContext
|
|
48
84
|
>,
|
|
49
85
|
private readonly idCompressor: IIdCompressor,
|
|
86
|
+
minVersionForCollab: MinimumVersionForCollab,
|
|
50
87
|
private readonly schemaAndPolicy?: SchemaAndPolicy,
|
|
51
|
-
) {
|
|
88
|
+
) {
|
|
89
|
+
super(
|
|
90
|
+
EditManagerSummarizer.key,
|
|
91
|
+
minVersionToEditManagerSummaryFormatVersion(minVersionForCollab),
|
|
92
|
+
supportedVersions,
|
|
93
|
+
true /* supportPreVersioningFormat */,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
52
96
|
|
|
53
|
-
|
|
97
|
+
protected summarizeInternal(props: {
|
|
54
98
|
stringify: SummaryElementStringifier;
|
|
55
99
|
fullTree?: boolean;
|
|
56
100
|
trackState?: boolean;
|
|
57
101
|
telemetryContext?: ITelemetryContext;
|
|
58
102
|
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
private summarizeCore(stringify: SummaryElementStringifier): ISummaryTreeWithStats {
|
|
103
|
+
builder: SummaryTreeBuilder;
|
|
104
|
+
}): void {
|
|
105
|
+
const { stringify, builder } = props;
|
|
64
106
|
const context: EditManagerEncodingContext =
|
|
65
107
|
this.schemaAndPolicy !== undefined
|
|
66
108
|
? { schema: this.schemaAndPolicy, idCompressor: this.idCompressor }
|
|
67
109
|
: { idCompressor: this.idCompressor };
|
|
68
110
|
const jsonCompatible = this.codec.encode(this.editManager.getSummaryData(), context);
|
|
69
111
|
const dataString = stringify(jsonCompatible);
|
|
70
|
-
|
|
112
|
+
builder.addBlob(stringKey, dataString);
|
|
71
113
|
}
|
|
72
114
|
|
|
73
|
-
|
|
115
|
+
protected async loadInternal(
|
|
74
116
|
services: IChannelStorageService,
|
|
75
117
|
parse: SummaryElementParser,
|
|
76
118
|
): Promise<void> {
|
|
@@ -23,12 +23,18 @@ export {
|
|
|
23
23
|
|
|
24
24
|
export {
|
|
25
25
|
SharedTreeCore,
|
|
26
|
-
type Summarizable,
|
|
27
|
-
type SummaryElementParser,
|
|
28
|
-
type SummaryElementStringifier,
|
|
29
26
|
type ClonableSchemaAndPolicy,
|
|
30
27
|
type SharedTreeCoreOptionsInternal,
|
|
31
28
|
} from "./sharedTreeCore.js";
|
|
29
|
+
export {
|
|
30
|
+
SharedTreeSummaryFormatVersion,
|
|
31
|
+
type SharedTreeSummarizableMetadata,
|
|
32
|
+
type Summarizable,
|
|
33
|
+
type SummaryElementParser,
|
|
34
|
+
type SummaryElementStringifier,
|
|
35
|
+
summarizablesMetadataKey,
|
|
36
|
+
} from "./summaryTypes.js";
|
|
37
|
+
export { VersionedSummarizer } from "./versionedSummarizer.js";
|
|
32
38
|
|
|
33
39
|
export type { ResubmitMachine } from "./resubmitMachine.js";
|
|
34
40
|
export { DefaultResubmitMachine } from "./defaultResubmitMachine.js";
|
|
@@ -65,10 +71,13 @@ export type {
|
|
|
65
71
|
EncodedCommit,
|
|
66
72
|
} from "./editManagerFormatCommons.js";
|
|
67
73
|
|
|
74
|
+
export type { DecodedMessage } from "./messageTypes.js";
|
|
68
75
|
export {
|
|
69
76
|
getCodecTreeForMessageFormatWithChange,
|
|
70
77
|
clientVersionToMessageFormatVersion,
|
|
71
78
|
messageFormatVersionSelectorForSharedBranches,
|
|
79
|
+
makeMessageCodec,
|
|
80
|
+
type MessageEncodingContext,
|
|
72
81
|
} from "./messageCodecs.js";
|
|
73
82
|
export {
|
|
74
83
|
MessageFormatVersion,
|
|
@@ -14,14 +14,14 @@ import type {
|
|
|
14
14
|
} from "../core/index.js";
|
|
15
15
|
import type { JsonCompatibleReadOnly } from "../util/index.js";
|
|
16
16
|
|
|
17
|
-
import { Message } from "./
|
|
17
|
+
import { Message } from "./messageFormatVSharedBranches.js";
|
|
18
18
|
import type { DecodedMessage } from "./messageTypes.js";
|
|
19
19
|
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
20
20
|
import type { MessageEncodingContext } from "./messageCodecs.js";
|
|
21
21
|
import { decodeBranchId, encodeBranchId } from "./branchIdCodec.js";
|
|
22
22
|
import type { MessageFormatVersion } from "./messageFormat.js";
|
|
23
23
|
|
|
24
|
-
export function
|
|
24
|
+
export function makeSharedBranchesCodecWithVersion<TChangeset>(
|
|
25
25
|
changeCodec: ChangeFamilyCodec<TChangeset>,
|
|
26
26
|
revisionTagCodec: IJsonCodec<
|
|
27
27
|
RevisionTag,
|
|
@@ -30,7 +30,7 @@ export function makeV5CodecWithVersion<TChangeset>(
|
|
|
30
30
|
ChangeEncodingContext
|
|
31
31
|
>,
|
|
32
32
|
options: ICodecOptions,
|
|
33
|
-
version: typeof MessageFormatVersion.
|
|
33
|
+
version: typeof MessageFormatVersion.vSharedBranches,
|
|
34
34
|
): IJsonCodec<
|
|
35
35
|
DecodedMessage<TChangeset>,
|
|
36
36
|
JsonCompatibleReadOnly,
|
|
@@ -29,12 +29,12 @@ import type {
|
|
|
29
29
|
RevisionTag,
|
|
30
30
|
SchemaAndPolicy,
|
|
31
31
|
} from "../core/index.js";
|
|
32
|
-
import { brand, type JsonCompatibleReadOnly } from "../util/index.js";
|
|
32
|
+
import { brand, unbrand, type JsonCompatibleReadOnly } from "../util/index.js";
|
|
33
33
|
|
|
34
34
|
import type { DecodedMessage } from "./messageTypes.js";
|
|
35
35
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
36
36
|
import { makeV1ToV4CodecWithVersion } from "./messageCodecV1ToV4.js";
|
|
37
|
-
import {
|
|
37
|
+
import { makeSharedBranchesCodecWithVersion } from "./messageCodecVSharedBranches.js";
|
|
38
38
|
import { MessageFormatVersion, messageFormatVersions } from "./messageFormat.js";
|
|
39
39
|
|
|
40
40
|
export interface MessageEncodingContext {
|
|
@@ -79,7 +79,7 @@ function messageFormatVersionFromOptions(
|
|
|
79
79
|
export function messageFormatVersionSelectorForSharedBranches(
|
|
80
80
|
clientVersion: MinimumVersionForCollab,
|
|
81
81
|
): MessageFormatVersion {
|
|
82
|
-
return brand(MessageFormatVersion.
|
|
82
|
+
return brand(MessageFormatVersion.vSharedBranches);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export function makeMessageCodec<TChangeset>(
|
|
@@ -132,18 +132,18 @@ export function makeMessageCodecs<TChangeset>(
|
|
|
132
132
|
>,
|
|
133
133
|
][] = Array.from(messageFormatVersions).map((version) => {
|
|
134
134
|
switch (version) {
|
|
135
|
-
case MessageFormatVersion.undefined:
|
|
136
|
-
case MessageFormatVersion.v1:
|
|
137
|
-
case MessageFormatVersion.v2: {
|
|
135
|
+
case unbrand(MessageFormatVersion.undefined):
|
|
136
|
+
case unbrand(MessageFormatVersion.v1):
|
|
137
|
+
case unbrand(MessageFormatVersion.v2): {
|
|
138
138
|
const versionOrUndefined =
|
|
139
|
-
version === MessageFormatVersion.undefined ? undefined : version;
|
|
139
|
+
version === unbrand(MessageFormatVersion.undefined) ? undefined : version;
|
|
140
140
|
return [
|
|
141
141
|
versionOrUndefined,
|
|
142
142
|
makeDiscontinuedCodecVersion(options, versionOrUndefined, "2.73.0"),
|
|
143
143
|
];
|
|
144
144
|
}
|
|
145
|
-
case MessageFormatVersion.v3:
|
|
146
|
-
case MessageFormatVersion.v4: {
|
|
145
|
+
case unbrand(MessageFormatVersion.v3):
|
|
146
|
+
case unbrand(MessageFormatVersion.v4): {
|
|
147
147
|
const changeCodec = changeCodecs.resolve(
|
|
148
148
|
dependentChangeFormatVersion.lookup(version),
|
|
149
149
|
).json;
|
|
@@ -152,13 +152,15 @@ export function makeMessageCodecs<TChangeset>(
|
|
|
152
152
|
makeV1ToV4CodecWithVersion(changeCodec, revisionTagCodec, options, version),
|
|
153
153
|
];
|
|
154
154
|
}
|
|
155
|
-
case MessageFormatVersion.v5:
|
|
155
|
+
case unbrand(MessageFormatVersion.v5):
|
|
156
|
+
return [version, makeDiscontinuedCodecVersion(options, version, "2.74.0")];
|
|
157
|
+
case unbrand(MessageFormatVersion.vSharedBranches): {
|
|
156
158
|
const changeCodec = changeCodecs.resolve(
|
|
157
159
|
dependentChangeFormatVersion.lookup(version),
|
|
158
160
|
).json;
|
|
159
161
|
return [
|
|
160
162
|
version,
|
|
161
|
-
|
|
163
|
+
makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, options, version),
|
|
162
164
|
];
|
|
163
165
|
}
|
|
164
166
|
default:
|