@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EACN,+BAA+B,EAC/B,yBAAyB,GACzB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAIN,kBAAkB,EAKlB,eAAe,EACf,4BAA4B,GAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAOhE,OAAO,EAAE,KAAK,EAA+B,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"editManagerCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":"A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,CAAC,OAAO,CAAC,4BAA4B,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;gBACvF,OAAO;oBACN,OAAO;oBACP,kCAAkC,CAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC;iBACnF,CAAC;YACH,CAAC;YACD;gBACC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;IACF,CAAC,CAAC,CAAC;IACH,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,0CAA0C,CACzD,aAAsC,EACtC,YAAuB;IAEvB,OAAO;QACN,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,uCAAuC,CAAC,aAAa,CAAC;QAC/D,QAAQ,EAAE,CAAC,YAAY,CAAC;KACxB,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport { unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport {\n\tgetConfigForMinVersionForCollab,\n\tlowestMinVersionForCollab,\n} from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\ttype CodecTree,\n\ttype CodecWriteOptions,\n\ttype DependentFormatVersion,\n\tFluidClientVersion,\n\ttype FormatVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeDiscontinuedCodecVersion,\n} from \"../codec/index.js\";\nimport { makeVersionDispatchingCodec } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport { brand, unbrand, type JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport type { SummaryData } from \"./editManager.js\";\nimport { makeV1CodecWithVersion } from \"./editManagerCodecsV1toV4.js\";\nimport { makeSharedBranchesCodecWithVersion } from \"./editManagerCodecsVSharedBranches.js\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tEditManagerFormatVersion,\n\teditManagerFormatVersions,\n} from \"./editManagerFormatCommons.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n}\n\n/**\n * Convert a MinimumVersionForCollab to an EditManagerFormatVersion.\n * @param clientVersion - The MinimumVersionForCollab to convert.\n * @returns The EditManagerFormatVersion that corresponds to the provided MinimumVersionForCollab.\n */\nexport function clientVersionToEditManagerFormatVersion(\n\tclientVersion: MinimumVersionForCollab,\n\twriteVersionOverride?: EditManagerFormatVersion,\n): EditManagerFormatVersion {\n\tconst compatibleVersion: EditManagerFormatVersion = brand(\n\t\tgetConfigForMinVersionForCollab(clientVersion, {\n\t\t\t[lowestMinVersionForCollab]: EditManagerFormatVersion.v3,\n\t\t\t[FluidClientVersion.v2_43]: EditManagerFormatVersion.v4,\n\t\t}),\n\t);\n\n\treturn writeVersionOverride ?? compatibleVersion;\n}\n\n/**\n * Returns the version that should be used for testing shared branches.\n */\nexport function editManagerFormatVersionSelectorForSharedBranches(\n\tclientVersion: MinimumVersionForCollab,\n): EditManagerFormatVersion {\n\treturn brand(EditManagerFormatVersion.vSharedBranches);\n}\n\nexport interface EditManagerCodecOptions {\n\treadonly editManagerFormatSelector?: (\n\t\tminVersionForCollab: MinimumVersionForCollab,\n\t) => EditManagerFormatVersion;\n}\n\nfunction editManagerFormatVersionFromOptions(\n\toptions: EditManagerCodecOptions & CodecWriteOptions,\n): EditManagerFormatVersion {\n\tconst selector =\n\t\toptions.editManagerFormatSelector ?? clientVersionToEditManagerFormatVersion;\n\treturn selector(options.minVersionForCollab);\n}\n\nexport function makeEditManagerCodec<TChangeset>(\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,\n\tdependentChangeFormatVersion: DependentFormatVersion<EditManagerFormatVersion>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: EditManagerCodecOptions & CodecWriteOptions,\n): IJsonCodec<\n\tSummaryData<TChangeset>,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tEditManagerEncodingContext\n> {\n\tconst family = makeEditManagerCodecs(\n\t\tchangeCodecs,\n\t\tdependentChangeFormatVersion,\n\t\trevisionTagCodec,\n\t\toptions,\n\t);\n\tconst writeVersion = editManagerFormatVersionFromOptions(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\nexport function makeEditManagerCodecs<TChangeset>(\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,\n\tdependentChangeFormatVersion: DependentFormatVersion<EditManagerFormatVersion>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n): ICodecFamily<SummaryData<TChangeset>, EditManagerEncodingContext> {\n\tconst registry: [\n\t\tFormatVersion,\n\t\tIJsonCodec<\n\t\t\tSummaryData<TChangeset>,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tEditManagerEncodingContext\n\t\t>,\n\t][] = Array.from(editManagerFormatVersions, (version) => {\n\t\tswitch (version) {\n\t\t\tcase unbrand(EditManagerFormatVersion.v1):\n\t\t\tcase unbrand(EditManagerFormatVersion.v2):\n\t\t\t\treturn [version, makeDiscontinuedCodecVersion(options, version, \"2.73.0\")];\n\t\t\tcase unbrand(EditManagerFormatVersion.v3):\n\t\t\tcase unbrand(EditManagerFormatVersion.v4): {\n\t\t\t\tconst changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version));\n\t\t\t\treturn [\n\t\t\t\t\tversion,\n\t\t\t\t\tmakeV1CodecWithVersion(changeCodec, revisionTagCodec, options, version),\n\t\t\t\t];\n\t\t\t}\n\t\t\tcase unbrand(EditManagerFormatVersion.v5):\n\t\t\t\treturn [version, makeDiscontinuedCodecVersion(options, version, \"2.74.0\")];\n\t\t\tcase unbrand(EditManagerFormatVersion.vSharedBranches): {\n\t\t\t\tconst changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version));\n\t\t\t\treturn [\n\t\t\t\t\tversion,\n\t\t\t\t\tmakeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, options, version),\n\t\t\t\t];\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tunreachableCase(version);\n\t\t}\n\t});\n\treturn makeCodecFamily(registry);\n}\n\nexport function getCodecTreeForEditManagerFormatWithChange(\n\tclientVersion: MinimumVersionForCollab,\n\tchangeFormat: CodecTree,\n): CodecTree {\n\treturn {\n\t\tname: \"EditManager\",\n\t\tversion: clientVersionToEditManagerFormatVersion(clientVersion),\n\t\tchildren: [changeFormat],\n\t};\n}\n"]}
|
|
@@ -7,10 +7,10 @@ import { type ICodecOptions, type IJsonCodec, type IMultiFormatCodec } from "../
|
|
|
7
7
|
import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag, SchemaAndPolicy } from "../core/index.js";
|
|
8
8
|
import { type JsonCompatibleReadOnly } from "../util/index.js";
|
|
9
9
|
import type { SummaryData } from "./editManager.js";
|
|
10
|
-
import { EncodedEditManager } from "./
|
|
10
|
+
import { EncodedEditManager } from "./editManagerFormatVSharedBranches.js";
|
|
11
11
|
export interface EditManagerEncodingContext {
|
|
12
12
|
idCompressor: IIdCompressor;
|
|
13
13
|
readonly schema?: SchemaAndPolicy;
|
|
14
14
|
}
|
|
15
|
-
export declare function
|
|
16
|
-
//# sourceMappingURL=
|
|
15
|
+
export declare function makeSharedBranchesCodecWithVersion<TChangeset>(changeCodec: IMultiFormatCodec<TChangeset, JsonCompatibleReadOnly, JsonCompatibleReadOnly, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions, version: EncodedEditManager<TChangeset>["version"]): IJsonCodec<SummaryData<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, EditManagerEncodingContext>;
|
|
16
|
+
//# sourceMappingURL=editManagerCodecsVSharedBranches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editManagerCodecsVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,iBAAiB,EAEtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,KAAK,sBAAsB,EAG3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAA2B,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAK3E,MAAM,WAAW,0BAA0B;IAC1C,YAAY,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CAClC;AAED,wBAAgB,kCAAkC,CAAC,UAAU,EAC5D,WAAW,EAAE,iBAAiB,CAC7B,UAAU,EACV,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,CACrB,EACD,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,GAChD,UAAU,CACZ,WAAW,CAAC,UAAU,CAAC,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,CAC1B,CAkGA"}
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
6
6
|
import { withSchemaValidation, } from "../codec/index.js";
|
|
7
7
|
import { JsonCompatibleReadOnlySchema, } from "../util/index.js";
|
|
8
|
-
import { EncodedEditManager } from "./
|
|
8
|
+
import { EncodedEditManager } from "./editManagerFormatVSharedBranches.js";
|
|
9
9
|
import { decodeSharedBranch, encodeSharedBranch } from "./editManagerCodecsCommons.js";
|
|
10
|
-
export function
|
|
10
|
+
export function makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, options, version) {
|
|
11
11
|
const format = EncodedEditManager(changeCodec.json.encodedSchema ?? JsonCompatibleReadOnlySchema);
|
|
12
12
|
const codec = withSchemaValidation(format, {
|
|
13
13
|
encode: (data, context) => {
|
|
14
14
|
const mainBranch = encodeSharedBranch(changeCodec, revisionTagCodec, data.main, context, data.originator);
|
|
15
|
-
assert(data.originator !== undefined,
|
|
15
|
+
assert(data.originator !== undefined, 0xca5 /* Cannot encode vSharedBranches summary without originator */);
|
|
16
16
|
const json = {
|
|
17
17
|
main: mainBranch,
|
|
18
18
|
originator: data.originator,
|
|
@@ -51,4 +51,4 @@ export function makeV5CodecWithVersion(changeCodec, revisionTagCodec, options, v
|
|
|
51
51
|
// Fixing that would remove the need for this cast.
|
|
52
52
|
return codec;
|
|
53
53
|
}
|
|
54
|
-
//# sourceMappingURL=
|
|
54
|
+
//# sourceMappingURL=editManagerCodecsVSharedBranches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editManagerCodecsVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAG7D,OAAO,EAIN,oBAAoB,GACpB,MAAM,mBAAm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I,CAAC;QACb,CAAC;QACD,MAAM,EAAE,CACP,IAAoC,EACpC,OAAmC,EACT,EAAE;YAC5B,MAAM,UAAU,GAAG,kBAAkB,CACpC,WAAW,EACX,gBAAgB,EAChB,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CAAC;YAEF,MAAM,OAAO,GAAqC;gBACjD,IAAI,EAAE,UAAU;gBAChB,UAAU,EAAE,IAAI,CAAC,UAAU;aAC3B,CAAC;YAEF,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;gBACjC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAiD,CAAC;gBAC1E,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACpC,MAAM,aAAa,GAAG,kBAAkB,CACvC,WAAW,EACX,gBAAgB,EAChB,MAAM,EACN,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CAAC;oBACF,MAAM,CACL,aAAa,CAAC,EAAE,KAAK,SAAS,EAC9B,KAAK,CAAC,qCAAqC,CAC3C,CAAC;oBACF,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;oBAChF,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;gBAC/C,CAAC;gBAED,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC7B,CAAC;YACD,OAAO,OAAO,CAAC;QAChB,CAAC;KACD,EACD,OAAO,CAAC,aAAa,CACrB,CAAC;IACF,2JAA2J;IAC3J,+DAA+D;IAC/D,mDAAmD;IACnD,OAAO,KAKN,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport {\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\ttype IMultiFormatCodec,\n\twithSchemaValidation,\n} from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport {\n\ttype JsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlySchema,\n\ttype Mutable,\n} from \"../util/index.js\";\n\nimport type { SharedBranchSummaryData, SummaryData } from \"./editManager.js\";\nimport { EncodedEditManager } from \"./editManagerFormatVSharedBranches.js\";\nimport { decodeSharedBranch, encodeSharedBranch } from \"./editManagerCodecsCommons.js\";\nimport type { EncodedSharedBranch } from \"./editManagerFormatCommons.js\";\nimport type { BranchId } from \"./branch.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n}\n\nexport function makeSharedBranchesCodecWithVersion<TChangeset>(\n\tchangeCodec: IMultiFormatCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n\tversion: EncodedEditManager<TChangeset>[\"version\"],\n): IJsonCodec<\n\tSummaryData<TChangeset>,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tEditManagerEncodingContext\n> {\n\tconst format = EncodedEditManager(\n\t\tchangeCodec.json.encodedSchema ?? JsonCompatibleReadOnlySchema,\n\t);\n\n\tconst codec: IJsonCodec<\n\t\tSummaryData<TChangeset>,\n\t\tEncodedEditManager<TChangeset>,\n\t\tEncodedEditManager<TChangeset>,\n\t\tEditManagerEncodingContext\n\t> = withSchemaValidation(\n\t\tformat,\n\t\t{\n\t\t\tencode: (data: SummaryData<TChangeset>, context: EditManagerEncodingContext) => {\n\t\t\t\tconst mainBranch = encodeSharedBranch(\n\t\t\t\t\tchangeCodec,\n\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\tdata.main,\n\t\t\t\t\tcontext,\n\t\t\t\t\tdata.originator,\n\t\t\t\t);\n\t\t\t\tassert(\n\t\t\t\t\tdata.originator !== undefined,\n\t\t\t\t\t0xca5 /* Cannot encode vSharedBranches summary without originator */,\n\t\t\t\t);\n\t\t\t\tconst json: Mutable<EncodedEditManager<TChangeset>> = {\n\t\t\t\t\tmain: mainBranch,\n\t\t\t\t\toriginator: data.originator,\n\t\t\t\t\tversion,\n\t\t\t\t};\n\t\t\t\tif (data.branches !== undefined && data.branches.size > 0) {\n\t\t\t\t\tconst branches: EncodedSharedBranch<TChangeset>[] = [];\n\t\t\t\t\tfor (const [_, branch] of data.branches) {\n\t\t\t\t\t\tbranches.push(\n\t\t\t\t\t\t\tencodeSharedBranch(\n\t\t\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\t\tbranch,\n\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\tdata.originator,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tjson.branches = branches;\n\t\t\t\t}\n\t\t\t\treturn json;\n\t\t\t},\n\t\t\tdecode: (\n\t\t\t\tjson: EncodedEditManager<TChangeset>,\n\t\t\t\tcontext: EditManagerEncodingContext,\n\t\t\t): SummaryData<TChangeset> => {\n\t\t\t\tconst mainBranch = decodeSharedBranch(\n\t\t\t\t\tchangeCodec,\n\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\tjson.main,\n\t\t\t\t\tcontext,\n\t\t\t\t\tjson.originator,\n\t\t\t\t);\n\n\t\t\t\tconst decoded: Mutable<SummaryData<TChangeset>> = {\n\t\t\t\t\tmain: mainBranch,\n\t\t\t\t\toriginator: json.originator,\n\t\t\t\t};\n\n\t\t\t\tif (json.branches !== undefined) {\n\t\t\t\t\tconst branches = new Map<BranchId, SharedBranchSummaryData<TChangeset>>();\n\t\t\t\t\tfor (const branch of json.branches) {\n\t\t\t\t\t\tconst decodedBranch = decodeSharedBranch(\n\t\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\tbranch,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tjson.originator,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tdecodedBranch.id !== undefined,\n\t\t\t\t\t\t\t0xc66 /* Shared branches must have an id */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tassert(!branches.has(decodedBranch.id), 0xc67 /* Duplicate shared branch id */);\n\t\t\t\t\t\tbranches.set(decodedBranch.id, decodedBranch);\n\t\t\t\t\t}\n\n\t\t\t\t\tdecoded.branches = branches;\n\t\t\t\t}\n\t\t\t\treturn decoded;\n\t\t\t},\n\t\t},\n\t\toptions.jsonValidator,\n\t);\n\t// TODO: makeVersionedValidatedCodec and withSchemaValidation should allow the codec to decode JsonCompatibleReadOnly, or Versioned or something like that,\n\t// and not leak the internal encoded format in the API surface.\n\t// Fixing that would remove the need for this cast.\n\treturn codec as unknown as IJsonCodec<\n\t\tSummaryData<TChangeset>,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tEditManagerEncodingContext\n\t>;\n}\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type { SessionId } from "@fluidframework/id-compressor";
|
|
6
6
|
import { type Static, type TSchema } from "@sinclair/typebox";
|
|
7
7
|
import { type EncodedRevisionTag, type RevisionTag } from "../core/index.js";
|
|
8
|
-
import { type Brand } from "../util/index.js";
|
|
8
|
+
import { type Brand, type Values } from "../util/index.js";
|
|
9
9
|
import type { EncodedBranchId } from "./branch.js";
|
|
10
10
|
/**
|
|
11
11
|
* Contains a single change to the `SharedTree` and associated metadata.
|
|
@@ -99,36 +99,14 @@ export declare const EncodedSharedBranch: <ChangeSchema extends TSchema>(tChange
|
|
|
99
99
|
* The format version for the EditManager.
|
|
100
100
|
*/
|
|
101
101
|
export declare const EditManagerFormatVersion: {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
readonly
|
|
107
|
-
|
|
108
|
-
* Introduced and retired prior to 2.0.
|
|
109
|
-
* Reading and writing capability removed in 2.73.0.
|
|
110
|
-
*/
|
|
111
|
-
readonly v2: 2;
|
|
112
|
-
/**
|
|
113
|
-
* Introduced prior to 2.0 and used beyond.
|
|
114
|
-
* Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.
|
|
115
|
-
* Writing capability needs to be maintained.
|
|
116
|
-
*/
|
|
117
|
-
readonly v3: 3;
|
|
118
|
-
/**
|
|
119
|
-
* Was inadvertently released in 2.43.0 (through usages of configuredSharedTree) and remains available.
|
|
120
|
-
* Reading capability must be maintained for backwards compatibility.
|
|
121
|
-
* Writing capability needs to be maintained.
|
|
122
|
-
* @privateRemarks TODO: stop writing this version.
|
|
123
|
-
*/
|
|
124
|
-
readonly v4: 4;
|
|
125
|
-
/**
|
|
126
|
-
* Not yet released.
|
|
127
|
-
* Only used for testing shared branches.
|
|
128
|
-
*/
|
|
129
|
-
readonly v5: 5;
|
|
102
|
+
readonly v1: Brand<1, "editManager.FormatVersion">;
|
|
103
|
+
readonly v2: Brand<2, "editManager.FormatVersion">;
|
|
104
|
+
readonly v3: Brand<3, "editManager.FormatVersion">;
|
|
105
|
+
readonly v4: Brand<4, "editManager.FormatVersion">;
|
|
106
|
+
readonly v5: Brand<5, "editManager.FormatVersion">;
|
|
107
|
+
readonly vSharedBranches: Brand<"shared-branches|v0.1", "editManager.FormatVersion">;
|
|
130
108
|
};
|
|
131
|
-
export type EditManagerFormatVersion =
|
|
109
|
+
export type EditManagerFormatVersion = Values<typeof EditManagerFormatVersion>;
|
|
132
110
|
export declare const supportedEditManagerFormatVersions: ReadonlySet<EditManagerFormatVersion>;
|
|
133
111
|
export declare const editManagerFormatVersions: ReadonlySet<EditManagerFormatVersion>;
|
|
134
112
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerFormatCommons.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatCommons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAsB,KAAK,MAAM,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAExF,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAGhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"editManagerFormatCommons.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatCommons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAsB,KAAK,MAAM,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAExF,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAGhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,KAAK,EAAiC,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,WAAW,MAAM,CAAC,UAAU;IACjC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC9B;AAGD,MAAM,MAAM,aAAa,CAAC,UAAU,IAAI;IACvC,QAAQ,CAAC,QAAQ,EAAE,kBAA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E,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC,2BAA2B,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAC1F;AAED,eAAO,MAAM,mBAAmB,0CAA2C,YAAY;;;;;;;;;;;;;;;;;;;;;EAYrF,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;CAsCnC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC/E,eAAO,MAAM,kCAAkC,EAAE,WAAW,CAAC,wBAAwB,CAKlF,CAAC;AACJ,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,wBAAwB,CAE3E,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
6
|
import { RevisionTagSchema, SessionIdSchema, } from "../core/index.js";
|
|
7
|
-
import { brandedNumberType } from "../util/index.js";
|
|
7
|
+
import { brandedNumberType, strictEnum } from "../util/index.js";
|
|
8
8
|
const noAdditionalProps = { additionalProperties: false };
|
|
9
9
|
// Many of the return types in this module are intentionally derived, rather than explicitly specified.
|
|
10
10
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
@@ -40,7 +40,7 @@ export const EncodedSharedBranch = (tChange) => Type.Object({
|
|
|
40
40
|
/**
|
|
41
41
|
* The format version for the EditManager.
|
|
42
42
|
*/
|
|
43
|
-
export const EditManagerFormatVersion = {
|
|
43
|
+
export const EditManagerFormatVersion = strictEnum("editManager.FormatVersion", {
|
|
44
44
|
/**
|
|
45
45
|
* Introduced and retired prior to 2.0.
|
|
46
46
|
* Reading and writing capability removed in 2.73.0.
|
|
@@ -53,27 +53,36 @@ export const EditManagerFormatVersion = {
|
|
|
53
53
|
v2: 2,
|
|
54
54
|
/**
|
|
55
55
|
* Introduced prior to 2.0 and used beyond.
|
|
56
|
-
* Reading capability
|
|
57
|
-
* Writing capability needs to be maintained.
|
|
56
|
+
* Reading capability must be maintained for backwards compatibility.
|
|
57
|
+
* Writing capability needs to be maintained so long as {@link lowestMinVersionForCollab} is less than 2.2.0.
|
|
58
58
|
*/
|
|
59
59
|
v3: 3,
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* Introduced in 2.2.0.
|
|
62
|
+
* Was inadvertently made usable for writing in 2.43.0 (through configuredSharedTree) and remains available.
|
|
62
63
|
* Reading capability must be maintained for backwards compatibility.
|
|
63
|
-
* Writing capability
|
|
64
|
-
*
|
|
64
|
+
* Writing capability could be dropped in favor of {@link EditManagerFormatVersion.v3},
|
|
65
|
+
* but doing so would make the pattern of writable versions more complex and gain little
|
|
66
|
+
* because most of the logic for this format is shared with {@link EditManagerFormatVersion.v3}.
|
|
65
67
|
*/
|
|
66
68
|
v4: 4,
|
|
69
|
+
/**
|
|
70
|
+
* This version number was used internally for testing shared branches.
|
|
71
|
+
* This format was never made stable.
|
|
72
|
+
* This version number is kept here solely to avoid reusing the number: it is not supported for either reading or writing.
|
|
73
|
+
* @deprecated Use {@link EditManagerFormatVersion.vSharedBranches} for testing shared branches.
|
|
74
|
+
*/
|
|
75
|
+
v5: 5,
|
|
67
76
|
/**
|
|
68
77
|
* Not yet released.
|
|
69
78
|
* Only used for testing shared branches.
|
|
70
79
|
*/
|
|
71
|
-
|
|
72
|
-
};
|
|
80
|
+
vSharedBranches: "shared-branches|v0.1",
|
|
81
|
+
});
|
|
73
82
|
export const supportedEditManagerFormatVersions = new Set([
|
|
74
83
|
EditManagerFormatVersion.v3,
|
|
75
84
|
EditManagerFormatVersion.v4,
|
|
76
|
-
EditManagerFormatVersion.
|
|
85
|
+
EditManagerFormatVersion.vSharedBranches,
|
|
77
86
|
]);
|
|
78
87
|
export const editManagerFormatVersions = new Set(Object.values(EditManagerFormatVersion));
|
|
79
88
|
/* eslint-enable @typescript-eslint/explicit-function-return-type */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerFormatCommons.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatCommons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAiD,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAExF,OAAO,EAGN,iBAAiB,EACjB,eAAe,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAc,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"editManagerFormatCommons.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatCommons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAiD,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAExF,OAAO,EAGN,iBAAiB,EACjB,eAAe,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAc,iBAAiB,EAAE,UAAU,EAAe,MAAM,kBAAkB,CAAC;AAuB1F,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE,uGAAuG;AACvG,qEAAqE;AAErE,MAAM,UAAU,GAAG,CAA+B,OAAqB,EAAE,EAAE,CAC1E,IAAI,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,iBAAiB;IAC3B,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,eAAe;CAC1B,CAAC,CAAC;AACJ;;;GAGG;AACH,MAAM,MAAM,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACtE,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAG1D,MAAM,SAAS,GAAG,iBAAiB,CAAY,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;AAElE,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9B,cAAc,EAAE,SAAS;IACzB,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,E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E,CAAC;IACL;;;OAGG;IACH,EAAE,EAAE,CAAC;IACL;;;;OAIG;IACH,EAAE,EAAE,CAAC;IACL;;;;;;;OAOG;IACH,EAAE,EAAE,CAAC;IACL;;;;;OAKG;IACH,EAAE,EAAE,CAAC;IACL;;;OAGG;IACH,eAAe,EAAE,sBAAsB;CACvC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kCAAkC,GAC9C,IAAI,GAAG,CAAC;IACP,wBAAwB,CAAC,EAAE;IAC3B,wBAAwB,CAAC,EAAE;IAC3B,wBAAwB,CAAC,eAAe;CACxC,CAAC,CAAC;AACJ,MAAM,CAAC,MAAM,yBAAyB,GAA0C,IAAI,GAAG,CACtF,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAC,CACvC,CAAC;AACF,oEAAoE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { SessionId } from \"@fluidframework/id-compressor\";\nimport { type ObjectOptions, type Static, type TSchema, Type } from \"@sinclair/typebox\";\n\nimport {\n\ttype EncodedRevisionTag,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tSessionIdSchema,\n} from \"../core/index.js\";\nimport { type Brand, brandedNumberType, strictEnum, type Values } from \"../util/index.js\";\nimport type { EncodedBranchId } from \"./branch.js\";\n\n/**\n * Contains a single change to the `SharedTree` and associated metadata.\n *\n * TODO: if this type is not used in the encoded format, move it out of this file, and stop using it in EncodedEditManager.\n * If this is an encoded format, clarify the difference between it and EncodedCommit.\n */\nexport interface Commit<TChangeset> {\n\treadonly revision: RevisionTag;\n\treadonly change: TChangeset;\n\t/** An identifier representing the session/user/client that made this commit */\n\treadonly sessionId: SessionId;\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type EncodedCommit<TChangeset> = {\n\treadonly revision: EncodedRevisionTag;\n\treadonly change: TChangeset;\n\treadonly sessionId: SessionId;\n};\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n// Many of the return types in this module are intentionally derived, rather than explicitly specified.\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\nconst CommitBase = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object({\n\t\trevision: RevisionTagSchema,\n\t\tchange: tChange,\n\t\tsessionId: SessionIdSchema,\n\t});\n/**\n * @privateRemarks Commits are generally encoded from `GraphCommit`s, which often contain extra data.\n * This `noAdditionalProps` is especially important in that light.\n */\nconst Commit = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Composite([CommitBase(tChange)], noAdditionalProps);\n\nexport type SeqNumber = Brand<number, \"edit-manager.SeqNumber\">;\nconst SeqNumber = brandedNumberType<SeqNumber>({ multipleOf: 1 });\n\nconst SequenceId = Type.Object({\n\tsequenceNumber: SeqNumber,\n\tindexInBatch: Type.Optional(Type.Number({ multipleOf: 1, minimum: 0 })),\n});\n\nexport type SequenceId = Static<typeof SequenceId>;\n\n/**\n * A commit with a sequence number but no parentage; used for serializing the `EditManager` into a summary\n */\nexport interface SequencedCommit<TChangeset> extends Commit<TChangeset>, SequenceId {}\n\nexport const SequencedCommit = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Composite([CommitBase(tChange), SequenceId], noAdditionalProps);\n\n/**\n * A branch off of the trunk for use in summaries.\n *\n * TODO: if this type is not used in the encoded format, move it out of this file, and stop using it in EncodedEditManager.\n * If this is an encoded format, use EncodedCommit instead of Commit or clarify that Commit is also an encoded format.\n */\nexport interface SummarySessionBranch<TChangeset> {\n\treadonly base: RevisionTag;\n\treadonly commits: Commit<TChangeset>[];\n}\n\nexport interface EncodedSummarySessionBranch<TChangeset> {\n\treadonly base: EncodedRevisionTag;\n\treadonly commits: Commit<TChangeset>[];\n}\n\nexport const SummarySessionBranch = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tbase: RevisionTagSchema,\n\t\t\tcommits: Type.Array(Commit(tChange)),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\nexport interface EncodedSharedBranch<TChangeset> {\n\treadonly id?: EncodedBranchId;\n\treadonly name?: string;\n\treadonly author?: string;\n\treadonly session?: SessionId;\n\treadonly base?: EncodedRevisionTag;\n\treadonly trunk: readonly Readonly<SequencedCommit<TChangeset>>[];\n\treadonly peers: readonly [SessionId, Readonly<EncodedSummarySessionBranch<TChangeset>>][];\n}\n\nexport const EncodedSharedBranch = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tid: Type.Optional(Type.Number()),\n\t\t\tname: Type.Optional(Type.String()),\n\t\t\tsession: Type.Optional(SessionIdSchema),\n\t\t\tauthor: Type.Optional(Type.String()),\n\t\t\tbase: Type.Optional(RevisionTagSchema),\n\t\t\ttrunk: Type.Array(SequencedCommit(tChange)),\n\t\t\tpeers: Type.Array(Type.Tuple([SessionIdSchema, SummarySessionBranch(tChange)])),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\n/**\n * The format version for the EditManager.\n */\nexport const EditManagerFormatVersion = strictEnum(\"editManager.FormatVersion\", {\n\t/**\n\t * Introduced and retired prior to 2.0.\n\t * Reading and writing capability removed in 2.73.0.\n\t */\n\tv1: 1,\n\t/**\n\t * Introduced and retired prior to 2.0.\n\t * Reading and writing capability removed in 2.73.0.\n\t */\n\tv2: 2,\n\t/**\n\t * Introduced prior to 2.0 and used beyond.\n\t * Reading capability must be maintained for backwards compatibility.\n\t * Writing capability needs to be maintained so long as {@link lowestMinVersionForCollab} is less than 2.2.0.\n\t */\n\tv3: 3,\n\t/**\n\t * Introduced in 2.2.0.\n\t * Was inadvertently made usable for writing in 2.43.0 (through configuredSharedTree) and remains available.\n\t * Reading capability must be maintained for backwards compatibility.\n\t * Writing capability could be dropped in favor of {@link EditManagerFormatVersion.v3},\n\t * but doing so would make the pattern of writable versions more complex and gain little\n\t * because most of the logic for this format is shared with {@link EditManagerFormatVersion.v3}.\n\t */\n\tv4: 4,\n\t/**\n\t * This version number was used internally for testing shared branches.\n\t * This format was never made stable.\n\t * This version number is kept here solely to avoid reusing the number: it is not supported for either reading or writing.\n\t * @deprecated Use {@link EditManagerFormatVersion.vSharedBranches} for testing shared branches.\n\t */\n\tv5: 5,\n\t/**\n\t * Not yet released.\n\t * Only used for testing shared branches.\n\t */\n\tvSharedBranches: \"shared-branches|v0.1\",\n});\nexport type EditManagerFormatVersion = Values<typeof EditManagerFormatVersion>;\nexport const supportedEditManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> =\n\tnew Set([\n\t\tEditManagerFormatVersion.v3,\n\t\tEditManagerFormatVersion.v4,\n\t\tEditManagerFormatVersion.vSharedBranches,\n\t]);\nexport const editManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> = new Set(\n\tObject.values(EditManagerFormatVersion),\n);\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
|
|
@@ -11,7 +11,7 @@ export interface EncodedEditManager<TChangeset> {
|
|
|
11
11
|
readonly version: typeof EditManagerFormatVersion.v1 | typeof EditManagerFormatVersion.v2 | typeof EditManagerFormatVersion.v3 | typeof EditManagerFormatVersion.v4;
|
|
12
12
|
}
|
|
13
13
|
export declare const EncodedEditManager: <ChangeSchema extends TSchema>(tChange: ChangeSchema) => import("@sinclair/typebox").TObject<{
|
|
14
|
-
version: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<1
|
|
14
|
+
version: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<1, "editManager.FormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<2, "editManager.FormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<3, "editManager.FormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<4, "editManager.FormatVersion">>]>;
|
|
15
15
|
trunk: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
16
16
|
revision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
|
|
17
17
|
change: import("@sinclair/typebox").TIntersectEvaluated<import("@sinclair/typebox").Assert<ChangeSchema, TSchema> extends infer T ? T extends import("@sinclair/typebox").Assert<ChangeSchema, TSchema> ? T extends import("@sinclair/typebox").TNever ? [] : [T] : never : never>;
|
package/lib/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts}
RENAMED
|
@@ -6,13 +6,13 @@ import { type TSchema } from "@sinclair/typebox";
|
|
|
6
6
|
import type { SessionId } from "@fluidframework/id-compressor";
|
|
7
7
|
import { EncodedSharedBranch, EditManagerFormatVersion } from "./editManagerFormatCommons.js";
|
|
8
8
|
export interface EncodedEditManager<TChangeset> {
|
|
9
|
-
readonly version: typeof EditManagerFormatVersion.
|
|
9
|
+
readonly version: typeof EditManagerFormatVersion.vSharedBranches;
|
|
10
10
|
readonly originator: SessionId;
|
|
11
11
|
readonly main: EncodedSharedBranch<TChangeset>;
|
|
12
12
|
readonly branches?: readonly EncodedSharedBranch<TChangeset>[];
|
|
13
13
|
}
|
|
14
14
|
export declare const EncodedEditManager: <ChangeSchema extends TSchema>(tChange: ChangeSchema) => import("@sinclair/typebox").TObject<{
|
|
15
|
-
version: import("@sinclair/typebox").TLiteral<
|
|
15
|
+
version: import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<"shared-branches|v0.1", "editManager.FormatVersion">>;
|
|
16
16
|
originator: import("@sinclair/typebox").TUnsafe<SessionId>;
|
|
17
17
|
main: import("@sinclair/typebox").TObject<{
|
|
18
18
|
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -59,4 +59,4 @@ export declare const EncodedEditManager: <ChangeSchema extends TSchema>(tChange:
|
|
|
59
59
|
}>]>>;
|
|
60
60
|
}>>>;
|
|
61
61
|
}>;
|
|
62
|
-
//# sourceMappingURL=
|
|
62
|
+
//# sourceMappingURL=editManagerFormatVSharedBranches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editManagerFormatVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAQ9F,MAAM,WAAW,kBAAkB,CAAC,UAAU;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,wBAAwB,CAAC,eAAe,CAAC;IAClE,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,mBAAmB,CAAC,UAAU,CAAC,EAAE,CAAC;CAC/D;AAED,eAAO,MAAM,kBAAkB,0CAA2C,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASpF,CAAC"}
|
|
@@ -7,10 +7,10 @@ import { EncodedSharedBranch, EditManagerFormatVersion } from "./editManagerForm
|
|
|
7
7
|
import { SessionIdSchema } from "../core/index.js";
|
|
8
8
|
const noAdditionalProps = { additionalProperties: false };
|
|
9
9
|
export const EncodedEditManager = (tChange) => Type.Object({
|
|
10
|
-
version: Type.
|
|
10
|
+
version: Type.Literal(EditManagerFormatVersion.vSharedBranches),
|
|
11
11
|
originator: SessionIdSchema,
|
|
12
12
|
main: EncodedSharedBranch(tChange),
|
|
13
13
|
branches: Type.Optional(Type.Array(EncodedSharedBranch(tChange))),
|
|
14
14
|
}, noAdditionalProps);
|
|
15
15
|
/* eslint-enable @typescript-eslint/explicit-function-return-type */
|
|
16
|
-
//# sourceMappingURL=
|
|
16
|
+
//# sourceMappingURL=editManagerFormatVSharedBranches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editManagerFormatVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAoC,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAG3E,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAYzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACzF,IAAI,CAAC,MAAM,CACV;IACC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,eAAe,CAAC;IAC/D,UAAU,EAAE,eAAe;IAC3B,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC;IAClC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;CACjE,EACD,iBAAiB,CACjB,CAAC;AAEH,oEAAoE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type TSchema, Type } from \"@sinclair/typebox\";\nimport type { SessionId } from \"@fluidframework/id-compressor\";\n\nimport { EncodedSharedBranch, EditManagerFormatVersion } from \"./editManagerFormatCommons.js\";\nimport { SessionIdSchema } from \"../core/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n// Many of the return types in this module are intentionally derived, rather than explicitly specified.\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\nexport interface EncodedEditManager<TChangeset> {\n\treadonly version: typeof EditManagerFormatVersion.vSharedBranches;\n\treadonly originator: SessionId;\n\treadonly main: EncodedSharedBranch<TChangeset>;\n\treadonly branches?: readonly EncodedSharedBranch<TChangeset>[];\n}\n\nexport const EncodedEditManager = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tversion: Type.Literal(EditManagerFormatVersion.vSharedBranches),\n\t\t\toriginator: SessionIdSchema,\n\t\t\tmain: EncodedSharedBranch(tChange),\n\t\t\tbranches: Type.Optional(Type.Array(EncodedSharedBranch(tChange))),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
|
|
@@ -4,31 +4,51 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
6
6
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
7
|
-
import type { IExperimentalIncrementalSummaryContext,
|
|
7
|
+
import type { IExperimentalIncrementalSummaryContext, ITelemetryContext, MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
|
|
8
|
+
import type { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
|
|
8
9
|
import type { IJsonCodec } from "../codec/index.js";
|
|
9
10
|
import type { ChangeFamily, ChangeFamilyEditor, SchemaAndPolicy } from "../core/index.js";
|
|
10
11
|
import type { JsonCompatibleReadOnly } from "../util/index.js";
|
|
11
12
|
import type { EditManager, SummaryData } from "./editManager.js";
|
|
12
13
|
import type { EditManagerEncodingContext } from "./editManagerCodecs.js";
|
|
13
|
-
import type { Summarizable, SummaryElementParser, SummaryElementStringifier } from "./
|
|
14
|
+
import type { Summarizable, SummaryElementParser, SummaryElementStringifier } from "./summaryTypes.js";
|
|
15
|
+
import { VersionedSummarizer } from "./versionedSummarizer.js";
|
|
16
|
+
export declare const stringKey = "String";
|
|
17
|
+
/**
|
|
18
|
+
* The versions for the edit manager summary format.
|
|
19
|
+
*/
|
|
20
|
+
export declare const enum EditManagerSummaryFormatVersion {
|
|
21
|
+
/**
|
|
22
|
+
* This version represents summary format before summary versioning was introduced.
|
|
23
|
+
*/
|
|
24
|
+
v1 = 1,
|
|
25
|
+
/**
|
|
26
|
+
* This version adds metadata to the summary. This is backward compatible with version 1.
|
|
27
|
+
*/
|
|
28
|
+
v2 = 2,
|
|
29
|
+
/**
|
|
30
|
+
* The latest version of the summary. Must be updated when a new version is added.
|
|
31
|
+
*/
|
|
32
|
+
vLatest = 2
|
|
33
|
+
}
|
|
14
34
|
/**
|
|
15
35
|
* Provides methods for summarizing and loading an `EditManager`
|
|
16
36
|
*/
|
|
17
|
-
export declare class EditManagerSummarizer<TChangeset> implements Summarizable {
|
|
37
|
+
export declare class EditManagerSummarizer<TChangeset> extends VersionedSummarizer<EditManagerSummaryFormatVersion> implements Summarizable {
|
|
18
38
|
private readonly editManager;
|
|
19
39
|
private readonly codec;
|
|
20
40
|
private readonly idCompressor;
|
|
21
41
|
private readonly schemaAndPolicy?;
|
|
22
|
-
readonly key = "EditManager";
|
|
23
|
-
constructor(editManager: EditManager<ChangeFamilyEditor, TChangeset, ChangeFamily<ChangeFamilyEditor, TChangeset>>, codec: IJsonCodec<SummaryData<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, EditManagerEncodingContext>, idCompressor: IIdCompressor, schemaAndPolicy?: SchemaAndPolicy | undefined);
|
|
24
|
-
|
|
42
|
+
static readonly key = "EditManager";
|
|
43
|
+
constructor(editManager: EditManager<ChangeFamilyEditor, TChangeset, ChangeFamily<ChangeFamilyEditor, TChangeset>>, codec: IJsonCodec<SummaryData<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, EditManagerEncodingContext>, idCompressor: IIdCompressor, minVersionForCollab: MinimumVersionForCollab, schemaAndPolicy?: SchemaAndPolicy | undefined);
|
|
44
|
+
protected summarizeInternal(props: {
|
|
25
45
|
stringify: SummaryElementStringifier;
|
|
26
46
|
fullTree?: boolean;
|
|
27
47
|
trackState?: boolean;
|
|
28
48
|
telemetryContext?: ITelemetryContext;
|
|
29
49
|
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
50
|
+
builder: SummaryTreeBuilder;
|
|
51
|
+
}): void;
|
|
52
|
+
protected loadInternal(services: IChannelStorageService, parse: SummaryElementParser): Promise<void>;
|
|
33
53
|
}
|
|
34
54
|
//# sourceMappingURL=editManagerSummarizer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerSummarizer.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACX,sCAAsC,EACtC,
|
|
1
|
+
{"version":3,"file":"editManagerSummarizer.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACX,sCAAsC,EACtC,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;A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sCAAsC,CAAC;QACnE,OAAO,EAAE,kBAAkB,CAAC;KAC5B,GAAG,IAAI;cAWQ,YAAY,CAC3B,QAAQ,EAAE,sBAAsB,EAChC,KAAK,EAAE,oBAAoB,GACzB,OAAO,CAAC,IAAI,CAAC;CAehB"}
|
|
@@ -4,31 +4,58 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { bufferToString } from "@fluid-internal/client-utils";
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import {
|
|
8
|
-
const stringKey = "String";
|
|
7
|
+
import { VersionedSummarizer } from "./versionedSummarizer.js";
|
|
8
|
+
export const stringKey = "String";
|
|
9
|
+
/**
|
|
10
|
+
* The versions for the edit manager summary format.
|
|
11
|
+
*/
|
|
12
|
+
export var EditManagerSummaryFormatVersion;
|
|
13
|
+
(function (EditManagerSummaryFormatVersion) {
|
|
14
|
+
/**
|
|
15
|
+
* This version represents summary format before summary versioning was introduced.
|
|
16
|
+
*/
|
|
17
|
+
EditManagerSummaryFormatVersion[EditManagerSummaryFormatVersion["v1"] = 1] = "v1";
|
|
18
|
+
/**
|
|
19
|
+
* This version adds metadata to the summary. This is backward compatible with version 1.
|
|
20
|
+
*/
|
|
21
|
+
EditManagerSummaryFormatVersion[EditManagerSummaryFormatVersion["v2"] = 2] = "v2";
|
|
22
|
+
/**
|
|
23
|
+
* The latest version of the summary. Must be updated when a new version is added.
|
|
24
|
+
*/
|
|
25
|
+
EditManagerSummaryFormatVersion[EditManagerSummaryFormatVersion["vLatest"] = 2] = "vLatest";
|
|
26
|
+
})(EditManagerSummaryFormatVersion || (EditManagerSummaryFormatVersion = {}));
|
|
27
|
+
const supportedVersions = new Set([
|
|
28
|
+
1 /* EditManagerSummaryFormatVersion.v1 */,
|
|
29
|
+
2 /* EditManagerSummaryFormatVersion.v2 */,
|
|
30
|
+
]);
|
|
31
|
+
/**
|
|
32
|
+
* Returns the summary version to use as per the given minimum version for collab.
|
|
33
|
+
*/
|
|
34
|
+
function minVersionToEditManagerSummaryFormatVersion(version) {
|
|
35
|
+
// Currently, version 2 is written which adds metadata blob to the summary.
|
|
36
|
+
return 2 /* EditManagerSummaryFormatVersion.v2 */;
|
|
37
|
+
}
|
|
9
38
|
/**
|
|
10
39
|
* Provides methods for summarizing and loading an `EditManager`
|
|
11
40
|
*/
|
|
12
|
-
export class EditManagerSummarizer {
|
|
13
|
-
constructor(editManager, codec, idCompressor, schemaAndPolicy) {
|
|
41
|
+
export class EditManagerSummarizer extends VersionedSummarizer {
|
|
42
|
+
constructor(editManager, codec, idCompressor, minVersionForCollab, schemaAndPolicy) {
|
|
43
|
+
super(EditManagerSummarizer.key, minVersionToEditManagerSummaryFormatVersion(minVersionForCollab), supportedVersions, true /* supportPreVersioningFormat */);
|
|
14
44
|
this.editManager = editManager;
|
|
15
45
|
this.codec = codec;
|
|
16
46
|
this.idCompressor = idCompressor;
|
|
17
47
|
this.schemaAndPolicy = schemaAndPolicy;
|
|
18
|
-
this.key = "EditManager";
|
|
19
|
-
}
|
|
20
|
-
summarize(props) {
|
|
21
|
-
return this.summarizeCore(props.stringify);
|
|
22
48
|
}
|
|
23
|
-
|
|
49
|
+
summarizeInternal(props) {
|
|
50
|
+
const { stringify, builder } = props;
|
|
24
51
|
const context = this.schemaAndPolicy !== undefined
|
|
25
52
|
? { schema: this.schemaAndPolicy, idCompressor: this.idCompressor }
|
|
26
53
|
: { idCompressor: this.idCompressor };
|
|
27
54
|
const jsonCompatible = this.codec.encode(this.editManager.getSummaryData(), context);
|
|
28
55
|
const dataString = stringify(jsonCompatible);
|
|
29
|
-
|
|
56
|
+
builder.addBlob(stringKey, dataString);
|
|
30
57
|
}
|
|
31
|
-
async
|
|
58
|
+
async loadInternal(services, parse) {
|
|
32
59
|
const schemaBuffer = await services.readBlob(stringKey);
|
|
33
60
|
// After the awaits, validate that the data is in a clean state.
|
|
34
61
|
// This detects any data that could have been accidentally added through
|
|
@@ -39,4 +66,5 @@ export class EditManagerSummarizer {
|
|
|
39
66
|
this.editManager.loadSummaryData(data);
|
|
40
67
|
}
|
|
41
68
|
}
|
|
69
|
+
EditManagerSummarizer.key = "EditManager";
|
|
42
70
|
//# sourceMappingURL=editManagerSummarizer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerSummarizer.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"editManagerSummarizer.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAqB7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC;AAElC;;GAEG;AACH,MAAM,CAAN,IAAkB,+BAajB;AAbD,WAAkB,+BAA+B;IAChD;;OAEG;IACH,iFAAM,CAAA;IACN;;OAEG;IACH,iFAAM,CAAA;IACN;;OAEG;IACH,2FAAY,CAAA;AACb,CAAC,EAbiB,+BAA+B,KAA/B,+BAA+B,QAahD;AAED,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAkC;;;CAGlE,CAAC,CAAC;AAEH;;GAEG;AACH,SAAS,2CAA2C,CACnD,OAAgC;IAEhC,2EAA2E;IAC3E,kDAA0C;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,qBACZ,SAAQ,mBAAoD;IAI5D,YACkB,WAIhB,EACgB,KAKhB,EACgB,YAA2B,EAC5C,mBAA4C,EAC3B,eAAiC;QAElD,KAAK,CACJ,qBAAqB,CAAC,GAAG,EACzB,2CA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AE,CAAC,CAAC;QAC7E,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;;AA5DsB,yBAAG,GAAG,aAAa,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport type {\n\tIExperimentalIncrementalSummaryContext,\n\tITelemetryContext,\n\tMinimumVersionForCollab,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport type { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\n\nimport type { IJsonCodec } from \"../codec/index.js\";\nimport type { ChangeFamily, ChangeFamilyEditor, SchemaAndPolicy } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport type { EditManager, SummaryData } from \"./editManager.js\";\nimport type { EditManagerEncodingContext } from \"./editManagerCodecs.js\";\nimport type {\n\tSummarizable,\n\tSummaryElementParser,\n\tSummaryElementStringifier,\n} from \"./summaryTypes.js\";\nimport { VersionedSummarizer } from \"./versionedSummarizer.js\";\n\nexport const stringKey = \"String\";\n\n/**\n * The versions for the edit manager summary format.\n */\nexport const enum EditManagerSummaryFormatVersion {\n\t/**\n\t * This version represents summary format before summary versioning was introduced.\n\t */\n\tv1 = 1,\n\t/**\n\t * This version adds metadata to the summary. This is backward compatible with version 1.\n\t */\n\tv2 = 2,\n\t/**\n\t * The latest version of the summary. Must be updated when a new version is added.\n\t */\n\tvLatest = v2,\n}\n\nconst supportedVersions = new Set<EditManagerSummaryFormatVersion>([\n\tEditManagerSummaryFormatVersion.v1,\n\tEditManagerSummaryFormatVersion.v2,\n]);\n\n/**\n * Returns the summary version to use as per the given minimum version for collab.\n */\nfunction minVersionToEditManagerSummaryFormatVersion(\n\tversion: MinimumVersionForCollab,\n): EditManagerSummaryFormatVersion {\n\t// Currently, version 2 is written which adds metadata blob to the summary.\n\treturn EditManagerSummaryFormatVersion.v2;\n}\n\n/**\n * Provides methods for summarizing and loading an `EditManager`\n */\nexport class EditManagerSummarizer<TChangeset>\n\textends VersionedSummarizer<EditManagerSummaryFormatVersion>\n\timplements Summarizable\n{\n\tpublic static readonly key = \"EditManager\";\n\tpublic constructor(\n\t\tprivate readonly editManager: EditManager<\n\t\t\tChangeFamilyEditor,\n\t\t\tTChangeset,\n\t\t\tChangeFamily<ChangeFamilyEditor, TChangeset>\n\t\t>,\n\t\tprivate readonly codec: IJsonCodec<\n\t\t\tSummaryData<TChangeset>,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tEditManagerEncodingContext\n\t\t>,\n\t\tprivate readonly idCompressor: IIdCompressor,\n\t\tminVersionForCollab: MinimumVersionForCollab,\n\t\tprivate readonly schemaAndPolicy?: SchemaAndPolicy,\n\t) {\n\t\tsuper(\n\t\t\tEditManagerSummarizer.key,\n\t\t\tminVersionToEditManagerSummaryFormatVersion(minVersionForCollab),\n\t\t\tsupportedVersions,\n\t\t\ttrue /* supportPreVersioningFormat */,\n\t\t);\n\t}\n\n\tprotected summarizeInternal(props: {\n\t\tstringify: SummaryElementStringifier;\n\t\tfullTree?: boolean;\n\t\ttrackState?: boolean;\n\t\ttelemetryContext?: ITelemetryContext;\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext;\n\t\tbuilder: SummaryTreeBuilder;\n\t}): void {\n\t\tconst { stringify, builder } = props;\n\t\tconst context: EditManagerEncodingContext =\n\t\t\tthis.schemaAndPolicy !== undefined\n\t\t\t\t? { schema: this.schemaAndPolicy, idCompressor: this.idCompressor }\n\t\t\t\t: { idCompressor: this.idCompressor };\n\t\tconst jsonCompatible = this.codec.encode(this.editManager.getSummaryData(), context);\n\t\tconst dataString = stringify(jsonCompatible);\n\t\tbuilder.addBlob(stringKey, dataString);\n\t}\n\n\tprotected async loadInternal(\n\t\tservices: IChannelStorageService,\n\t\tparse: SummaryElementParser,\n\t): Promise<void> {\n\t\tconst schemaBuffer: ArrayBufferLike = await services.readBlob(stringKey);\n\n\t\t// After the awaits, validate that the data is in a clean state.\n\t\t// This detects any data that could have been accidentally added through\n\t\t// invalid means and is about to be overwritten.\n\t\tassert(\n\t\t\tthis.editManager.isEmpty(),\n\t\t\t0x42c /* There should not already be stored EditManager data when loading from summary */,\n\t\t);\n\n\t\tconst summary = parse(bufferToString(schemaBuffer, \"utf-8\")) as JsonCompatibleReadOnly;\n\t\tconst data = this.codec.decode(summary, { idCompressor: this.idCompressor });\n\t\tthis.editManager.loadSummaryData(data);\n\t}\n}\n"]}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { onForkTransitive, SharedTreeBranch, type SharedTreeBranchChange, type SharedTreeBranchEvents, type BranchId, } from "./branch.js";
|
|
6
6
|
export { TransactionResult, type Transactor, type TransactionEvents, TransactionStack, SquashingTransactionStack, type OnPush, type OnPop, } from "./transaction.js";
|
|
7
|
-
export { SharedTreeCore, type
|
|
7
|
+
export { SharedTreeCore, type ClonableSchemaAndPolicy, type SharedTreeCoreOptionsInternal, } from "./sharedTreeCore.js";
|
|
8
|
+
export { SharedTreeSummaryFormatVersion, type SharedTreeSummarizableMetadata, type Summarizable, type SummaryElementParser, type SummaryElementStringifier, summarizablesMetadataKey, } from "./summaryTypes.js";
|
|
9
|
+
export { VersionedSummarizer } from "./versionedSummarizer.js";
|
|
8
10
|
export type { ResubmitMachine } from "./resubmitMachine.js";
|
|
9
11
|
export { DefaultResubmitMachine } from "./defaultResubmitMachine.js";
|
|
10
12
|
export { type ChangeEnricherReadonlyCheckout, type ChangeEnricherMutableCheckout, NoOpChangeEnricher, } from "./changeEnricher.js";
|
|
@@ -13,6 +15,7 @@ export { EditManagerFormatVersion, supportedEditManagerFormatVersions, } from ".
|
|
|
13
15
|
export { EditManagerSummarizer } from "./editManagerSummarizer.js";
|
|
14
16
|
export { EditManager, minimumPossibleSequenceNumber, type SummaryData, type SharedBranchSummaryData, } from "./editManager.js";
|
|
15
17
|
export type { Commit, SeqNumber, SequencedCommit, SummarySessionBranch, EncodedCommit, } from "./editManagerFormatCommons.js";
|
|
16
|
-
export {
|
|
18
|
+
export type { DecodedMessage } from "./messageTypes.js";
|
|
19
|
+
export { getCodecTreeForMessageFormatWithChange, clientVersionToMessageFormatVersion, messageFormatVersionSelectorForSharedBranches, makeMessageCodec, type MessageEncodingContext, } from "./messageCodecs.js";
|
|
17
20
|
export { MessageFormatVersion, messageFormatVersions, supportedMessageFormatVersions, } from "./messageFormat.js";
|
|
18
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,KAAK,MAAM,EACX,KAAK,KAAK,GACV,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,iBAAiB,EACjB,KAAK,UAAU,EACf,K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pB,qBAAqB,EACrB,8BAA8B,GAC9B,MAAM,oBAAoB,CAAC"}
|
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
export { onForkTransitive, SharedTreeBranch, } from "./branch.js";
|
|
6
6
|
export { TransactionResult, TransactionStack, SquashingTransactionStack, } from "./transaction.js";
|
|
7
7
|
export { SharedTreeCore, } from "./sharedTreeCore.js";
|
|
8
|
+
export { SharedTreeSummaryFormatVersion, summarizablesMetadataKey, } from "./summaryTypes.js";
|
|
9
|
+
export { VersionedSummarizer } from "./versionedSummarizer.js";
|
|
8
10
|
export { DefaultResubmitMachine } from "./defaultResubmitMachine.js";
|
|
9
11
|
export { NoOpChangeEnricher, } from "./changeEnricher.js";
|
|
10
12
|
export { makeEditManagerCodec, getCodecTreeForEditManagerFormatWithChange, clientVersionToEditManagerFormatVersion, editManagerFormatVersionSelectorForSharedBranches, } from "./editManagerCodecs.js";
|
|
11
13
|
export { EditManagerFormatVersion, supportedEditManagerFormatVersions, } from "./editManagerFormatCommons.js";
|
|
12
14
|
export { EditManagerSummarizer } from "./editManagerSummarizer.js";
|
|
13
15
|
export { EditManager, minimumPossibleSequenceNumber, } from "./editManager.js";
|
|
14
|
-
export { getCodecTreeForMessageFormatWithChange, clientVersionToMessageFormatVersion, messageFormatVersionSelectorForSharedBranches, } from "./messageCodecs.js";
|
|
16
|
+
export { getCodecTreeForMessageFormatWithChange, clientVersionToMessageFormatVersion, messageFormatVersionSelectorForSharedBranches, makeMessageCodec, } from "./messageCodecs.js";
|
|
15
17
|
export { MessageFormatVersion, messageFormatVersions, supportedMessageFormatVersions, } from "./messageFormat.js";
|
|
16
18
|
//# sourceMappingURL=index.js.map
|