@fluidframework/tree 2.63.0-358419 → 2.63.0-359461
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/.eslintrc.cjs +4 -0
- package/api-report/tree.alpha.api.md +31 -5
- package/api-report/tree.beta.api.md +26 -0
- package/api-report/tree.legacy.beta.api.md +26 -0
- package/dist/alpha.d.ts +4 -3
- package/dist/beta.d.ts +3 -0
- package/dist/codec/codec.d.ts +32 -0
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +32 -1
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/index.d.ts +1 -1
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +3 -1
- package/dist/codec/index.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/schema-stored/index.d.ts +1 -1
- package/dist/core/schema-stored/index.d.ts.map +1 -1
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +5 -7
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +3 -6
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts +4 -1
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.js +5 -1
- package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/dist/core/tree/index.d.ts +1 -0
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +3 -1
- package/dist/core/tree/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +3 -2
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +5 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +2 -0
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js +2 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js +2 -1
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +5 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +19 -5
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -1
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts +4 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +5 -1
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts +1 -0
- package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/index.js +3 -1
- package/dist/feature-libraries/forest-summary/index.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +5 -5
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +7 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/index.js +2 -1
- package/dist/feature-libraries/schema-edits/index.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +4 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +9 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts +2 -1
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +5 -1
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/index.d.ts +1 -1
- package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/index.js +2 -1
- package/dist/feature-libraries/schema-index/index.js.map +1 -1
- package/dist/legacy.d.ts +3 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/serializableDomainSchema.d.ts +12 -16
- package/dist/serializableDomainSchema.d.ts.map +1 -1
- package/dist/serializableDomainSchema.js +8 -8
- package/dist/serializableDomainSchema.js.map +1 -1
- package/dist/shared-tree/index.d.ts +2 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +4 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +18 -2
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +122 -8
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +17 -2
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +31 -18
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts +7 -12
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.js +53 -73
- package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +7 -4
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +42 -11
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +2 -1
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +6 -1
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +7 -4
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +44 -23
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/resubmitMachine.d.ts +9 -18
- package/dist/shared-tree-core/resubmitMachine.d.ts.map +1 -1
- package/dist/shared-tree-core/resubmitMachine.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +6 -4
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +12 -13
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +7 -166
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +11 -44
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts +90 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.js +55 -0
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +37 -18
- 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/treeBeta.d.ts +12 -2
- package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/treeBeta.js +6 -0
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
- package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/core/treeNode.d.ts +3 -2
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNode.js +3 -2
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +2 -2
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/dist/util/brand.d.ts +1 -1
- package/dist/util/brand.js.map +1 -1
- package/docs/main/compatibility.md +8 -0
- package/lib/alpha.d.ts +4 -3
- package/lib/beta.d.ts +3 -0
- package/lib/codec/codec.d.ts +32 -0
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +28 -0
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/index.d.ts +1 -1
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.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/schema-stored/index.d.ts +1 -1
- package/lib/core/schema-stored/index.d.ts.map +1 -1
- package/lib/core/schema-stored/index.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +5 -7
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +3 -6
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts +4 -1
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.js +3 -0
- package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/lib/core/tree/index.d.ts +1 -0
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +1 -0
- package/lib/core/tree/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +3 -2
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +3 -0
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +2 -0
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js +1 -1
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +5 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +17 -4
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -1
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts +4 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +3 -0
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts +1 -0
- package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/index.js +1 -0
- package/lib/feature-libraries/forest-summary/index.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +5 -5
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +5 -5
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/index.js +1 -1
- package/lib/feature-libraries/schema-edits/index.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +4 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +8 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts +2 -1
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +3 -0
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/index.d.ts +1 -1
- package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/index.js +1 -1
- package/lib/feature-libraries/schema-index/index.js.map +1 -1
- package/lib/legacy.d.ts +3 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/serializableDomainSchema.d.ts +12 -16
- package/lib/serializableDomainSchema.d.ts.map +1 -1
- package/lib/serializableDomainSchema.js +9 -9
- package/lib/serializableDomainSchema.js.map +1 -1
- package/lib/shared-tree/index.d.ts +2 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +2 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +18 -2
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +126 -13
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +17 -2
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +30 -18
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts +7 -12
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.js +55 -75
- package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +7 -4
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +40 -10
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +2 -1
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +2 -1
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +7 -4
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +42 -22
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/resubmitMachine.d.ts +9 -18
- package/lib/shared-tree-core/resubmitMachine.d.ts.map +1 -1
- package/lib/shared-tree-core/resubmitMachine.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +6 -4
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +13 -14
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +7 -166
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +12 -45
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts +90 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js +56 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +37 -18
- 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/treeBeta.d.ts +12 -2
- package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/treeBeta.js +7 -1
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
- package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/core/treeNode.d.ts +3 -2
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNode.js +3 -2
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +2 -2
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/lib/util/brand.d.ts +1 -1
- package/lib/util/brand.js.map +1 -1
- package/package.json +21 -21
- package/src/codec/codec.ts +60 -0
- package/src/codec/index.ts +3 -0
- package/src/core/index.ts +3 -0
- package/src/core/schema-stored/index.ts +1 -0
- package/src/core/schema-stored/schema.ts +5 -6
- package/src/core/tree/detachedFieldIndexCodecs.ts +9 -0
- package/src/core/tree/index.ts +6 -0
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +6 -1
- package/src/feature-libraries/chunked-forest/codec/format.ts +2 -0
- package/src/feature-libraries/chunked-forest/codec/index.ts +2 -1
- package/src/feature-libraries/chunked-forest/index.ts +2 -0
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +29 -5
- package/src/feature-libraries/default-schema/index.ts +2 -0
- package/src/feature-libraries/forest-summary/codec.ts +7 -0
- package/src/feature-libraries/forest-summary/index.ts +1 -0
- package/src/feature-libraries/index.ts +12 -1
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +1 -1
- package/src/feature-libraries/schema-edits/index.ts +5 -1
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +17 -1
- package/src/feature-libraries/schema-index/codec.ts +5 -0
- package/src/feature-libraries/schema-index/index.ts +1 -0
- package/src/packageVersion.ts +1 -1
- package/src/serializableDomainSchema.ts +12 -11
- package/src/shared-tree/index.ts +6 -0
- package/src/shared-tree/sharedTree.ts +151 -11
- package/src/shared-tree/sharedTreeChangeCodecs.ts +68 -30
- package/src/shared-tree/treeCheckout.ts +1 -1
- package/src/shared-tree-core/defaultResubmitMachine.ts +77 -120
- package/src/shared-tree-core/editManagerCodecs.ts +62 -9
- package/src/shared-tree-core/index.ts +12 -1
- package/src/shared-tree-core/messageCodecs.ts +70 -27
- package/src/shared-tree-core/resubmitMachine.ts +12 -20
- package/src/shared-tree-core/sharedTreeCore.ts +26 -18
- package/src/simple-tree/api/schemaFactoryAlpha.ts +16 -296
- package/src/simple-tree/api/schemaFactoryBeta.ts +269 -1
- package/src/simple-tree/api/tree.ts +37 -18
- package/src/simple-tree/api/treeBeta.ts +36 -1
- package/src/simple-tree/api/typesUnsafe.ts +1 -1
- package/src/simple-tree/core/treeNode.ts +3 -2
- package/src/simple-tree/core/treeNodeKernel.ts +1 -1
- package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +2 -2
- package/src/util/brand.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultResubmitMachine.js","sourceRoot":"","sources":["../../src/shared-tree-core/defaultResubmitMachine.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAM6C;AAG7C,+CAA0D;AAW1D;;GAEG;AACH,MAAa,sBAAsB;IAmBlC;IACC;;OAEG;IACc,YAAwD;IACzE;;;OAGG;IACc,GAA4C;QAL5C,iBAAY,GAAZ,YAAY,CAA4C;QAKxD,QAAG,GAAH,GAAG,CAAyC;QA3B9D;;WAEG;QACc,kBAAa,GAC7B,IAAI,2BAAgB,EAAE,CAAC;QAQxB;;;WAGG;QACK,sBAAiB,GAAW,CAAC,CAAC;IAYnC,CAAC;IAEG,iBAAiB,CAAC,MAA4B;QACpD,IAAI,IAAI,CAAC,oBAAoB,KAAK,SAAS,EAAE,CAAC;YAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC;YACpD,IAAA,iBAAM,EACL,UAAU,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM,EAClC,KAAK,CAAC,uDAAuD,CAC7D,CAAC;YACF,oFAAoF;YACpF,mEAAmE;YACnE,IAAI,UAAU,KAAK,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC;gBACnD,IAAA,iBAAM,EAAC,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;gBAC5E,IAAI,CAAC,oBAAoB,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC;YACnD,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC;YACvC,CAAC;YACD,UAAU,CAAC,M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,CAAC;oBAC1D,CAAC;oBAED,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC;oBACrC,OAAO,CAAC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC;gBACtD,CAAC;gBACD,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;YACxB,CAAC;YACD,QAAQ,CAAC,wBAAa,CAAC,EAAE,CAAC;QAC3B,CAAC;IACF,CAAC;IAEM,cAAc;QACpB,IAAA,iBAAM,EACL,IAAI,CAAC,iBAAiB,EACtB,KAAK,CAAC,+DAA+D,CACrE,CAAC;QACF,IAAA,iBAAM,EACL,IAAI,CAAC,oBAAoB,KAAK,SAAS,EACvC,KAAK,CAAC,6CAA6C,CACnD,CAAC;QACF,OAAO,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;IACpD,CAAC;IAED,IAAW,iBAAiB;QAC3B,OAAO,IAAI,CAAC,oBAAoB,KAAK,SAAS,CAAC;IAChD,CAAC;IAEM,wBAAwB,CAAC,OAAgB;QAC/C,IAAI,OAAO,EAAE,CAAC;YACb,iDAAiD;YACjD,IAAA,iBAAM,EAAC,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,CAAC,wCAAwC,CAAC,CAAC;YACtF,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC5B,CAAC;aAAM,CAAC;YACP,mCAAmC;YACnC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC1B,CAAC;IACF,CAAC;CACD;AA/JD,wDA+JC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tassert,\n\tDoublyLinkedList,\n\toob,\n\ttype ListNode,\n\ttype ListNodeRange,\n} from \"@fluidframework/core-utils/internal\";\n\nimport type { GraphCommit, TaggedChange } from \"../core/index.js\";\nimport { disposeSymbol, hasSome } from \"../util/index.js\";\n\nimport type { ChangeEnricherReadonlyCheckout } from \"./changeEnricher.js\";\nimport type { ResubmitMachine } from \"./resubmitMachine.js\";\n\ninterface PendingChange<TChange> {\n\tcommit: GraphCommit<TChange>;\n\tlastEnrichment: number;\n}\ntype PendingChangeNode<TChange> = ListNode<PendingChange<TChange>>;\n\n/**\n * Default implementation of {@link ResubmitMachine}.\n */\nexport class DefaultResubmitMachine<TChange> implements ResubmitMachine<TChange> {\n\t/**\n\t * The list of commits (from oldest to most recent) that have been submitted but not sequenced.\n\t */\n\tprivate readonly inFlightQueue: DoublyLinkedList<PendingChange<TChange>> =\n\t\tnew DoublyLinkedList();\n\n\t/**\n\t * The range of in-flight commits that are currently being resubmitted.\n\t * Defined only during the resubmit phase.\n\t */\n\tprivate pendingResubmitRange: ListNodeRange<PendingChange<TChange>> | undefined;\n\n\t/**\n\t * The current enrichment version for in-flight commits.\n\t * Incremented when a peer commit is sequenced.\n\t */\n\tprivate currentEnrichment: number = 0;\n\n\tpublic constructor(\n\t\t/**\n\t\t * A function that can create a rollback for a given change.\n\t\t */\n\t\tprivate readonly makeRollback: (change: TaggedChange<TChange>) => TChange,\n\t\t/**\n\t\t * Change enricher that represent the tip of the top-level local branch (i.e., the branch on which in-flight\n\t\t * commits are applied and automatically rebased).\n\t\t */\n\t\tprivate readonly tip: ChangeEnricherReadonlyCheckout<TChange>,\n\t) {}\n\n\tpublic onCommitSubmitted(commit: GraphCommit<TChange>): void {\n\t\tif (this.pendingResubmitRange !== undefined) {\n\t\t\tconst toResubmit = this.pendingResubmitRange?.first;\n\t\t\tassert(\n\t\t\t\ttoResubmit?.data.commit === commit,\n\t\t\t\t0x981 /* Unexpected commit submitted during resubmit phase */,\n\t\t\t);\n\t\t\t// If we are not at the last commit to resubmit, advance the range to the next node.\n\t\t\t// Otherwise, clear the resubmit range as we are done resubmitting.\n\t\t\tif (toResubmit !== this.pendingResubmitRange.last) {\n\t\t\t\tassert(toResubmit.next !== undefined, 0xbd6 /* must be more in the list */);\n\t\t\t\tthis.pendingResubmitRange.first = toResubmit.next;\n\t\t\t} else {\n\t\t\t\tthis.pendingResubmitRange = undefined;\n\t\t\t}\n\t\t\ttoResubmit.remove();\n\t\t}\n\t\tthis.inFlightQueue.push({ commit, lastEnrichment: this.currentEnrichment });\n\t}\n\n\tpublic onCommitRollback(commit: GraphCommit<TChange>): void {\n\t\tassert(\n\t\t\tcommit.revision === this.inFlightQueue.last?.data.commit.revision,\n\t\t\t0xbd7 /* must rollback latest commit in the in flight queue */,\n\t\t);\n\t\tthis.inFlightQueue.pop();\n\t}\n\n\tpublic prepareForResubmit(toResubmit: readonly GraphCommit<TChange>[]): void {\n\t\tassert(\n\t\t\t!this.isInResubmitPhase,\n\t\t\t0x957 /* Invalid resubmit phase start during incomplete resubmit phase */,\n\t\t);\n\n\t\tif (!hasSome(toResubmit)) {\n\t\t\treturn;\n\t\t}\n\n\t\tassert(\n\t\t\ttoResubmit.length <= this.inFlightQueue.length,\n\t\t\t0xbd8 /* Unexpected resubmit of more commits than are in flight */,\n\t\t);\n\n\t\t// Find the first in-flight commit to resubmit.\n\t\tconst first = this.inFlightQueue.find(\n\t\t\t(v) => v.data.commit.revision === toResubmit[0].revision,\n\t\t);\n\t\t// Always resubmit to the end of all outstanding ops, but the list may grow during resubmit,\n\t\t// so we must track the current end at the start of the phase.\n\t\tconst last = this.inFlightQueue.last;\n\t\tassert(\n\t\t\tfirst !== undefined && last !== undefined,\n\t\t\t0xbd9 /* there must be inflight commits to resubmit */,\n\t\t);\n\n\t\tthis.pendingResubmitRange = { first, last };\n\t\t// If any in-flight commits have stale enrichments, recompute them.\n\t\tif (first.data.lastEnrichment < this.currentEnrichment) {\n\t\t\tconst checkout = this.tip.fork();\n\n\t\t\t// Roll back the checkout to the state before the oldest commit\n\t\t\tfor (let iCommit = toResubmit.length - 1; iCommit >= 0; iCommit -= 1) {\n\t\t\t\tconst commit = toResubmit[iCommit] ?? oob();\n\t\t\t\tconst rollback = this.makeRollback(commit);\n\t\t\t\t// WARNING: it's not currently possible to roll back past a schema change (see AB#7265).\n\t\t\t\t// Either we have to make it possible to do so, or this logic will have to change to work\n\t\t\t\t// forwards from an earlier fork instead of backwards.\n\t\t\t\tcheckout.applyTipChange(rollback);\n\t\t\t}\n\n\t\t\t// Update the enrichments of the stale commits in the in-flight queue.\n\t\t\tlet current: PendingChangeNode<TChange> | undefined = first;\n\t\t\tfor (const commit of toResubmit) {\n\t\t\t\tassert(\n\t\t\t\t\tcurrent !== undefined,\n\t\t\t\t\t0xbda /* there must be an inflight commit for each resubmit commit */,\n\t\t\t\t);\n\t\t\t\tcurrent.data.commit = commit;\n\t\t\t\tif (current.data.lastEnrichment < this.currentEnrichment) {\n\t\t\t\t\tconst enrichedChange = checkout.updateChangeEnrichments(\n\t\t\t\t\t\tcommit.change,\n\t\t\t\t\t\tcommit.revision,\n\t\t\t\t\t);\n\t\t\t\t\tconst enrichedCommit = { ...commit, change: enrichedChange };\n\n\t\t\t\t\t// Optimization: only apply the enriched change if the next commit also needs enrichment.\n\t\t\t\t\tif (\n\t\t\t\t\t\tcurrent.next !== undefined &&\n\t\t\t\t\t\tcurrent.next.data.lastEnrichment < this.currentEnrichment\n\t\t\t\t\t) {\n\t\t\t\t\t\tcheckout.applyTipChange(enrichedChange, commit.revision);\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrent.data.commit = enrichedCommit;\n\t\t\t\t\tcurrent.data.lastEnrichment = this.currentEnrichment;\n\t\t\t\t}\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\t\t\tcheckout[disposeSymbol]();\n\t\t}\n\t}\n\n\tpublic peekNextCommit(): GraphCommit<TChange> {\n\t\tassert(\n\t\t\tthis.isInResubmitPhase,\n\t\t\t0x982 /* No available commit to resubmit outside of resubmit phase */,\n\t\t);\n\t\tassert(\n\t\t\tthis.pendingResubmitRange !== undefined,\n\t\t\t0xa87 /* Expected resubmit queue to be non-empty */,\n\t\t);\n\t\treturn this.pendingResubmitRange.first.data.commit;\n\t}\n\n\tpublic get isInResubmitPhase(): boolean {\n\t\treturn this.pendingResubmitRange !== undefined;\n\t}\n\n\tpublic onSequencedCommitApplied(isLocal: boolean): void {\n\t\tif (isLocal) {\n\t\t\t// The oldest in-flight commit has been sequenced\n\t\t\tassert(this.inFlightQueue.length > 0, 0x959 /* Sequencing of unknown local commit */);\n\t\t\tthis.inFlightQueue.shift();\n\t\t} else {\n\t\t\t// A peer commit has been sequenced\n\t\t\tthis.currentEnrichment++;\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"defaultResubmitMachine.js","sourceRoot":"","sources":["../../src/shared-tree-core/defaultResubmitMachine.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAwE;AAGxE,+CAAiD;AAUjD;;GAEG;AACH,MAAa,sBAAsB;IAYlC;IACC;;OAEG;IACc,YAAwD;IACzE;;;OAGG;IACc,GAA4C;QAL5C,iBAAY,GAAZ,YAAY,CAA4C;QAKxD,QAAG,GAAH,GAAG,CAAyC;QApB9D;;WAEG;QACc,mBAAc,GAA6C,IAAI,GAAG,EAAE,CAAC;QAEtF;;;WAGG;QACK,sBAAiB,GAAW,CAAC,CAAC;IAYnC,CAAC;IAEG,iBAAiB,CAAC,MAA4B;QACpD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE;YACxC,MAAM;YACN,cAAc,EAAE,IAAI,CAAC,iBAAiB;SACtC,CAAC,CAAC;IACJ,CAAC;IAEM,gBAAgB,CAAC,MAA4B;QACnD,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAEO,iBAAiB,CACxB,QAAqB,EACrB,eAAsD;QAEtD,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACxD,IACC,aAAa,KAAK,SAAS;YAC3B,aAAa,CAAC,cAAc,KAAK,IAAI,CAAC,iBAAiB,E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AAC,OAAO,GAAG,CAAC,CAAC,CAAC;gBAC7C,IACC,UAAU,KAAK,SAAS;oBACxB,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,EACjF,CAAC;oBACF,QAAQ,CAAC,cAAc,CAAC,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;gBAC1D,CAAC;gBAED,OAAO,CAAC,MAAM,GAAG,cAAc,CAAC;gBAChC,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC;YACjD,CAAC;QACF,CAAC;QACD,QAAQ,CAAC,wBAAa,CAAC,EAAE,CAAC;IAC3B,CAAC;IAEM,iBAAiB,CACvB,QAAqB,EACrB,oBAA2D;QAE3D,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;QACvD,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACxD,OAAO,aAAa,EAAE,MAAM,CAAC;IAC9B,CAAC;IAEO,gBAAgB,CAAC,QAAqB;QAC7C,OAAO,CACN,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAA,eAAI,EAAC,4CAA4C,CAAC,CACvF,CAAC;IACH,CAAC;IAEM,wBAAwB,CAAC,QAAqB,EAAE,OAAgB;QACtE,2EAA2E;QAC3E,uFAAuF;QACvF,wFAAwF;QACxF,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,0FAA0F;YAC1F,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC1B,CAAC;IACF,CAAC;CACD;AA3HD,wDA2HC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail, oob } from \"@fluidframework/core-utils/internal\";\n\nimport type { GraphCommit, RevisionTag, TaggedChange } from \"../core/index.js\";\nimport { disposeSymbol } from \"../util/index.js\";\n\nimport type { ChangeEnricherReadonlyCheckout } from \"./changeEnricher.js\";\nimport type { ResubmitMachine } from \"./resubmitMachine.js\";\n\ninterface PendingChange<TChange> {\n\tcommit: GraphCommit<TChange>;\n\tlastEnrichment: number;\n}\n\n/**\n * Default implementation of {@link ResubmitMachine}.\n */\nexport class DefaultResubmitMachine<TChange> implements ResubmitMachine<TChange> {\n\t/**\n\t * Maps from revision of submitted commit to the pending change for that commit.\n\t */\n\tprivate readonly pendingChanges: Map<RevisionTag, PendingChange<TChange>> = new Map();\n\n\t/**\n\t * The current enrichment version for in-flight commits.\n\t * Incremented when a peer commit is sequenced.\n\t */\n\tprivate currentEnrichment: number = 0;\n\n\tpublic constructor(\n\t\t/**\n\t\t * A function that can create a rollback for a given change.\n\t\t */\n\t\tprivate readonly makeRollback: (change: TaggedChange<TChange>) => TChange,\n\t\t/**\n\t\t * Change enricher that represent the tip of the top-level local branch (i.e., the branch on which in-flight\n\t\t * commits are applied and automatically rebased).\n\t\t */\n\t\tprivate readonly tip: ChangeEnricherReadonlyCheckout<TChange>,\n\t) {}\n\n\tpublic onCommitSubmitted(commit: GraphCommit<TChange>): void {\n\t\tthis.pendingChanges.set(commit.revision, {\n\t\t\tcommit,\n\t\t\tlastEnrichment: this.currentEnrichment,\n\t\t});\n\t}\n\n\tpublic onCommitRollback(commit: GraphCommit<TChange>): void {\n\t\tthis.pendingChanges.delete(commit.revision);\n\t}\n\n\tprivate updateEnrichments(\n\t\trevision: RevisionTag,\n\t\tgetLocalCommits: () => readonly GraphCommit<TChange>[],\n\t): void {\n\t\tconst pendingChange = this.pendingChanges.get(revision);\n\t\tif (\n\t\t\tpendingChange === undefined ||\n\t\t\tpendingChange.lastEnrichment === this.currentEnrichment\n\t\t) {\n\t\t\t// The first commit to resubmit has a valid enrichment, so all pending commits must be valid.\n\t\t\treturn;\n\t\t}\n\n\t\tconst localCommits = getLocalCommits();\n\t\tassert(\n\t\t\tlocalCommits[0]?.revision === revision,\n\t\t\t\"Expected local commits to start with specified revision\",\n\t\t);\n\n\t\t// Some in-flight commits have stale enrichments, so we recompute them.\n\t\tconst checkout = this.tip.fork();\n\n\t\t// Roll back the checkout to the state before the oldest commit\n\t\tfor (let iCommit = localCommits.length - 1; iCommit >= 0; iCommit -= 1) {\n\t\t\tconst commit = localCommits[iCommit] ?? oob();\n\t\t\tconst rollback = this.makeRollback(commit);\n\t\t\t// WARNING: it's not currently possible to roll back past a schema change (see AB#7265).\n\t\t\t// Either we have to make it possible to do so, or this logic will have to change to work\n\t\t\t// forwards from an earlier fork instead of backwards.\n\t\t\tcheckout.applyTipChange(rollback);\n\t\t}\n\n\t\t// Update the enrichments of the stale commits.\n\t\tfor (const [iCommit, commit] of localCommits.entries()) {\n\t\t\tconst current = this.getPendingChange(commit.revision);\n\t\t\tassert(\n\t\t\t\tcurrent !== undefined,\n\t\t\t\t0xbda /* there must be an inflight commit for each resubmit commit */,\n\t\t\t);\n\n\t\t\tif (current.lastEnrichment < this.currentEnrichment) {\n\t\t\t\tconst enrichedChange = checkout.updateChangeEnrichments(\n\t\t\t\t\tcommit.change,\n\t\t\t\t\tcommit.revision,\n\t\t\t\t);\n\t\t\t\tconst enrichedCommit = { ...commit, change: enrichedChange };\n\n\t\t\t\t// Optimization: only apply the enriched change if the next commit also needs enrichment.\n\t\t\t\tconst nextCommit = localCommits[iCommit + 1];\n\t\t\t\tif (\n\t\t\t\t\tnextCommit !== undefined &&\n\t\t\t\t\tthis.getPendingChange(nextCommit.revision).lastEnrichment < this.currentEnrichment\n\t\t\t\t) {\n\t\t\t\t\tcheckout.applyTipChange(enrichedChange, commit.revision);\n\t\t\t\t}\n\n\t\t\t\tcurrent.commit = enrichedCommit;\n\t\t\t\tcurrent.lastEnrichment = this.currentEnrichment;\n\t\t\t}\n\t\t}\n\t\tcheckout[disposeSymbol]();\n\t}\n\n\tpublic getEnrichedCommit(\n\t\trevision: RevisionTag,\n\t\tgetLocalCommitsSince: () => readonly GraphCommit<TChange>[],\n\t): GraphCommit<TChange> | undefined {\n\t\tthis.updateEnrichments(revision, getLocalCommitsSince);\n\t\tconst pendingChange = this.pendingChanges.get(revision);\n\t\treturn pendingChange?.commit;\n\t}\n\n\tprivate getPendingChange(revision: RevisionTag): PendingChange<TChange> {\n\t\treturn (\n\t\t\tthis.pendingChanges.get(revision) ?? fail(\"No pending change stored for this revision\")\n\t\t);\n\t}\n\n\tpublic onSequencedCommitApplied(revision: RevisionTag, isLocal: boolean): void {\n\t\t// We no longer need to track enrichment for the commit with this revision.\n\t\t// Note that we may have a commit for this revision even if this is not a local change,\n\t\t// as this client and another peer may have merged the same commit from a shared branch.\n\t\tthis.pendingChanges.delete(revision);\n\t\tif (!isLocal) {\n\t\t\t// A peer commit has been sequenced, invalidating the enrichment of our in-flight commits.\n\t\t\tthis.currentEnrichment++;\n\t\t}\n\t}\n}\n"]}
|
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
6
|
-
import { type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../codec/index.js";
|
|
6
|
+
import { type CodecTree, type DependentFormatVersion, type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../codec/index.js";
|
|
7
7
|
import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag, SchemaAndPolicy } from "../core/index.js";
|
|
8
|
-
import type
|
|
8
|
+
import { type Brand, type JsonCompatibleReadOnly } from "../util/index.js";
|
|
9
9
|
import type { SummaryData } from "./editManager.js";
|
|
10
10
|
export interface EditManagerEncodingContext {
|
|
11
11
|
idCompressor: IIdCompressor;
|
|
12
12
|
readonly schema?: SchemaAndPolicy;
|
|
13
13
|
}
|
|
14
|
-
export declare function makeEditManagerCodec<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions, writeVersion: number): IJsonCodec<SummaryData<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, EditManagerEncodingContext>;
|
|
15
|
-
export declare function makeEditManagerCodecs<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions): ICodecFamily<SummaryData<TChangeset>, EditManagerEncodingContext>;
|
|
14
|
+
export declare function makeEditManagerCodec<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, dependentChangeFormatVersion: DependentFormatVersion<EditManagerFormatVersion>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions, writeVersion: number): IJsonCodec<SummaryData<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, EditManagerEncodingContext>;
|
|
15
|
+
export declare function makeEditManagerCodecs<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, dependentChangeFormatVersion: DependentFormatVersion<EditManagerFormatVersion>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions): ICodecFamily<SummaryData<TChangeset>, EditManagerEncodingContext>;
|
|
16
|
+
export type EditManagerFormatVersion = Brand<1 | 2 | 3 | 4 | 5, "EditManagerFormatVersion">;
|
|
17
|
+
export declare const editManagerFormatVersions: ReadonlySet<EditManagerFormatVersion>;
|
|
18
|
+
export declare function getCodecTreeForEditManagerFormatWithChange(version: EditManagerFormatVersion, changeFormat: CodecTree): CodecTree;
|
|
16
19
|
//# sourceMappingURL=editManagerCodecs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecs.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"editManagerCodecs.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EACN,KAAK,SAAS,EACd,KAAK,sBAAsB,EAE3B,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAS,KAAK,KAAK,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAElF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,MAAM,WAAW,0BAA0B;IAC1C,YAAY,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CAClC;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAC9C,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,qBAAqB,CAAC,EAC7D,4BAA4B,EAAE,sBAAsB,CAAC,wBAAwB,CAAC,EAC9E,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,MAAM,GAClB,UAAU,CACZ,WAAW,CAAC,UAAU,CAAC,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,CAC1B,CAQA;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAC/C,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,qBAAqB,CAAC,EAC7D,4BAA4B,EAAE,sBAAsB,CAAC,wBAAwB,CAAC,EAC9E,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,aAAa,GACpB,YAAY,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAC,CA8BnE;AAED,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,0BAA0B,CAAC,CAAC;AAC5F,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,wBAAwB,CAM1E,CAAC;AAEH,wBAAgB,0CAA0C,CACzD,OAAO,EAAE,wBAAwB,EACjC,YAAY,EAAE,SAAS,GACrB,SAAS,CAMX"}
|
|
@@ -4,24 +4,55 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.makeEditManagerCodecs = exports.makeEditManagerCodec = void 0;
|
|
7
|
+
exports.getCodecTreeForEditManagerFormatWithChange = exports.editManagerFormatVersions = exports.makeEditManagerCodecs = exports.makeEditManagerCodec = void 0;
|
|
8
|
+
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
8
9
|
const index_js_1 = require("../codec/index.js");
|
|
9
10
|
const index_js_2 = require("../codec/index.js");
|
|
11
|
+
const index_js_3 = require("../util/index.js");
|
|
10
12
|
const editManagerCodecsV1toV4_js_1 = require("./editManagerCodecsV1toV4.js");
|
|
11
13
|
const editManagerCodecsV5_js_1 = require("./editManagerCodecsV5.js");
|
|
12
|
-
function makeEditManagerCodec(changeCodecs, revisionTagCodec, options, writeVersion) {
|
|
13
|
-
const family = makeEditManagerCodecs(changeCodecs, revisionTagCodec, options);
|
|
14
|
+
function makeEditManagerCodec(changeCodecs, dependentChangeFormatVersion, revisionTagCodec, options, writeVersion) {
|
|
15
|
+
const family = makeEditManagerCodecs(changeCodecs, dependentChangeFormatVersion, revisionTagCodec, options);
|
|
14
16
|
return (0, index_js_2.makeVersionDispatchingCodec)(family, { ...options, writeVersion });
|
|
15
17
|
}
|
|
16
18
|
exports.makeEditManagerCodec = makeEditManagerCodec;
|
|
17
|
-
function makeEditManagerCodecs(changeCodecs, revisionTagCodec, options) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
function makeEditManagerCodecs(changeCodecs, dependentChangeFormatVersion, revisionTagCodec, options) {
|
|
20
|
+
const registry = Array.from(exports.editManagerFormatVersions, (version) => {
|
|
21
|
+
const changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version));
|
|
22
|
+
switch (version) {
|
|
23
|
+
case 1:
|
|
24
|
+
case 2:
|
|
25
|
+
case 3:
|
|
26
|
+
case 4:
|
|
27
|
+
return [
|
|
28
|
+
version,
|
|
29
|
+
(0, editManagerCodecsV1toV4_js_1.makeV1CodecWithVersion)(changeCodec, revisionTagCodec, options, version),
|
|
30
|
+
];
|
|
31
|
+
case 5:
|
|
32
|
+
return [
|
|
33
|
+
version,
|
|
34
|
+
(0, editManagerCodecsV5_js_1.makeV5CodecWithVersion)(changeCodec, revisionTagCodec, options, version),
|
|
35
|
+
];
|
|
36
|
+
default:
|
|
37
|
+
(0, internal_1.unreachableCase)(version);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return (0, index_js_1.makeCodecFamily)(registry);
|
|
25
41
|
}
|
|
26
42
|
exports.makeEditManagerCodecs = makeEditManagerCodecs;
|
|
43
|
+
exports.editManagerFormatVersions = new Set([
|
|
44
|
+
(0, index_js_3.brand)(1),
|
|
45
|
+
(0, index_js_3.brand)(2),
|
|
46
|
+
(0, index_js_3.brand)(3),
|
|
47
|
+
(0, index_js_3.brand)(4),
|
|
48
|
+
(0, index_js_3.brand)(5),
|
|
49
|
+
]);
|
|
50
|
+
function getCodecTreeForEditManagerFormatWithChange(version, changeFormat) {
|
|
51
|
+
return {
|
|
52
|
+
name: "EditManager",
|
|
53
|
+
version,
|
|
54
|
+
children: [changeFormat],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
exports.getCodecTreeForEditManagerFormatWithChange = getCodecTreeForEditManagerFormatWithChange;
|
|
27
58
|
//# sourceMappingURL=editManagerCodecs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"editManagerCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAAsE;AAEtE,gDAQ2B;AAC3B,gDAAgE;AAOhE,+CAAkF;AAGlF,6EAAsE;AACtE,qEAAkE;AAOlE,SAAgB,oBAAoB,CACnC,YAA6D,EAC7D,4BAA8E,EAC9E,gBAKC,EACD,OAAsB,EACtB,YAAoB;IAOpB,MAAM,MAAM,GAAG,qBAAqB,CACnC,YAAY,EACZ,4BAA4B,EAC5B,gBAAgB,EAChB,OAAO,CACP,CAAC;IACF,OAAO,IAAA,sCAA2B,EAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1E,CAAC;AAxBD,oDAwBC;AAED,SAAgB,qBAAqB,CACpC,YAA6D,EAC7D,4BAA8E,EAC9E,gBAKC,EACD,OAAsB;IAEtB,MAAM,QAAQ,GAQR,KAAK,CAAC,IAAI,CAAC,iCAAyB,EAAE,CAAC,OAAO,EAAE,EAAE;QACvD,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,4BAA4B,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QACvF,QAAQ,OAAO,EAAE,CAAC;YACjB,KAAK,CAAC,CAAC;YACP,KAAK,CAAC,CAAC;YACP,KAAK,CAAC,CAAC;YACP,KAAK,CAAC;gBACL,OAAO;oBACN,OAAO;oBACP,IAAA,mDAAsB,EAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC;iBACvE,CAAC;YACH,KAAK,CAAC;gBACL,OAAO;oBACN,OAAO;oBACP,IAAA,+CAAsB,EAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC;iBACvE,CAAC;YACH;gBACC,IAAA,0BAAe,EAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;IACF,CAAC,CAAC,CAAC;IACH,OAAO,IAAA,0BAAe,EAAC,QAAQ,CAAC,CAAC;AAClC,CAAC;AAxCD,sDAwCC;AAGY,QAAA,yBAAyB,GAA0C,IAAI,GAAG,CAAC;IACvF,IAAA,gBAAK,EAAC,CAAC,CAAC;IACR,IAAA,gBAAK,EAAC,CAAC,CAAC;IACR,IAAA,gBAAK,EAAC,CAAC,CAAC;IACR,IAAA,gBAAK,EAAC,CAAC,CAAC;IACR,IAAA,gBAAK,EAAC,CAAC,CAAC;CACR,CAAC,CAAC;AAEH,SAAgB,0CAA0C,CACzD,OAAiC,EACjC,YAAuB;IAEvB,OAAO;QACN,IAAI,EAAE,aAAa;QACnB,OAAO;QACP,QAAQ,EAAE,CAAC,YAAY,CAAC;KACxB,CAAC;AACH,CAAC;AATD,gGASC","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\";\n\nimport {\n\ttype CodecTree,\n\ttype DependentFormatVersion,\n\ttype FormatVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\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, type Brand, type JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport type { SummaryData } from \"./editManager.js\";\nimport { makeV1CodecWithVersion } from \"./editManagerCodecsV1toV4.js\";\nimport { makeV5CodecWithVersion } from \"./editManagerCodecsV5.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\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: ICodecOptions,\n\twriteVersion: number,\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\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\tconst changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version));\n\t\tswitch (version) {\n\t\t\tcase 1:\n\t\t\tcase 2:\n\t\t\tcase 3:\n\t\t\tcase 4:\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\tcase 5:\n\t\t\t\treturn [\n\t\t\t\t\tversion,\n\t\t\t\t\tmakeV5CodecWithVersion(changeCodec, revisionTagCodec, options, version),\n\t\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 type EditManagerFormatVersion = Brand<1 | 2 | 3 | 4 | 5, \"EditManagerFormatVersion\">;\nexport const editManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> = new Set([\n\tbrand(1),\n\tbrand(2),\n\tbrand(3),\n\tbrand(4),\n\tbrand(5),\n]);\n\nexport function getCodecTreeForEditManagerFormatWithChange(\n\tversion: EditManagerFormatVersion,\n\tchangeFormat: CodecTree,\n): CodecTree {\n\treturn {\n\t\tname: \"EditManager\",\n\t\tversion,\n\t\tchildren: [changeFormat],\n\t};\n}\n"]}
|
|
@@ -8,8 +8,9 @@ export { type ExplicitCoreCodecVersions, SharedTreeCore, type Summarizable, type
|
|
|
8
8
|
export type { ResubmitMachine } from "./resubmitMachine.js";
|
|
9
9
|
export { DefaultResubmitMachine } from "./defaultResubmitMachine.js";
|
|
10
10
|
export { type ChangeEnricherReadonlyCheckout, type ChangeEnricherMutableCheckout, NoOpChangeEnricher, } from "./changeEnricher.js";
|
|
11
|
-
export { makeEditManagerCodec } from "./editManagerCodecs.js";
|
|
11
|
+
export { makeEditManagerCodec, getCodecTreeForEditManagerFormatWithChange, type EditManagerFormatVersion, editManagerFormatVersions, } from "./editManagerCodecs.js";
|
|
12
12
|
export { EditManagerSummarizer } from "./editManagerSummarizer.js";
|
|
13
13
|
export { EditManager, minimumPossibleSequenceNumber, type SummaryData, type SharedBranchSummaryData, } from "./editManager.js";
|
|
14
14
|
export type { Commit, SeqNumber, SequencedCommit, SummarySessionBranch, EncodedCommit, } from "./editManagerFormatCommons.js";
|
|
15
|
+
export { type MessageFormatVersion, messageFormatVersions, getCodecTreeForMessageFormatWithChange, } from "./messageCodecs.js";
|
|
15
16
|
//# 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,KAAK,yBAAyB,EAC9B,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,GAC5B,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EACN,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,
|
|
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,KAAK,yBAAyB,EAC9B,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,GAC5B,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EACN,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,oBAAoB,EACpB,0CAA0C,EAC1C,KAAK,wBAAwB,EAC7B,yBAAyB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACN,WAAW,EACX,6BAA6B,EAC7B,KAAK,WAAW,EAChB,KAAK,uBAAuB,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACX,MAAM,EACN,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,aAAa,GACb,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACN,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,sCAAsC,GACtC,MAAM,oBAAoB,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.minimumPossibleSequenceNumber = exports.EditManager = exports.EditManagerSummarizer = exports.makeEditManagerCodec = exports.NoOpChangeEnricher = exports.DefaultResubmitMachine = exports.SharedTreeCore = exports.SquashingTransactionStack = exports.TransactionStack = exports.TransactionResult = exports.SharedTreeBranch = exports.onForkTransitive = void 0;
|
|
7
|
+
exports.getCodecTreeForMessageFormatWithChange = exports.messageFormatVersions = exports.minimumPossibleSequenceNumber = exports.EditManager = exports.EditManagerSummarizer = exports.editManagerFormatVersions = exports.getCodecTreeForEditManagerFormatWithChange = exports.makeEditManagerCodec = exports.NoOpChangeEnricher = exports.DefaultResubmitMachine = exports.SharedTreeCore = exports.SquashingTransactionStack = exports.TransactionStack = exports.TransactionResult = exports.SharedTreeBranch = exports.onForkTransitive = void 0;
|
|
8
8
|
var branch_js_1 = require("./branch.js");
|
|
9
9
|
Object.defineProperty(exports, "onForkTransitive", { enumerable: true, get: function () { return branch_js_1.onForkTransitive; } });
|
|
10
10
|
Object.defineProperty(exports, "SharedTreeBranch", { enumerable: true, get: function () { return branch_js_1.SharedTreeBranch; } });
|
|
@@ -20,9 +20,14 @@ var changeEnricher_js_1 = require("./changeEnricher.js");
|
|
|
20
20
|
Object.defineProperty(exports, "NoOpChangeEnricher", { enumerable: true, get: function () { return changeEnricher_js_1.NoOpChangeEnricher; } });
|
|
21
21
|
var editManagerCodecs_js_1 = require("./editManagerCodecs.js");
|
|
22
22
|
Object.defineProperty(exports, "makeEditManagerCodec", { enumerable: true, get: function () { return editManagerCodecs_js_1.makeEditManagerCodec; } });
|
|
23
|
+
Object.defineProperty(exports, "getCodecTreeForEditManagerFormatWithChange", { enumerable: true, get: function () { return editManagerCodecs_js_1.getCodecTreeForEditManagerFormatWithChange; } });
|
|
24
|
+
Object.defineProperty(exports, "editManagerFormatVersions", { enumerable: true, get: function () { return editManagerCodecs_js_1.editManagerFormatVersions; } });
|
|
23
25
|
var editManagerSummarizer_js_1 = require("./editManagerSummarizer.js");
|
|
24
26
|
Object.defineProperty(exports, "EditManagerSummarizer", { enumerable: true, get: function () { return editManagerSummarizer_js_1.EditManagerSummarizer; } });
|
|
25
27
|
var editManager_js_1 = require("./editManager.js");
|
|
26
28
|
Object.defineProperty(exports, "EditManager", { enumerable: true, get: function () { return editManager_js_1.EditManager; } });
|
|
27
29
|
Object.defineProperty(exports, "minimumPossibleSequenceNumber", { enumerable: true, get: function () { return editManager_js_1.minimumPossibleSequenceNumber; } });
|
|
30
|
+
var messageCodecs_js_1 = require("./messageCodecs.js");
|
|
31
|
+
Object.defineProperty(exports, "messageFormatVersions", { enumerable: true, get: function () { return messageCodecs_js_1.messageFormatVersions; } });
|
|
32
|
+
Object.defineProperty(exports, "getCodecTreeForMessageFormatWithChange", { enumerable: true, get: function () { return messageCodecs_js_1.getCodecTreeForMessageFormatWithChange; } });
|
|
28
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree-core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAMqB;AALpB,6GAAA,gBAAgB,OAAA;AAChB,6GAAA,gBAAgB,OAAA;AAMjB,mDAQ0B;AAPzB,mHAAA,iBAAiB,OAAA;AAGjB,kHAAA,gBAAgB,OAAA;AAChB,2HAAA,yBAAyB,OAAA;AAK1B,yDAO6B;AAL5B,mHAAA,cAAc,OAAA;AAQf,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAE/B,yDAI6B;AAD5B,uHAAA,kBAAkB,OAAA;AAGnB,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree-core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAMqB;AALpB,6GAAA,gBAAgB,OAAA;AAChB,6GAAA,gBAAgB,OAAA;AAMjB,mDAQ0B;AAPzB,mHAAA,iBAAiB,OAAA;AAGjB,kHAAA,gBAAgB,OAAA;AAChB,2HAAA,yBAAyB,OAAA;AAK1B,yDAO6B;AAL5B,mHAAA,cAAc,OAAA;AAQf,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAE/B,yDAI6B;AAD5B,uHAAA,kBAAkB,OAAA;AAGnB,+DAKgC;AAJ/B,4HAAA,oBAAoB,OAAA;AACpB,kJAAA,0CAA0C,OAAA;AAE1C,iIAAA,yBAAyB,OAAA;AAE1B,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA;AAC9B,mDAK0B;AAJzB,6GAAA,WAAW,OAAA;AACX,+HAAA,6BAA6B,OAAA;AAY9B,uDAI4B;AAF3B,yHAAA,qBAAqB,OAAA;AACrB,0IAAA,sCAAsC,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tonForkTransitive,\n\tSharedTreeBranch,\n\ttype SharedTreeBranchChange,\n\ttype SharedTreeBranchEvents,\n\ttype BranchId,\n} from \"./branch.js\";\n\nexport {\n\tTransactionResult,\n\ttype Transactor,\n\ttype TransactionEvents,\n\tTransactionStack,\n\tSquashingTransactionStack,\n\ttype OnPush,\n\ttype OnPop,\n} from \"./transaction.js\";\n\nexport {\n\ttype ExplicitCoreCodecVersions,\n\tSharedTreeCore,\n\ttype Summarizable,\n\ttype SummaryElementParser,\n\ttype SummaryElementStringifier,\n\ttype ClonableSchemaAndPolicy,\n} from \"./sharedTreeCore.js\";\n\nexport type { ResubmitMachine } from \"./resubmitMachine.js\";\nexport { DefaultResubmitMachine } from \"./defaultResubmitMachine.js\";\n\nexport {\n\ttype ChangeEnricherReadonlyCheckout,\n\ttype ChangeEnricherMutableCheckout,\n\tNoOpChangeEnricher,\n} from \"./changeEnricher.js\";\n\nexport {\n\tmakeEditManagerCodec,\n\tgetCodecTreeForEditManagerFormatWithChange,\n\ttype EditManagerFormatVersion,\n\teditManagerFormatVersions,\n} from \"./editManagerCodecs.js\";\nexport { EditManagerSummarizer } from \"./editManagerSummarizer.js\";\nexport {\n\tEditManager,\n\tminimumPossibleSequenceNumber,\n\ttype SummaryData,\n\ttype SharedBranchSummaryData,\n} from \"./editManager.js\";\nexport type {\n\tCommit,\n\tSeqNumber,\n\tSequencedCommit,\n\tSummarySessionBranch,\n\tEncodedCommit,\n} from \"./editManagerFormatCommons.js\";\n\nexport {\n\ttype MessageFormatVersion,\n\tmessageFormatVersions,\n\tgetCodecTreeForMessageFormatWithChange,\n} from \"./messageCodecs.js\";\n"]}
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../codec/index.js";
|
|
5
|
+
import { type CodecTree, type DependentFormatVersion, type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../codec/index.js";
|
|
6
6
|
import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag, SchemaAndPolicy } from "../core/index.js";
|
|
7
|
-
import type
|
|
7
|
+
import { type Brand, type JsonCompatibleReadOnly } from "../util/index.js";
|
|
8
8
|
import type { DecodedMessage } from "./messageTypes.js";
|
|
9
9
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
10
10
|
export interface MessageEncodingContext {
|
|
11
11
|
idCompressor: IIdCompressor;
|
|
12
12
|
schema?: SchemaAndPolicy;
|
|
13
13
|
}
|
|
14
|
-
export declare function makeMessageCodec<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions, writeVersion
|
|
14
|
+
export declare function makeMessageCodec<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, dependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions, writeVersion?: MessageFormatVersion): IJsonCodec<DecodedMessage<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, MessageEncodingContext>;
|
|
15
15
|
/**
|
|
16
16
|
* @privateRemarks Exported for testing.
|
|
17
17
|
*/
|
|
18
|
-
export declare function makeMessageCodecs<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions): ICodecFamily<DecodedMessage<TChangeset>, MessageEncodingContext>;
|
|
18
|
+
export declare function makeMessageCodecs<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, dependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions): ICodecFamily<DecodedMessage<TChangeset>, MessageEncodingContext>;
|
|
19
|
+
export type MessageFormatVersion = Brand<undefined | 1 | 2 | 3 | 4 | 5, "MessageFormatVersion">;
|
|
20
|
+
export declare const messageFormatVersions: ReadonlySet<MessageFormatVersion>;
|
|
21
|
+
export declare function getCodecTreeForMessageFormatWithChange(version: MessageFormatVersion, changeFormat: CodecTree): CodecTree;
|
|
19
22
|
//# sourceMappingURL=messageCodecs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageCodecs.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"messageCodecs.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,SAAS,EACd,KAAK,sBAAsB,EAE3B,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAGf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kB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gB,sCAAsC,CACrD,OAAO,EAAE,oBAAoB,EAC7B,YAAY,EAAE,SAAS,GACrB,SAAS,CAMX"}
|
|
@@ -4,38 +4,59 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.makeMessageCodecs = exports.makeMessageCodec = void 0;
|
|
7
|
+
exports.getCodecTreeForMessageFormatWithChange = exports.messageFormatVersions = exports.makeMessageCodecs = exports.makeMessageCodec = void 0;
|
|
8
|
+
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
8
9
|
const index_js_1 = require("../codec/index.js");
|
|
10
|
+
const index_js_2 = require("../util/index.js");
|
|
9
11
|
const messageCodecV1ToV4_js_1 = require("./messageCodecV1ToV4.js");
|
|
10
12
|
const messageCodecV5_js_1 = require("./messageCodecV5.js");
|
|
11
|
-
function makeMessageCodec(changeCodecs, revisionTagCodec, options, writeVersion) {
|
|
12
|
-
const family = makeMessageCodecs(changeCodecs, revisionTagCodec, options);
|
|
13
|
+
function makeMessageCodec(changeCodecs, dependentChangeFormatVersion, revisionTagCodec, options, writeVersion = (0, index_js_2.brand)(1)) {
|
|
14
|
+
const family = makeMessageCodecs(changeCodecs, dependentChangeFormatVersion, revisionTagCodec, options);
|
|
13
15
|
return (0, index_js_1.makeVersionDispatchingCodec)(family, { ...options, writeVersion });
|
|
14
16
|
}
|
|
15
17
|
exports.makeMessageCodec = makeMessageCodec;
|
|
16
18
|
/**
|
|
17
19
|
* @privateRemarks Exported for testing.
|
|
18
20
|
*/
|
|
19
|
-
function makeMessageCodecs(changeCodecs, revisionTagCodec, options) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
function makeMessageCodecs(changeCodecs, dependentChangeFormatVersion, revisionTagCodec, options) {
|
|
22
|
+
const registry = Array.from(exports.messageFormatVersions).map((version) => {
|
|
23
|
+
const changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version)).json;
|
|
24
|
+
switch (version) {
|
|
25
|
+
case undefined:
|
|
26
|
+
case 1:
|
|
27
|
+
case 2:
|
|
28
|
+
case 3:
|
|
29
|
+
case 4:
|
|
30
|
+
return [
|
|
31
|
+
version,
|
|
32
|
+
(0, messageCodecV1ToV4_js_1.makeV1ToV4CodecWithVersion)(changeCodec, revisionTagCodec, options, version ?? 1),
|
|
33
|
+
];
|
|
34
|
+
case 5:
|
|
35
|
+
return [
|
|
36
|
+
version,
|
|
37
|
+
(0, messageCodecV5_js_1.makeV5CodecWithVersion)(changeCodec, revisionTagCodec, options, version),
|
|
38
|
+
];
|
|
39
|
+
default:
|
|
40
|
+
(0, internal_1.unreachableCase)(version);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return (0, index_js_1.makeCodecFamily)(registry);
|
|
39
44
|
}
|
|
40
45
|
exports.makeMessageCodecs = makeMessageCodecs;
|
|
46
|
+
exports.messageFormatVersions = new Set([
|
|
47
|
+
(0, index_js_2.brand)(undefined),
|
|
48
|
+
(0, index_js_2.brand)(1),
|
|
49
|
+
(0, index_js_2.brand)(2),
|
|
50
|
+
(0, index_js_2.brand)(3),
|
|
51
|
+
(0, index_js_2.brand)(4),
|
|
52
|
+
(0, index_js_2.brand)(5),
|
|
53
|
+
]);
|
|
54
|
+
function getCodecTreeForMessageFormatWithChange(version, changeFormat) {
|
|
55
|
+
return {
|
|
56
|
+
name: "Message",
|
|
57
|
+
version,
|
|
58
|
+
children: [changeFormat],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.getCodecTreeForMessageFormatWithChange = getCodecTreeForMessageFormatWithChange;
|
|
41
62
|
//# sourceMappingURL=messageCodecs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"messageCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAsE;AACtE,gDAS2B;AAO3B,+CAAkF;AAIlF,mEAAqE;AACrE,2DAA6D;AAO7D,SAAgB,gBAAgB,CAC/B,YAA6D,EAC7D,4BAA0E,EAC1E,gBAKC,EACD,OAAsB,EACtB,eAAqC,IAAA,gBAAK,EAAC,CAAC,CAAC;IAO7C,MAAM,MAAM,GAAG,iBAAiB,CAC/B,YAAY,EACZ,4BAA4B,EAC5B,gBAAgB,EAChB,OAAO,CACP,CAAC;IACF,OAAO,IAAA,sCAA2B,EAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1E,CAAC;AAxBD,4CAwBC;AAED;;GAEG;AACH,SAAgB,iBAAiB,CAChC,YAA6D,EAC7D,4BAA0E,EAC1E,gBAKC,EACD,OAAsB;IAEtB,MAAM,QAAQ,GAQR,KAAK,CAAC,IAAI,CAAC,6BAAqB,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QACvD,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CACvC,4BAA4B,CAAC,MAAM,CAAC,OAAO,CAAC,CAC5C,CAAC,IAAI,CAAC;QACP,QAAQ,OAAO,EAAE,CAAC;YACjB,KAAK,SAAS,CAAC;YACf,KAAK,CAAC,CAAC;YACP,KAAK,CAAC,CAAC;YACP,KAAK,CAAC,CAAC;YACP,KAAK,CAAC;gBACL,OAAO;oBACN,OAAO;oBACP,IAAA,kDAA0B,EAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,IAAI,CAAC,CAAC;iBAChF,CAAC;YACH,KAAK,CAAC;gBACL,OAAO;oBACN,OAAO;oBACP,IAAA,0CAAsB,EAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC;iBACvE,CAAC;YACH;gBACC,IAAA,0BAAe,EAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;IACF,CAAC,CAAC,CAAC;IACH,OAAO,IAAA,0BAAe,EAAC,QAAQ,CAAC,CAAC;AAClC,CAAC;AA3CD,8CA2CC;AAMY,QAAA,qBAAqB,GAAsC,IAAI,GAAG,CAAC;IAC/E,IAAA,gBAAK,EAAC,SAAS,CAAC;IAChB,IAAA,gBAAK,EAAC,CAAC,CAAC;IACR,IAAA,gBAAK,EAAC,CAAC,CAAC;IACR,IAAA,gBAAK,EAAC,CAAC,CAAC;IACR,IAAA,gBAAK,EAAC,CAAC,CAAC;IACR,IAAA,gBAAK,EAAC,CAAC,CAAC;CACR,CAAC,CAAC;AAEH,SAAgB,sCAAsC,CACrD,OAA6B,EAC7B,YAAuB;IAEvB,OAAO;QACN,IAAI,EAAE,SAAS;QACf,OAAO;QACP,QAAQ,EAAE,CAAC,YAAY,CAAC;KACxB,CAAC;AACH,CAAC;AATD,wFASC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport {\n\ttype CodecTree,\n\ttype DependentFormatVersion,\n\ttype FormatVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n} from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport { brand, type Brand, type JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport type { DecodedMessage } from \"./messageTypes.js\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport { makeV1ToV4CodecWithVersion } from \"./messageCodecV1ToV4.js\";\nimport { makeV5CodecWithVersion } from \"./messageCodecV5.js\";\n\nexport interface MessageEncodingContext {\n\tidCompressor: IIdCompressor;\n\tschema?: SchemaAndPolicy;\n}\n\nexport function makeMessageCodec<TChangeset>(\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,\n\tdependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n\twriteVersion: MessageFormatVersion = brand(1),\n): IJsonCodec<\n\tDecodedMessage<TChangeset>,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tMessageEncodingContext\n> {\n\tconst family = makeMessageCodecs(\n\t\tchangeCodecs,\n\t\tdependentChangeFormatVersion,\n\t\trevisionTagCodec,\n\t\toptions,\n\t);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * @privateRemarks Exported for testing.\n */\nexport function makeMessageCodecs<TChangeset>(\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,\n\tdependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n): ICodecFamily<DecodedMessage<TChangeset>, MessageEncodingContext> {\n\tconst registry: [\n\t\tFormatVersion,\n\t\tIJsonCodec<\n\t\t\tDecodedMessage<TChangeset>,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tMessageEncodingContext\n\t\t>,\n\t][] = Array.from(messageFormatVersions).map((version) => {\n\t\tconst changeCodec = changeCodecs.resolve(\n\t\t\tdependentChangeFormatVersion.lookup(version),\n\t\t).json;\n\t\tswitch (version) {\n\t\t\tcase undefined:\n\t\t\tcase 1:\n\t\t\tcase 2:\n\t\t\tcase 3:\n\t\t\tcase 4:\n\t\t\t\treturn [\n\t\t\t\t\tversion,\n\t\t\t\t\tmakeV1ToV4CodecWithVersion(changeCodec, revisionTagCodec, options, version ?? 1),\n\t\t\t\t];\n\t\t\tcase 5:\n\t\t\t\treturn [\n\t\t\t\t\tversion,\n\t\t\t\t\tmakeV5CodecWithVersion(changeCodec, revisionTagCodec, options, version),\n\t\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 type MessageFormatVersion = Brand<\n\tundefined | 1 | 2 | 3 | 4 | 5,\n\t\"MessageFormatVersion\"\n>;\nexport const messageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set([\n\tbrand(undefined),\n\tbrand(1),\n\tbrand(2),\n\tbrand(3),\n\tbrand(4),\n\tbrand(5),\n]);\n\nexport function getCodecTreeForMessageFormatWithChange(\n\tversion: MessageFormatVersion,\n\tchangeFormat: CodecTree,\n): CodecTree {\n\treturn {\n\t\tname: \"Message\",\n\t\tversion,\n\t\tchildren: [changeFormat],\n\t};\n}\n"]}
|
|
@@ -2,30 +2,20 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import type { GraphCommit } from "../core/index.js";
|
|
5
|
+
import type { GraphCommit, RevisionTag } from "../core/index.js";
|
|
6
6
|
/**
|
|
7
7
|
* Encapsulates a state machine that can be used by a {@link SharedTreeCore} manage resubmit phases,
|
|
8
8
|
* especially dealing with the proper updating of enrichments on resubmitted commits.
|
|
9
9
|
*/
|
|
10
10
|
export interface ResubmitMachine<TChange> {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @param
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
12
|
+
* @param revision - the revision of the commit that should be enriched
|
|
13
|
+
* @param getLocalCommitsSince - the local commits on this branch from oldest to newest, starting with the `revision`.
|
|
14
|
+
* @returns a version of the commit with updated enrichment, or undefined if this revision does not need to be resubmitted.
|
|
15
|
+
* A revision does not need to be resubmitted if it has already been sequenced, which can happen if it was also submitted by another client.
|
|
16
|
+
* Two clients can submit the same revision by both merging from the same shared branch.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @returns the next commit that should be resubmitted.
|
|
21
|
-
*
|
|
22
|
-
* Throws when invoked outside of a resubmit phase.
|
|
23
|
-
*/
|
|
24
|
-
peekNextCommit(): GraphCommit<TChange>;
|
|
25
|
-
/**
|
|
26
|
-
* Is true iff the commit enricher is currently in a resubmit phase.
|
|
27
|
-
*/
|
|
28
|
-
readonly isInResubmitPhase: boolean;
|
|
18
|
+
getEnrichedCommit(revision: RevisionTag, getLocalCommitsSince: () => readonly GraphCommit<TChange>[]): GraphCommit<TChange> | undefined;
|
|
29
19
|
/**
|
|
30
20
|
* Must be when a commit is submitted or resubmitted.
|
|
31
21
|
* @param commit - the (enriched) commit (re)submitted. Not mutated.
|
|
@@ -41,8 +31,9 @@ export interface ResubmitMachine<TChange> {
|
|
|
41
31
|
* Must be called after a sequenced commit is applied.
|
|
42
32
|
* Note that this may be called multiples times in a row after a number of sequenced commits have been applied
|
|
43
33
|
* (as opposed to always being called before the next sequenced commit is applied).
|
|
34
|
+
* @param revision - the revision of the sequenced commit.
|
|
44
35
|
* @param isLocal - whether the sequenced commit was generated by the local session.
|
|
45
36
|
*/
|
|
46
|
-
onSequencedCommitApplied(isLocal: boolean): void;
|
|
37
|
+
onSequencedCommitApplied(revision: RevisionTag, isLocal: boolean): void;
|
|
47
38
|
}
|
|
48
39
|
//# sourceMappingURL=resubmitMachine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resubmitMachine.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/resubmitMachine.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"resubmitMachine.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/resubmitMachine.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO;IACvC;;;;;;OAMG;IACH,iBAAiB,CAChB,QAAQ,EAAE,WAAW,EACrB,oBAAoB,EAAE,MAAM,SAAS,WAAW,CAAC,OAAO,CAAC,EAAE,GACzD,WAAW,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IAEpC;;;OAGG;IACH,iBAAiB,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAEtD;;;;OAIG;IACH,gBAAgB,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAErD;;;;;;OAMG;IACH,wBAAwB,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resubmitMachine.js","sourceRoot":"","sources":["../../src/shared-tree-core/resubmitMachine.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { GraphCommit } from \"../core/index.js\";\n\n/**\n * Encapsulates a state machine that can be used by a {@link SharedTreeCore} manage resubmit phases,\n * especially dealing with the proper updating of enrichments on resubmitted commits.\n */\nexport interface ResubmitMachine<TChange> {\n\t/**\n\t *
|
|
1
|
+
{"version":3,"file":"resubmitMachine.js","sourceRoot":"","sources":["../../src/shared-tree-core/resubmitMachine.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { GraphCommit, RevisionTag } from \"../core/index.js\";\n\n/**\n * Encapsulates a state machine that can be used by a {@link SharedTreeCore} manage resubmit phases,\n * especially dealing with the proper updating of enrichments on resubmitted commits.\n */\nexport interface ResubmitMachine<TChange> {\n\t/**\n\t * @param revision - the revision of the commit that should be enriched\n\t * @param getLocalCommitsSince - the local commits on this branch from oldest to newest, starting with the `revision`.\n\t * @returns a version of the commit with updated enrichment, or undefined if this revision does not need to be resubmitted.\n\t * A revision does not need to be resubmitted if it has already been sequenced, which can happen if it was also submitted by another client.\n\t * Two clients can submit the same revision by both merging from the same shared branch.\n\t */\n\tgetEnrichedCommit(\n\t\trevision: RevisionTag,\n\t\tgetLocalCommitsSince: () => readonly GraphCommit<TChange>[],\n\t): GraphCommit<TChange> | undefined;\n\n\t/**\n\t * Must be when a commit is submitted or resubmitted.\n\t * @param commit - the (enriched) commit (re)submitted. Not mutated.\n\t */\n\tonCommitSubmitted(commit: GraphCommit<TChange>): void;\n\n\t/**\n\t * Must be called on a commit after rollback, so it can be removed\n\t * as it will never be (re)submitted.\n\t * @param commit - The commit that was rolled back\n\t */\n\tonCommitRollback(commit: GraphCommit<TChange>): void;\n\n\t/**\n\t * Must be called after a sequenced commit is applied.\n\t * Note that this may be called multiples times in a row after a number of sequenced commits have been applied\n\t * (as opposed to always being called before the next sequenced commit is applied).\n\t * @param revision - the revision of the sequenced commit.\n\t * @param isLocal - whether the sequenced commit was generated by the local session.\n\t */\n\tonSequencedCommitApplied(revision: RevisionTag, isLocal: boolean): void;\n}\n"]}
|
|
@@ -7,16 +7,18 @@ import type { IChannelStorageService } from "@fluidframework/datastore-definitio
|
|
|
7
7
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
8
8
|
import type { IExperimentalIncrementalSummaryContext, IRuntimeMessageCollection, ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions/internal";
|
|
9
9
|
import type { IChannelView, IFluidSerializer } from "@fluidframework/shared-object-base/internal";
|
|
10
|
-
import type { ICodecOptions } from "../codec/index.js";
|
|
10
|
+
import type { DependentFormatVersion, ICodecOptions } from "../codec/index.js";
|
|
11
11
|
import { type ChangeFamily, type ChangeFamilyEditor, type GraphCommit, type RevisionTag, type SchemaAndPolicy, type SchemaPolicy, type TreeStoredSchemaRepository } from "../core/index.js";
|
|
12
12
|
import { type JsonCompatibleReadOnly, type Breakable, type WithBreakable } from "../util/index.js";
|
|
13
13
|
import type { BranchId, SharedTreeBranch } from "./branch.js";
|
|
14
14
|
import { BranchCommitEnricher } from "./branchCommitEnricher.js";
|
|
15
15
|
import { type ChangeEnricherReadonlyCheckout } from "./changeEnricher.js";
|
|
16
|
+
import { type EditManagerFormatVersion } from "./editManagerCodecs.js";
|
|
17
|
+
import { type MessageFormatVersion } from "./messageCodecs.js";
|
|
16
18
|
import type { ResubmitMachine } from "./resubmitMachine.js";
|
|
17
19
|
export interface ExplicitCoreCodecVersions {
|
|
18
|
-
editManager:
|
|
19
|
-
message:
|
|
20
|
+
editManager: EditManagerFormatVersion;
|
|
21
|
+
message: MessageFormatVersion;
|
|
20
22
|
}
|
|
21
23
|
export interface ClonableSchemaAndPolicy extends SchemaAndPolicy {
|
|
22
24
|
schema: TreeStoredSchemaRepository;
|
|
@@ -61,7 +63,7 @@ export declare class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
61
63
|
* @param editor - Used to edit the state of the tree. Edits will be immediately applied locally to the tree.
|
|
62
64
|
* If there is no transaction currently ongoing, then the edits will be submitted to Fluid immediately as well.
|
|
63
65
|
*/
|
|
64
|
-
constructor(breaker: Breakable, sharedObject: IChannelView & IFluidLoadable, serializer: IFluidSerializer, submitLocalMessage: (content: unknown, localOpMetadata?: unknown) => void, logger: ITelemetryBaseLogger | undefined, summarizables: readonly Summarizable[], changeFamily: ChangeFamily<TEditor, TChange>, options: ICodecOptions, formatOptions: ExplicitCoreCodecVersions, idCompressor: IIdCompressor, schema: TreeStoredSchemaRepository, schemaPolicy: SchemaPolicy, resubmitMachine?: ResubmitMachine<TChange>, enricher?: ChangeEnricherReadonlyCheckout<TChange>, getEditor?: () => TEditor);
|
|
66
|
+
constructor(breaker: Breakable, sharedObject: IChannelView & IFluidLoadable, serializer: IFluidSerializer, submitLocalMessage: (content: unknown, localOpMetadata?: unknown) => void, logger: ITelemetryBaseLogger | undefined, summarizables: readonly Summarizable[], changeFamily: ChangeFamily<TEditor, TChange>, options: ICodecOptions, formatOptions: ExplicitCoreCodecVersions, changeFormatVersionForEditManager: DependentFormatVersion<EditManagerFormatVersion>, changeFormatVersionForMessage: DependentFormatVersion<MessageFormatVersion>, idCompressor: IIdCompressor, schema: TreeStoredSchemaRepository, schemaPolicy: SchemaPolicy, resubmitMachine?: ResubmitMachine<TChange>, enricher?: ChangeEnricherReadonlyCheckout<TChange>, getEditor?: () => TEditor);
|
|
65
67
|
summarizeCore(serializer: IFluidSerializer, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext, fullTree?: boolean): ISummaryTreeWithStats;
|
|
66
68
|
loadCore(services: IChannelStorageService): Promise<void>;
|
|
67
69
|
private registerSharedBranch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeCore.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/sharedTreeCore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAE5F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAE7F,OAAO,KAAK,EACX,aAAa,EAGb,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACX,sCAAsC,EACtC,yBAAyB,EACzB,qBAAqB,EACrB,iBAA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