@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
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import type {
|
|
8
|
-
IExperimentalIncrementalSummaryContext,
|
|
9
|
-
ISummaryTreeWithStats,
|
|
10
|
-
} from "@fluidframework/runtime-definitions/internal";
|
|
7
|
+
import type { IExperimentalIncrementalSummaryContext } from "@fluidframework/runtime-definitions/internal";
|
|
11
8
|
import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
|
|
12
9
|
import {
|
|
13
10
|
brand,
|
|
@@ -30,21 +27,7 @@ import type { ISnapshotTree } from "@fluidframework/driver-definitions/internal"
|
|
|
30
27
|
import { LoggingError } from "@fluidframework/telemetry-utils/internal";
|
|
31
28
|
import type { IFluidHandle } from "@fluidframework/core-interfaces";
|
|
32
29
|
import type { SummaryElementStringifier } from "../../shared-tree-core/index.js";
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The key for the blob under ForestSummarizer's root.
|
|
36
|
-
* This blob contains the ForestCodec's output.
|
|
37
|
-
* See {@link ForestIncrementalSummaryBuilder} for details on the summary structure.
|
|
38
|
-
*/
|
|
39
|
-
export const forestSummaryContentKey = "ForestTree";
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The contents of an incremental chunk is under a summary tree node with its {@link ChunkReferenceId} as the key.
|
|
43
|
-
* The inline portion of the chunk content is encoded with the forest codec is stored in a blob with this key.
|
|
44
|
-
* The rest of the chunk contents is stored in the summary tree under the summary tree node.
|
|
45
|
-
* See the summary format in {@link ForestIncrementalSummaryBuilder} for more details.
|
|
46
|
-
*/
|
|
47
|
-
const chunkContentsBlobKey = "contents";
|
|
30
|
+
import { summaryContentBlobKey } from "./summaryFormatV3.js";
|
|
48
31
|
|
|
49
32
|
/**
|
|
50
33
|
* State that tells whether a summary is currently being tracked.
|
|
@@ -206,7 +189,7 @@ function validateReadyToTrackSummary(
|
|
|
206
189
|
*
|
|
207
190
|
* An example summary tree with incremental summary:
|
|
208
191
|
* Forest
|
|
209
|
-
* ├──
|
|
192
|
+
* ├── contents
|
|
210
193
|
* ├── 0
|
|
211
194
|
* | ├── contents
|
|
212
195
|
* | ├── 1
|
|
@@ -219,7 +202,7 @@ function validateReadyToTrackSummary(
|
|
|
219
202
|
* | ├── ...
|
|
220
203
|
* ├── 5 - "/.../Forest/ForestTree/5"
|
|
221
204
|
* - Forest is a summary tree node added by the shared tree and contains the following:
|
|
222
|
-
* - The inline portion of the top-level forest content is stored in a summary blob called "
|
|
205
|
+
* - The inline portion of the top-level forest content is stored in a summary blob called "contents".
|
|
223
206
|
* It also contains the {@link ChunkReferenceId}s of the incremental chunks under it.
|
|
224
207
|
* - The summary for each incremental chunk under it is stored against its {@link ChunkReferenceId}.
|
|
225
208
|
* - For each chunk, the structure of the summary tree is the same as the Forest. It contains the following:
|
|
@@ -227,16 +210,6 @@ function validateReadyToTrackSummary(
|
|
|
227
210
|
* It also contains the {@link ChunkReferenceId}s of the incremental chunks under it.
|
|
228
211
|
* - The summary for each incremental chunk under it is stored against its {@link ChunkReferenceId}.
|
|
229
212
|
* - Chunks that do not change between summaries are summarized as handles in the summary tree.
|
|
230
|
-
* @remarks
|
|
231
|
-
* It may seem inconsistent that although the structure for the top-level forest tree is similar to that of
|
|
232
|
-
* an incremental chunk, its content is stored in a summary blob called "ForestTree" while the content for
|
|
233
|
-
* the incremental chunks are stored in a summary blob called "contents".
|
|
234
|
-
* This is to keep this summary backwards compatible with old format (before incremental summaries were added)
|
|
235
|
-
* where the entire forest content was in a summary blob called "ForestTree". So, if incremental summaries were
|
|
236
|
-
* disabled, the forest content will be fully backwards compatible.
|
|
237
|
-
* Note that this limits reusing the root node in a location other than root and a non-root node in the root.
|
|
238
|
-
* We could phase this out by switching to write the top-level contents under "contents" if we want to support
|
|
239
|
-
* the above. However, there is no plan to do that for now.
|
|
240
213
|
*
|
|
241
214
|
* TODO: AB#46752
|
|
242
215
|
* Add strong types for the summary structure to document it better. It will help make it super clear what the actual
|
|
@@ -299,11 +272,13 @@ export class ForestIncrementalSummaryBuilder implements IncrementalEncoderDecode
|
|
|
299
272
|
* contents of the chunks.
|
|
300
273
|
* @param readAndParse - A function that reads and parses a blob from the storage service.
|
|
301
274
|
*/
|
|
302
|
-
public async load(
|
|
303
|
-
services: IChannelStorageService
|
|
304
|
-
readAndParseChunk: <T extends JsonCompatible<IFluidHandle>>(
|
|
305
|
-
|
|
306
|
-
|
|
275
|
+
public async load(args: {
|
|
276
|
+
services: IChannelStorageService;
|
|
277
|
+
readAndParseChunk: <T extends JsonCompatible<IFluidHandle>>(
|
|
278
|
+
chunkBlobPath: string,
|
|
279
|
+
) => Promise<T>;
|
|
280
|
+
}): Promise<void> {
|
|
281
|
+
const forestTree = args.services.getSnapshotTree?.();
|
|
307
282
|
// Snapshot tree should be available when loading forest's contents. However, it is an optional function
|
|
308
283
|
// and may not be implemented by the storage service.
|
|
309
284
|
if (forestTree === undefined) {
|
|
@@ -320,13 +295,14 @@ export class ForestIncrementalSummaryBuilder implements IncrementalEncoderDecode
|
|
|
320
295
|
// and the value is the snapshot tree for the chunk.
|
|
321
296
|
for (const [chunkReferenceId, chunkSnapshotTree] of Object.entries(snapshotTree.trees)) {
|
|
322
297
|
const chunkSubTreePath = `${parentTreeKey}${chunkReferenceId}`;
|
|
323
|
-
const chunkContentsPath = `${chunkSubTreePath}/${
|
|
324
|
-
if (!(await services.contains(chunkContentsPath))) {
|
|
298
|
+
const chunkContentsPath = `${chunkSubTreePath}/${summaryContentBlobKey}`;
|
|
299
|
+
if (!(await args.services.contains(chunkContentsPath))) {
|
|
325
300
|
throw new LoggingError(
|
|
326
301
|
`SharedTree: Cannot find contents for incremental chunk ${chunkContentsPath}`,
|
|
327
302
|
);
|
|
328
303
|
}
|
|
329
|
-
const chunkContents =
|
|
304
|
+
const chunkContents =
|
|
305
|
+
await args.readAndParseChunk<EncodedFieldBatch>(chunkContentsPath);
|
|
330
306
|
this.loadedChunksMap.set(chunkReferenceId, {
|
|
331
307
|
encodedContents: chunkContents,
|
|
332
308
|
summaryPath: chunkSubTreePath,
|
|
@@ -357,8 +333,9 @@ export class ForestIncrementalSummaryBuilder implements IncrementalEncoderDecode
|
|
|
357
333
|
fullTree: boolean;
|
|
358
334
|
incrementalSummaryContext: IExperimentalIncrementalSummaryContext | undefined;
|
|
359
335
|
stringify: SummaryElementStringifier;
|
|
336
|
+
builder: SummaryTreeBuilder;
|
|
360
337
|
}): ForestIncrementalSummaryBehavior {
|
|
361
|
-
const { fullTree, incrementalSummaryContext, stringify } = args;
|
|
338
|
+
const { fullTree, incrementalSummaryContext, stringify, builder } = args;
|
|
362
339
|
// If there is no incremental summary context, do not summarize incrementally. This happens in two scenarios:
|
|
363
340
|
// 1. When summarizing a detached container, i.e., the first ever summary.
|
|
364
341
|
// 2. When running GC, the default behavior is to call summarize on DDS without incrementalSummaryContext.
|
|
@@ -374,7 +351,7 @@ export class ForestIncrementalSummaryBuilder implements IncrementalEncoderDecode
|
|
|
374
351
|
summarySequenceNumber: incrementalSummaryContext.summarySequenceNumber,
|
|
375
352
|
latestSummaryBasePath: incrementalSummaryContext.summaryPath,
|
|
376
353
|
chunkSummaryPath: [],
|
|
377
|
-
parentSummaryBuilder:
|
|
354
|
+
parentSummaryBuilder: builder,
|
|
378
355
|
fullTree,
|
|
379
356
|
stringify,
|
|
380
357
|
};
|
|
@@ -435,7 +412,7 @@ export class ForestIncrementalSummaryBuilder implements IncrementalEncoderDecode
|
|
|
435
412
|
const chunkSummaryBuilder = new SummaryTreeBuilder();
|
|
436
413
|
this.trackedSummaryProperties.parentSummaryBuilder = chunkSummaryBuilder;
|
|
437
414
|
chunkSummaryBuilder.addBlob(
|
|
438
|
-
|
|
415
|
+
summaryContentBlobKey,
|
|
439
416
|
this.trackedSummaryProperties.stringify(chunkEncoder(chunk)),
|
|
440
417
|
);
|
|
441
418
|
|
|
@@ -467,27 +444,33 @@ export class ForestIncrementalSummaryBuilder implements IncrementalEncoderDecode
|
|
|
467
444
|
* It clears any tracking state and deletes the tracking properties for summaries that are older than the
|
|
468
445
|
* latest successful summary.
|
|
469
446
|
* @param incrementalSummaryContext - The context for the incremental summary that contains the sequence numbers.
|
|
470
|
-
* If this is undefined, the summary tree will only contain a summary blob for `
|
|
471
|
-
* @param
|
|
447
|
+
* If this is undefined, the summary tree will only contain a summary blob for `forestSummaryRootContent`.
|
|
448
|
+
* @param forestSummaryRootContent - The stringified ForestCodec output of top-level Forest content.
|
|
449
|
+
* @param forestSummaryRootContentKey - The key to use for the blob containing `forestSummaryRootContent`.
|
|
450
|
+
* @param builder - The summary tree builder to use to add the forest's contents. Note that if tracking an incremental
|
|
451
|
+
* summary, this builder will be the same as the one tracked in `trackedSummaryProperties`.
|
|
472
452
|
* @returns the Forest's summary tree.
|
|
473
453
|
*/
|
|
474
454
|
public completeSummary(args: {
|
|
475
455
|
incrementalSummaryContext: IExperimentalIncrementalSummaryContext | undefined;
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
456
|
+
forestSummaryRootContent: string;
|
|
457
|
+
forestSummaryRootContentKey: string;
|
|
458
|
+
builder: SummaryTreeBuilder;
|
|
459
|
+
}): void {
|
|
460
|
+
const {
|
|
461
|
+
incrementalSummaryContext,
|
|
462
|
+
forestSummaryRootContent,
|
|
463
|
+
forestSummaryRootContentKey,
|
|
464
|
+
builder,
|
|
465
|
+
} = args;
|
|
479
466
|
if (!this.enableIncrementalSummary || incrementalSummaryContext === undefined) {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
return summaryBuilder.getSummaryTree();
|
|
467
|
+
builder.addBlob(forestSummaryRootContentKey, forestSummaryRootContent);
|
|
468
|
+
return;
|
|
483
469
|
}
|
|
484
470
|
|
|
485
471
|
validateTrackingSummary(this.forestSummaryState, this.trackedSummaryProperties);
|
|
486
472
|
|
|
487
|
-
|
|
488
|
-
forestSummaryContentKey,
|
|
489
|
-
forestSummaryContent,
|
|
490
|
-
);
|
|
473
|
+
builder.addBlob(forestSummaryRootContentKey, forestSummaryRootContent);
|
|
491
474
|
|
|
492
475
|
// Copy over the entries from the latest summary to the current summary.
|
|
493
476
|
// In the current summary, there can be fields that haven't changed since the latest summary and the chunks
|
|
@@ -516,9 +499,7 @@ export class ForestIncrementalSummaryBuilder implements IncrementalEncoderDecode
|
|
|
516
499
|
}
|
|
517
500
|
|
|
518
501
|
this.forestSummaryState = ForestSummaryTrackingState.ReadyToTrack;
|
|
519
|
-
const summaryTree = this.trackedSummaryProperties.parentSummaryBuilder.getSummaryTree();
|
|
520
502
|
this.trackedSummaryProperties = undefined;
|
|
521
|
-
return summaryTree;
|
|
522
503
|
}
|
|
523
504
|
|
|
524
505
|
/**
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export {
|
|
6
|
+
export { ForestSummarizer } from "./forestSummarizer.js";
|
|
7
7
|
export { getCodecTreeForForestFormat } from "./codec.js";
|
|
8
|
-
export { ForestFormatVersion } from "./
|
|
8
|
+
export { ForestFormatVersion } from "./formatCommon.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The key for the tree that contains the overall forest's summary tree.
|
|
8
|
+
* This tree is added by the parent of the forest summarizer.
|
|
9
|
+
* See {@link ForestIncrementalSummaryBuilder} for details on the summary structure.
|
|
10
|
+
*/
|
|
11
|
+
export const forestSummaryKey = "Forest";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The versions for the forest summary.
|
|
15
|
+
*/
|
|
16
|
+
export enum ForestSummaryFormatVersion {
|
|
17
|
+
/**
|
|
18
|
+
* This version represents summary format before summary versioning was introduced.
|
|
19
|
+
*/
|
|
20
|
+
v1 = 1,
|
|
21
|
+
/**
|
|
22
|
+
* This version adds metadata to the summary. This is backward compatible with version 1.
|
|
23
|
+
*/
|
|
24
|
+
v2 = 2,
|
|
25
|
+
/**
|
|
26
|
+
* This version adds support for summaries with incremental chunks. Also, the ForestSummarizer's root contents are
|
|
27
|
+
* stored in {@link summaryContentBlobKeyV3} instead of {@link summaryContentBlobKeyV1}.
|
|
28
|
+
* This is not backward compatible with versions 1 and 2.
|
|
29
|
+
*/
|
|
30
|
+
v3 = 3,
|
|
31
|
+
/**
|
|
32
|
+
* The latest version of the summary. Must be updated when a new version is added.
|
|
33
|
+
*/
|
|
34
|
+
vLatest = v3,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const supportedForestSummaryFormatVersions = new Set<ForestSummaryFormatVersion>([
|
|
38
|
+
ForestSummaryFormatVersion.v1,
|
|
39
|
+
ForestSummaryFormatVersion.v2,
|
|
40
|
+
ForestSummaryFormatVersion.v3,
|
|
41
|
+
]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The entire contents of the ForestSummarizer's summary (ForestCodec's output) is added to a blob with this key.
|
|
8
|
+
* This was added in {@link ForestSummaryFormatVersion.v1 | version 1} and is used in
|
|
9
|
+
* {@link ForestSummaryFormatVersion.v1 | version 1} and {@link ForestSummaryFormatVersion.v2 | version 2}.
|
|
10
|
+
*/
|
|
11
|
+
export const summaryContentBlobKey = "ForestTree";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* From {@link ForestSummaryFormatVersion.v3 | version 3} onwards, the inline portion of the top-level forest content
|
|
8
|
+
* is stored in a summary blob with this key.
|
|
9
|
+
* If the summary is not incremental, the content stored is the entire forest content.
|
|
10
|
+
* If the summary is incremental, the contents of the incremental chunks is stored separately:
|
|
11
|
+
* The contents of an incremental chunk is under a summary tree node with its {@link ChunkReferenceId} as the key.
|
|
12
|
+
* The inline portion of the chunk content is encoded with the forest codec and is stored in a blob with this key as
|
|
13
|
+
* well. The rest of the chunk contents is stored in the summary tree under the summary tree node.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* See the summary format in {@link ForestIncrementalSummaryBuilder} for more details.
|
|
17
|
+
*/
|
|
18
|
+
export const summaryContentBlobKey = "contents";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
|
|
7
|
+
import {
|
|
8
|
+
getConfigForMinVersionForCollab,
|
|
9
|
+
lowestMinVersionForCollab,
|
|
10
|
+
} from "@fluidframework/runtime-utils/internal";
|
|
11
|
+
|
|
12
|
+
import { FluidClientVersion } from "../../codec/index.js";
|
|
13
|
+
import { ForestSummaryFormatVersion } from "./summaryFormatCommon.js";
|
|
14
|
+
import { summaryContentBlobKey as summaryContentBlobKeyV1ToV2 } from "./summaryFormatV1ToV2.js";
|
|
15
|
+
import { summaryContentBlobKey as summaryContentBlobKeyV3 } from "./summaryFormatV3.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Returns the summary format version to use as per the given minimum version for collab.
|
|
19
|
+
*/
|
|
20
|
+
export function minVersionToForestSummaryFormatVersion(
|
|
21
|
+
version: MinimumVersionForCollab,
|
|
22
|
+
): ForestSummaryFormatVersion {
|
|
23
|
+
return getConfigForMinVersionForCollab(version, {
|
|
24
|
+
[lowestMinVersionForCollab]: ForestSummaryFormatVersion.v2,
|
|
25
|
+
[FluidClientVersion.v2_74]: ForestSummaryFormatVersion.v3,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Gets the key for the blob containing the forest summary root content based on the summary format version.
|
|
31
|
+
* @param summaryFormatVersion - The version of the forest summary format.
|
|
32
|
+
* @returns The key for the forest summary root content blob.
|
|
33
|
+
*/
|
|
34
|
+
export function getForestRootSummaryContentKey(
|
|
35
|
+
summaryFormatVersion: ForestSummaryFormatVersion | undefined,
|
|
36
|
+
): string {
|
|
37
|
+
return summaryFormatVersion === undefined ||
|
|
38
|
+
summaryFormatVersion < ForestSummaryFormatVersion.v3
|
|
39
|
+
? summaryContentBlobKeyV1ToV2
|
|
40
|
+
: summaryContentBlobKeyV3;
|
|
41
|
+
}
|
|
@@ -12,7 +12,7 @@ export { allowsValue, assertAllowedValue, isTreeValue } from "./valueUtilities.j
|
|
|
12
12
|
export {
|
|
13
13
|
ForestSummarizer,
|
|
14
14
|
getCodecTreeForForestFormat,
|
|
15
|
-
|
|
15
|
+
ForestFormatVersion,
|
|
16
16
|
} from "./forest-summary/index.js";
|
|
17
17
|
export {
|
|
18
18
|
cursorForMapTreeField,
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert, fail } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { assert, fail, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
LeafNodeStoredSchema,
|
|
10
10
|
MapNodeStoredSchema,
|
|
11
|
+
Multiplicity,
|
|
11
12
|
ObjectNodeStoredSchema,
|
|
12
13
|
type TreeFieldStoredSchema,
|
|
13
14
|
type TreeNodeStoredSchema,
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
import { compareSets } from "../../util/index.js";
|
|
20
21
|
|
|
21
22
|
import type { FullSchemaPolicy } from "./fieldKind.js";
|
|
22
|
-
import { isNeverTree } from "./isNeverTree.js";
|
|
23
|
+
import { isNeverField, isNeverTree } from "./isNeverTree.js";
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
* Returns true iff `superset` is a superset of `original`.
|
|
@@ -125,16 +126,47 @@ export function allowsValueSuperset(
|
|
|
125
126
|
* Returns true iff `superset` is a superset of `original`.
|
|
126
127
|
*
|
|
127
128
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
129
|
+
*
|
|
130
|
+
* @param monotonicOnly - If true, only allow changes of field kinds which are explicitly listed in {@link FieldKindOptions.allowMonotonicUpgradeFrom}.
|
|
131
|
+
* This prevents this function from considering two different schema as equivalent, preventing upgrades which would allow their inverse.
|
|
132
|
+
* This prevents infinite upgrade loops where two clients could keep upgrading between two schema.
|
|
133
|
+
*
|
|
134
|
+
* @remarks
|
|
135
|
+
* True if a client should be able to {@link TreeView.upgradeSchema} from a field schema using this field kind and `originalTypes` to `superset`.
|
|
136
|
+
*
|
|
137
|
+
* @privateRemarks
|
|
138
|
+
* See also {@link FieldKindOptions.allowMonotonicUpgradeFrom} for constraints on the implementation.
|
|
128
139
|
*/
|
|
129
140
|
export function allowsFieldSuperset(
|
|
130
141
|
policy: FullSchemaPolicy,
|
|
131
142
|
originalData: TreeStoredSchema,
|
|
132
143
|
original: TreeFieldStoredSchema,
|
|
133
144
|
superset: TreeFieldStoredSchema,
|
|
145
|
+
monotonicOnly: boolean = true,
|
|
134
146
|
): boolean {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
147
|
+
if (!monotonicOnly) {
|
|
148
|
+
if (isNeverField(policy, originalData, original)) {
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (!allowsTreeSchemaIdentifierSuperset(original.types, superset.types)) {
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (original.kind === superset.kind) {
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const supersetKind = policy.fieldKinds.get(superset.kind) ?? fail(0xb1b /* missing kind */);
|
|
162
|
+
|
|
163
|
+
if (monotonicOnly) {
|
|
164
|
+
return supersetKind.options.allowMonotonicUpgradeFrom.has(original.kind);
|
|
165
|
+
} else {
|
|
166
|
+
const originalKind =
|
|
167
|
+
policy.fieldKinds.get(original.kind) ?? fail(0xcab /* missing kind */);
|
|
168
|
+
return allowsMultiplicitySuperset(originalKind.multiplicity, supersetKind.multiplicity);
|
|
169
|
+
}
|
|
138
170
|
}
|
|
139
171
|
|
|
140
172
|
/**
|
|
@@ -192,3 +224,30 @@ export function allowsRepoSuperset(
|
|
|
192
224
|
// Therefore, we do not need to check them.
|
|
193
225
|
return true;
|
|
194
226
|
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
230
|
+
*
|
|
231
|
+
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
232
|
+
*/
|
|
233
|
+
export function allowsMultiplicitySuperset(
|
|
234
|
+
original: Multiplicity,
|
|
235
|
+
superset: Multiplicity,
|
|
236
|
+
): boolean {
|
|
237
|
+
if (original === superset) {
|
|
238
|
+
return true;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
switch (superset) {
|
|
242
|
+
case Multiplicity.Forbidden:
|
|
243
|
+
return false;
|
|
244
|
+
case Multiplicity.Optional:
|
|
245
|
+
return original === Multiplicity.Single || original === Multiplicity.Forbidden;
|
|
246
|
+
case Multiplicity.Single:
|
|
247
|
+
return false;
|
|
248
|
+
case Multiplicity.Sequence:
|
|
249
|
+
return true;
|
|
250
|
+
default:
|
|
251
|
+
return unreachableCase(superset);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
@@ -8,14 +8,10 @@ import type {
|
|
|
8
8
|
FieldKindData,
|
|
9
9
|
Multiplicity,
|
|
10
10
|
SchemaPolicy,
|
|
11
|
-
TreeFieldStoredSchema,
|
|
12
|
-
TreeStoredSchema,
|
|
13
|
-
TreeTypeSet,
|
|
14
11
|
} from "../../core/index.js";
|
|
15
12
|
import type { MakeNominal } from "../../util/index.js";
|
|
16
13
|
|
|
17
14
|
import type { FieldChangeHandler, FieldEditor } from "./fieldChangeHandler.js";
|
|
18
|
-
import { isNeverField } from "./isNeverTree.js";
|
|
19
15
|
|
|
20
16
|
/**
|
|
21
17
|
* Functionality for FieldKinds that is stable,
|
|
@@ -54,38 +50,10 @@ export class FlexFieldKind<
|
|
|
54
50
|
public readonly multiplicity: TMultiplicity,
|
|
55
51
|
// TODO: stronger typing
|
|
56
52
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
57
|
-
|
|
53
|
+
public readonly options: FieldKindOptions<FieldChangeHandler<any, TEditor>>,
|
|
58
54
|
) {
|
|
59
55
|
this.changeHandler = options.changeHandler;
|
|
60
56
|
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Returns true if and only if `superset` permits a (non-strict) superset of the subtrees
|
|
64
|
-
* allowed by field made from `this` and `originalTypes`.
|
|
65
|
-
*
|
|
66
|
-
* TODO: clarify the relationship between this and FieldKindData, and issues with cyclic schema upgrades.
|
|
67
|
-
*/
|
|
68
|
-
public allowsFieldSuperset(
|
|
69
|
-
policy: SchemaPolicy,
|
|
70
|
-
originalData: TreeStoredSchema,
|
|
71
|
-
originalTypes: TreeTypeSet,
|
|
72
|
-
superset: TreeFieldStoredSchema,
|
|
73
|
-
): boolean {
|
|
74
|
-
if (
|
|
75
|
-
isNeverField(policy, originalData, {
|
|
76
|
-
kind: this.identifier,
|
|
77
|
-
types: originalTypes,
|
|
78
|
-
// Metadata is not used for this check.
|
|
79
|
-
persistedMetadata: undefined,
|
|
80
|
-
})
|
|
81
|
-
) {
|
|
82
|
-
return true;
|
|
83
|
-
}
|
|
84
|
-
if (isNeverField(policy, originalData, superset)) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
return this.options.allowsTreeSupersetOf(originalTypes, superset);
|
|
88
|
-
}
|
|
89
57
|
}
|
|
90
58
|
|
|
91
59
|
/**
|
|
@@ -101,15 +69,31 @@ export interface FieldKindOptions<TFieldChangeHandler> {
|
|
|
101
69
|
readonly changeHandler: TFieldChangeHandler;
|
|
102
70
|
|
|
103
71
|
/**
|
|
104
|
-
*
|
|
105
|
-
* allowed by field made from `this` and `originalTypes`.
|
|
72
|
+
* The set of field kinds which can be migrated to this one by a {@link TreeView.upgradeSchema}.
|
|
106
73
|
* @remarks
|
|
107
|
-
*
|
|
74
|
+
* Must return false if such an upgrade could violate any invariants of `superset` for any document which is compatible with `this` + `originalTypes`.
|
|
75
|
+
*
|
|
76
|
+
* Unlike the rest of the FieldKind API, this may change over time without changing the FieldKind identifier without causing decoherence between clients.
|
|
77
|
+
* It has a different set of constraints:
|
|
78
|
+
*
|
|
79
|
+
* - This must never allow an upgrade that could violate any invariants of any field kind required by any version of client for any document content (that was not already invalid).
|
|
80
|
+
* This prevents a schema upgrade from causing a document to become out of schema.
|
|
81
|
+
* - The set of implementations of this function across all fields kinds and all client versions must never permit a cycle.
|
|
82
|
+
* This prevents applications which simply do an upgrade when possible from being able to have two clients both upgrade where one is actually a down grade and they cause an infinite loop of schema upgrade edits.
|
|
83
|
+
*
|
|
84
|
+
* To help maintain these invariants, any cases where the set of allowed contents does not increase (but is the same so the upgrade is still in schema) must be considered carefully.
|
|
85
|
+
* For example, a migration from `Sequence([])` to `Optional([])` can be problematic despite being permissible
|
|
86
|
+
* as it does not change what content is allowed (the field must be empty either way as no types are allowed in it).
|
|
87
|
+
* Such cases, if allowed, could lead to cycles if their inverse is also allowed.
|
|
88
|
+
* These cases, if supported, can be removed, but if doing so must be documented and still considered when avoiding cycles.
|
|
89
|
+
*
|
|
90
|
+
* Used by {@link allowsFieldSuperset}.
|
|
91
|
+
*
|
|
92
|
+
* TODO: this design is rather limiting, and there is some planned work in this area:
|
|
93
|
+
* - Provide schema upgrade schema not reliant on this to ensure monotonicity of schema upgrades like AB#7482.
|
|
94
|
+
* - This monotonic upgrade scheme can remain useful for features like AB#53604 so it should be kept and refined.
|
|
108
95
|
*/
|
|
109
|
-
readonly
|
|
110
|
-
originalTypes: TreeTypeSet,
|
|
111
|
-
superset: TreeFieldStoredSchema,
|
|
112
|
-
) => boolean;
|
|
96
|
+
readonly allowMonotonicUpgradeFrom: ReadonlySet<FieldKindIdentifier>;
|
|
113
97
|
|
|
114
98
|
/**
|
|
115
99
|
* Kinds (in addition to this) whose edits can be processed by changeHandler.
|
|
@@ -169,7 +169,10 @@ function replaceRevisions(
|
|
|
169
169
|
export const genericFieldKind: FlexFieldKind = new FlexFieldKind(
|
|
170
170
|
brandConst("ModularEditBuilder.Generic")<FieldKindIdentifier>(),
|
|
171
171
|
Multiplicity.Sequence,
|
|
172
|
-
{
|
|
172
|
+
{
|
|
173
|
+
changeHandler: genericChangeHandler,
|
|
174
|
+
allowMonotonicUpgradeFrom: new Set(),
|
|
175
|
+
},
|
|
173
176
|
);
|
|
174
177
|
|
|
175
178
|
/**
|
|
@@ -20,7 +20,6 @@ import { getCodecTreeForSchemaFormat, makeSchemaCodec } from "../schema-index/in
|
|
|
20
20
|
import { EncodedSchemaChange } from "./schemaChangeFormat.js";
|
|
21
21
|
import type { SchemaChange } from "./schemaChangeTypes.js";
|
|
22
22
|
import { SchemaFormatVersion } from "../../core/index.js";
|
|
23
|
-
import { brand } from "../../util/index.js";
|
|
24
23
|
|
|
25
24
|
/**
|
|
26
25
|
* Create a family of schema change codecs.
|
|
@@ -31,8 +30,8 @@ export function makeSchemaChangeCodecs(
|
|
|
31
30
|
options: CodecWriteOptions,
|
|
32
31
|
): ICodecFamily<SchemaChange> {
|
|
33
32
|
return makeCodecFamily([
|
|
34
|
-
[SchemaFormatVersion.v1, makeSchemaChangeCodecV1(options,
|
|
35
|
-
[SchemaFormatVersion.v2, makeSchemaChangeCodecV1(options,
|
|
33
|
+
[SchemaFormatVersion.v1, makeSchemaChangeCodecV1(options, SchemaFormatVersion.v1)],
|
|
34
|
+
[SchemaFormatVersion.v2, makeSchemaChangeCodecV1(options, SchemaFormatVersion.v2)],
|
|
36
35
|
]);
|
|
37
36
|
}
|
|
38
37
|
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
encodeFieldSchemaV2,
|
|
31
31
|
storedSchemaDecodeDispatcher,
|
|
32
32
|
} from "../../core/index.js";
|
|
33
|
-
import { brand, type JsonCompatible } from "../../util/index.js";
|
|
33
|
+
import { brand, unbrand, type JsonCompatible } from "../../util/index.js";
|
|
34
34
|
|
|
35
35
|
import { Format as FormatV1 } from "./formatV1.js";
|
|
36
36
|
import { Format as FormatV2 } from "./formatV2.js";
|
|
@@ -44,12 +44,10 @@ import type { MinimumVersionForCollab } from "@fluidframework/runtime-definition
|
|
|
44
44
|
export function clientVersionToSchemaVersion(
|
|
45
45
|
clientVersion: MinimumVersionForCollab,
|
|
46
46
|
): SchemaFormatVersion {
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
);
|
|
47
|
+
return getConfigForMinVersionForCollab(clientVersion, {
|
|
48
|
+
[lowestMinVersionForCollab]: SchemaFormatVersion.v1,
|
|
49
|
+
[FluidClientVersion.v2_43]: SchemaFormatVersion.v2,
|
|
50
|
+
});
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
export function getCodecTreeForSchemaFormat(
|
|
@@ -101,9 +99,9 @@ export function encodeRepo(
|
|
|
101
99
|
version: SchemaFormatVersion,
|
|
102
100
|
): JsonCompatible {
|
|
103
101
|
switch (version) {
|
|
104
|
-
case SchemaFormatVersion.v1:
|
|
102
|
+
case unbrand(SchemaFormatVersion.v1):
|
|
105
103
|
return encodeRepoV1(repo) as JsonCompatible;
|
|
106
|
-
case SchemaFormatVersion.v2:
|
|
104
|
+
case unbrand(SchemaFormatVersion.v2):
|
|
107
105
|
return encodeRepoV2(repo) as JsonCompatible;
|
|
108
106
|
default:
|
|
109
107
|
unreachableCase(version);
|