@fluidframework/tree 2.71.0 → 2.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -40
- package/api-report/tree.alpha.api.md +27 -18
- package/api-report/tree.beta.api.md +42 -0
- package/api-report/tree.legacy.beta.api.md +42 -0
- package/dist/alpha.d.ts +9 -7
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/beta.d.ts +7 -0
- package/dist/codec/codec.d.ts +16 -1
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +16 -3
- package/dist/codec/codec.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -2
- 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 +2 -2
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +6 -6
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +6 -7
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +2 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.d.ts +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -2
- package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.js +3 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts +2 -3
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.js +29 -8
- package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +10 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.js +8 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.d.ts +2 -2
- package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.js +3 -3
- package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.js +3 -3
- package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/dist/core/tree/index.d.ts +2 -1
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js.map +1 -1
- package/dist/external-utilities/typeboxValidator.js +1 -1
- package/dist/external-utilities/typeboxValidator.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -10
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +12 -8
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +8 -3
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +9 -4
- 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 +1 -2
- package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.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 +1 -2
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -9
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +3 -21
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts +4 -5
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +15 -4
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/format.d.ts +8 -1
- package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/format.js +8 -3
- package/dist/feature-libraries/forest-summary/format.js.map +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts +2 -1
- 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 +3 -3
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +2 -2
- package/dist/feature-libraries/index.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.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -7
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +5 -4
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts +10 -10
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +22 -18
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.d.ts +2 -2
- package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.js +1 -1
- package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.d.ts +1 -2
- package/dist/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +7 -0
- package/dist/packageVersion.d.ts +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 +22 -15
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +12 -16
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +87 -127
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +7 -6
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +12 -11
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +4 -2
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +1 -3
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +19 -6
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +35 -17
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +37 -0
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +43 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js +4 -4
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV5.d.ts +2 -2
- package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV5.js +1 -1
- package/dist/shared-tree-core/editManagerFormatV5.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +5 -3
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +11 -3
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV5.d.ts +2 -1
- package/dist/shared-tree-core/messageCodecV5.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV5.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +19 -6
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +38 -21
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +50 -0
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -0
- package/dist/shared-tree-core/messageFormat.js +51 -0
- package/dist/shared-tree-core/messageFormat.js.map +1 -0
- package/dist/shared-tree-core/sharedTreeCore.d.ts +8 -8
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +3 -3
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts +2 -2
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +3 -2
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +4 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +2 -98
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +1 -52
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts +98 -2
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.js +61 -7
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js +6 -3
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts +28 -0
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -0
- package/dist/simple-tree/api/simpleSchemaCodec.js +292 -0
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -0
- package/dist/simple-tree/api/storedSchema.d.ts +2 -2
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +8 -6
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +2 -2
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +6 -6
- package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +18 -3
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +78 -35
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +3 -3
- package/dist/simple-tree/core/allowedTypes.js +1 -1
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/treeNode.js +1 -1
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/index.d.ts +2 -1
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +4 -0
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +2 -2
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +2 -2
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +11 -3
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts +249 -0
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -0
- package/dist/simple-tree/simpleSchemaFormatV1.js +115 -0
- package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -0
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +1 -1
- package/dist/tableSchema.js.map +1 -1
- package/dist/treeFactory.d.ts +3 -1
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +26 -2
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/brand.d.ts +31 -2
- package/dist/util/brand.d.ts.map +1 -1
- package/dist/util/brand.js +28 -2
- package/dist/util/brand.js.map +1 -1
- package/dist/util/brandedMap.d.ts +3 -1
- package/dist/util/brandedMap.d.ts.map +1 -1
- package/dist/util/brandedMap.js.map +1 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +3 -2
- package/dist/util/index.js.map +1 -1
- package/lib/alpha.d.ts +9 -7
- package/lib/api.js +2 -2
- package/lib/api.js.map +1 -1
- package/lib/beta.d.ts +7 -0
- package/lib/codec/codec.d.ts +16 -1
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +16 -3
- package/lib/codec/codec.js.map +1 -1
- package/lib/core/index.d.ts +1 -1
- 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 +1 -1
- package/lib/core/schema-stored/index.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +6 -6
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +6 -7
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +2 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.d.ts +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.js +3 -2
- package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.js +4 -2
- package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts +2 -3
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.js +29 -8
- package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +10 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.js +7 -0
- package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV1.d.ts +2 -2
- package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV1.js +3 -3
- package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.js +3 -3
- package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/lib/core/tree/index.d.ts +2 -1
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +1 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/external-utilities/typeboxValidator.js +1 -1
- package/lib/external-utilities/typeboxValidator.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -10
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +13 -8
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +8 -3
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +8 -3
- 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 +2 -2
- package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.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 +1 -9
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +2 -20
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts +4 -5
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +16 -5
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/format.d.ts +8 -1
- package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/format.js +7 -2
- package/lib/feature-libraries/forest-summary/format.js.map +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts +2 -1
- 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 +3 -3
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +2 -2
- package/lib/feature-libraries/index.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.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -7
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +6 -5
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts +10 -10
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +24 -20
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.d.ts +2 -2
- package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.js +2 -2
- package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.d.ts +1 -2
- package/lib/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.js +2 -2
- package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +7 -0
- package/lib/packageVersion.d.ts +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 +11 -4
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +12 -16
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +90 -130
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +7 -6
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +7 -6
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +5 -3
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +1 -3
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +19 -6
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +32 -16
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +37 -0
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +42 -0
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js +5 -5
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV5.d.ts +2 -2
- package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV5.js +2 -2
- package/lib/shared-tree-core/editManagerFormatV5.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +5 -3
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +4 -2
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV5.d.ts +2 -1
- package/lib/shared-tree-core/messageCodecV5.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV5.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +19 -6
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +35 -20
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +50 -0
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -0
- package/lib/shared-tree-core/messageFormat.js +48 -0
- package/lib/shared-tree-core/messageFormat.js.map +1 -0
- package/lib/shared-tree-core/sharedTreeCore.d.ts +8 -8
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +3 -3
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts +2 -2
- package/lib/simple-tree/api/discrepancies.js.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +3 -2
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +1 -0
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +2 -98
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -52
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts +98 -2
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js +58 -4
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js +6 -3
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts +28 -0
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -0
- package/lib/simple-tree/api/simpleSchemaCodec.js +264 -0
- package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -0
- package/lib/simple-tree/api/storedSchema.d.ts +2 -2
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +5 -3
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +2 -2
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +6 -6
- package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +18 -3
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +75 -34
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +3 -3
- package/lib/simple-tree/core/allowedTypes.js +1 -1
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/treeNode.js +1 -1
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/index.d.ts +2 -1
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +1 -0
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +2 -2
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +2 -2
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +3 -3
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +3 -3
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +11 -3
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts +249 -0
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -0
- package/lib/simple-tree/simpleSchemaFormatV1.js +112 -0
- package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -0
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +1 -1
- package/lib/tableSchema.js.map +1 -1
- package/lib/treeFactory.d.ts +3 -1
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +23 -1
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/brand.d.ts +31 -2
- package/lib/util/brand.d.ts.map +1 -1
- package/lib/util/brand.js +26 -1
- package/lib/util/brand.js.map +1 -1
- package/lib/util/brandedMap.d.ts +3 -1
- package/lib/util/brandedMap.d.ts.map +1 -1
- package/lib/util/brandedMap.js.map +1 -1
- package/lib/util/index.d.ts +1 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +1 -1
- package/lib/util/index.js.map +1 -1
- package/package.json +24 -24
- package/src/api.ts +2 -2
- package/src/codec/codec.ts +17 -3
- package/src/core/index.ts +1 -2
- package/src/core/schema-stored/index.ts +1 -2
- package/src/core/schema-stored/schema.ts +10 -7
- package/src/core/tree/detachedFieldIndexCodecCommon.ts +2 -1
- package/src/core/tree/detachedFieldIndexCodecV1.ts +4 -2
- package/src/core/tree/detachedFieldIndexCodecV2.ts +4 -6
- package/src/core/tree/detachedFieldIndexCodecs.ts +33 -11
- package/src/core/tree/detachedFieldIndexFormatCommon.ts +17 -2
- package/src/core/tree/detachedFieldIndexFormatV1.ts +6 -4
- package/src/core/tree/detachedFieldIndexFormatV2.ts +6 -4
- package/src/core/tree/index.ts +2 -4
- package/src/external-utilities/typeboxValidator.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +18 -13
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +2 -2
- package/src/feature-libraries/chunked-forest/codec/format.ts +15 -4
- package/src/feature-libraries/chunked-forest/codec/index.ts +4 -2
- package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +2 -2
- package/src/feature-libraries/chunked-forest/index.ts +0 -1
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +2 -29
- package/src/feature-libraries/forest-summary/codec.ts +24 -9
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
- package/src/feature-libraries/forest-summary/format.ts +12 -2
- package/src/feature-libraries/forest-summary/index.ts +2 -1
- package/src/feature-libraries/index.ts +1 -2
- package/src/feature-libraries/schema-edits/index.ts +0 -1
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +16 -16
- package/src/feature-libraries/schema-index/codec.ts +34 -22
- package/src/feature-libraries/schema-index/formatV1.ts +2 -2
- package/src/feature-libraries/schema-index/formatV2.ts +2 -2
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +2 -1
- package/src/index.ts +3 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +16 -5
- package/src/shared-tree/sharedTree.ts +112 -172
- package/src/shared-tree/sharedTreeChangeCodecs.ts +15 -9
- package/src/shared-tree/sharedTreeChangeFamily.ts +2 -2
- package/src/shared-tree/treeAlpha.ts +6 -5
- package/src/shared-tree/treeCheckout.ts +1 -3
- package/src/shared-tree-core/editManagerCodecs.ts +56 -19
- package/src/shared-tree-core/editManagerFormatCommons.ts +47 -0
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +10 -5
- package/src/shared-tree-core/editManagerFormatV5.ts +3 -3
- package/src/shared-tree-core/index.ts +11 -5
- package/src/shared-tree-core/messageCodecV1ToV4.ts +6 -1
- package/src/shared-tree-core/messageCodecV5.ts +2 -1
- package/src/shared-tree-core/messageCodecs.ts +60 -26
- package/src/shared-tree-core/messageFormat.ts +56 -0
- package/src/shared-tree-core/sharedTreeCore.ts +11 -13
- package/src/simple-tree/api/discrepancies.ts +2 -2
- package/src/simple-tree/api/incrementalAllowedTypes.ts +1 -1
- package/src/simple-tree/api/index.ts +6 -2
- package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -168
- package/src/simple-tree/api/schemaFactoryBeta.ts +180 -14
- package/src/simple-tree/api/schemaFromSimple.ts +6 -3
- package/src/simple-tree/api/simpleSchemaCodec.ts +360 -0
- package/src/simple-tree/api/storedSchema.ts +8 -5
- package/src/simple-tree/api/tree.ts +2 -2
- package/src/simple-tree/api/typesUnsafe.ts +6 -6
- package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +80 -47
- package/src/simple-tree/core/allowedTypes.ts +3 -3
- package/src/simple-tree/core/treeNode.ts +2 -2
- package/src/simple-tree/index.ts +5 -1
- package/src/simple-tree/node-kinds/array/arrayNode.ts +2 -2
- package/src/simple-tree/node-kinds/map/mapNode.ts +2 -2
- package/src/simple-tree/node-kinds/object/objectNode.ts +3 -3
- package/src/simple-tree/node-kinds/record/recordNode.ts +3 -3
- package/src/simple-tree/simpleSchema.ts +12 -3
- package/src/simple-tree/simpleSchemaFormatV1.ts +179 -0
- package/src/tableSchema.ts +5 -2
- package/src/treeFactory.ts +33 -1
- package/src/util/brand.ts +40 -2
- package/src/util/brandedMap.ts +3 -1
- package/src/util/index.ts +1 -0
|
@@ -5,9 +5,14 @@
|
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
6
|
import { Versioned } from "../../codec/index.js";
|
|
7
7
|
import { schemaFormatV1 } from "../../core/index.js";
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The format version for the forest.
|
|
10
|
+
*/
|
|
11
|
+
export const ForestFormatVersion = {
|
|
12
|
+
v1: 1,
|
|
13
|
+
};
|
|
9
14
|
export const Format = Type.Object({
|
|
10
|
-
version: Type.Literal(
|
|
15
|
+
version: Type.Literal(ForestFormatVersion.v1),
|
|
11
16
|
keys: Type.Array(schemaFormatV1.FieldKeySchema),
|
|
12
17
|
fields: Versioned,
|
|
13
18
|
}, { additionalProperties: false });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC,EAAE,EAAE,CAAC;CACI,CAAC;AAMX,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAChC;IACC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;IAC7C,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/C,MAAM,EAAE,SAAS;CACjB,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAC/B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type Static, Type } from \"@sinclair/typebox\";\n\nimport { Versioned } from \"../../codec/index.js\";\nimport { schemaFormatV1 } from \"../../core/index.js\";\nimport type { Brand } from \"../../util/index.js\";\n\n/**\n * The format version for the forest.\n */\nexport const ForestFormatVersion = {\n\tv1: 1,\n} as const;\nexport type ForestFormatVersion = Brand<\n\t(typeof ForestFormatVersion)[keyof typeof ForestFormatVersion],\n\t\"ForestFormatVersion\"\n>;\n\nexport const Format = Type.Object(\n\t{\n\t\tversion: Type.Literal(ForestFormatVersion.v1),\n\t\tkeys: Type.Array(schemaFormatV1.FieldKeySchema),\n\t\tfields: Versioned,\n\t},\n\t{ additionalProperties: false },\n);\n\nexport type Format = Static<typeof Format>;\n"]}
|
|
@@ -3,5 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
export { forestSummaryKey, ForestSummarizer } from "./forestSummarizer.js";
|
|
6
|
-
export { getCodecTreeForForestFormat
|
|
6
|
+
export { getCodecTreeForForestFormat } from "./codec.js";
|
|
7
|
+
export { ForestFormatVersion } from "./format.js";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,2BAA2B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { forestSummaryKey, ForestSummarizer } from \"./forestSummarizer.js\";\nexport { getCodecTreeForForestFormat } from \"./codec.js\";\nexport { ForestFormatVersion } from \"./format.js\";\n"]}
|
|
@@ -7,21 +7,21 @@ export { allowsValue, assertAllowedValue, isTreeValue } from "./valueUtilities.j
|
|
|
7
7
|
export { ForestSummarizer, getCodecTreeForForestFormat, type ForestFormatVersion, } from "./forest-summary/index.js";
|
|
8
8
|
export { cursorForMapTreeField, cursorForMapTreeNode, mapTreeFromCursor, mapTreeFieldFromCursor, type MinimalMapTreeNodeView, mapTreeFieldsWithField, mapTreeWithField, type MapTreeFieldViewGeneric, type MapTreeNodeViewGeneric, type MinimalFieldMap, } from "./mapTreeCursor.js";
|
|
9
9
|
export { buildForest } from "./object-forest/index.js";
|
|
10
|
-
export { SchemaSummarizer, encodeTreeSchema, makeSchemaCodec, makeSchemaCodecs, getCodecTreeForSchemaFormat, } from "./schema-index/index.js";
|
|
10
|
+
export { SchemaSummarizer, encodeTreeSchema, makeSchemaCodec, makeSchemaCodecs, getCodecTreeForSchemaFormat, clientVersionToSchemaVersion, } from "./schema-index/index.js";
|
|
11
11
|
export { stackTreeNodeCursor, type CursorAdapter, prefixPath, prefixFieldPath, type CursorWithNode, stackTreeFieldCursor, } from "./treeCursorUtils.js";
|
|
12
12
|
export { cursorForJsonableTreeNode, cursorForJsonableTreeField, jsonableTreeFromCursor, jsonableTreeFromFieldCursor, jsonableTreeFromForest, } from "./treeTextCursor.js";
|
|
13
13
|
import * as SequenceField from "./sequence-field/index.js";
|
|
14
14
|
export { SequenceField };
|
|
15
15
|
export { isNeverField, ModularEditBuilder, type FieldEditDescription as EditDescription, type FieldChangeHandler, type FieldChangeRebaser, type FieldEditor, type FieldChangeMap, type FieldChange, type FieldChangeset, type ToDelta, type ModularChangeset, makeModularChangeCodecFamily, type NodeChangeComposer, type NodeChangeInverter, type NodeChangeRebaser, type NodeChangePruner, type CrossFieldManager, CrossFieldTarget, FlexFieldKind, type FullSchemaPolicy, allowsRepoSuperset, type GenericChangeset, genericFieldKind, type HasFieldChanges, type NodeExistsConstraint, FieldKindWithEditor, ModularChangeFamily, type RelevantRemovedRootsFromChild, EncodedModularChangeset, updateRefreshers, type NodeId, type FieldChangeEncodingContext, type FieldKindConfiguration, type FieldKindConfigurationEntry, isNeverTree, } from "./modular-schema/index.js";
|
|
16
16
|
export { mapRootChanges } from "./deltaUtils.js";
|
|
17
|
-
export { type TreeChunk, chunkTree, chunkField, chunkFieldSingle, buildChunkedForest, defaultChunkPolicy, type FieldBatch, type FieldBatchCodec, type FieldBatchFormatVersion, getCodecTreeForFieldBatchFormat, makeTreeChunker, makeFieldBatchCodec,
|
|
17
|
+
export { type TreeChunk, chunkTree, chunkField, chunkFieldSingle, buildChunkedForest, defaultChunkPolicy, type FieldBatch, type FieldBatchCodec, type FieldBatchFormatVersion, getCodecTreeForFieldBatchFormat, makeTreeChunker, makeFieldBatchCodec, type FieldBatchEncodingContext, emptyChunk, combineChunks, type IncrementalEncodingPolicy, defaultIncrementalEncodingPolicy, } from "./chunked-forest/index.js";
|
|
18
18
|
export { compareLocalNodeIdentifiers, createNodeIdentifierManager, isStableNodeIdentifier, type LocalNodeIdentifier, MockNodeIdentifierManager, type NodeIdentifierManager, nodeKeyTreeIdentifier, type StableNodeIdentifier, } from "./node-identifier/index.js";
|
|
19
19
|
export { FieldKinds, type Required, type Optional, type Sequence, type Identifier, type Forbidden, type DefaultChangeset, DefaultChangeFamily, DefaultEditBuilder, type IDefaultEditBuilder, type ValueFieldEditBuilder, type OptionalFieldEditBuilder, type SequenceFieldEditBuilder, defaultSchemaPolicy, fieldKinds, fieldKindConfigurations, intoDelta, relevantRemovedRoots, SchemaValidationError, isNodeInSchema, isFieldInSchema, throwOutOfSchema, getCodecTreeForModularChangeFormat, type ModularChangeFormatVersion, } from "./default-schema/index.js";
|
|
20
20
|
export { type FlexTreeOptionalField, type FlexTreeRequiredField, type FlexTreeSequenceField, type FlexTreeContext, type FlexTreeHydratedContext, type FlexTreeTypedField, type FlexTreeEntity, type FlexTreeField, type FlexTreeNode, TreeStatus, Context, type FlexTreeNodeEvents, type FlexTreeUnknownUnboxed, isFlexTreeNode, ContextSlot, flexTreeMarker, assertFlexTreeEntityNotFreed, flexTreeSlot, getSchemaAndPolicy, LazyEntity, treeStatusFromAnchorCache, indexForAt, FlexTreeEntityKind, type FlexibleNodeContent, type FlexibleFieldContent, type FlexTreeHydratedContextMinimal, type HydratedFlexTreeNode, getOrCreateHydratedFlexTreeNode, currentObserver, withObservation, type Observer, } from "./flex-tree/index.js";
|
|
21
21
|
export { TreeCompressionStrategy, TreeCompressionStrategyExtended, type TreeCompressionStrategyPrivate, } from "./treeCompressionUtils.js";
|
|
22
22
|
export { valueSchemaAllows } from "./valueUtilities.js";
|
|
23
23
|
export { DetachedFieldIndexSummarizer } from "./detachedFieldIndexSummarizer.js";
|
|
24
|
-
export { type SchemaChange, makeSchemaChangeCodecs, EncodedSchemaChange, getCodecTreeForSchemaChangeFormat,
|
|
24
|
+
export { type SchemaChange, makeSchemaChangeCodecs, EncodedSchemaChange, getCodecTreeForSchemaChangeFormat, } from "./schema-edits/index.js";
|
|
25
25
|
export { makeMitigatedChangeFamily } from "./mitigatedChangeFamily.js";
|
|
26
26
|
export { type KeyFinder, AnchorTreeIndex, hasElement, type TreeIndex, type TreeIndexKey, type TreeIndexNodes, } from "./indexing/index.js";
|
|
27
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,QAAQ,EACb,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,KAAK,mBAAmB,GACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,QAAQ,EACb,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,KAAK,mBAAmB,GACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,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,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,UAAU,EACV,OAAO,EACP,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,cAAc,EACd,WAAW,EAEX,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,EACzB,+BAA+B,EAC/B,eAAe,EACf,eAAe,EACf,KAAK,QAAQ,GACb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,uBAAuB,EACvB,+BAA+B,EAC/B,KAAK,8BAA8B,GACnC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EACN,KAAK,YAAY,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EACN,KAAK,SAAS,EACd,eAAe,EACf,UAAU,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC"}
|
|
@@ -7,7 +7,7 @@ export { allowsValue, assertAllowedValue, isTreeValue } from "./valueUtilities.j
|
|
|
7
7
|
export { ForestSummarizer, getCodecTreeForForestFormat, } from "./forest-summary/index.js";
|
|
8
8
|
export { cursorForMapTreeField, cursorForMapTreeNode, mapTreeFromCursor, mapTreeFieldFromCursor, mapTreeFieldsWithField, mapTreeWithField, } from "./mapTreeCursor.js";
|
|
9
9
|
export { buildForest } from "./object-forest/index.js";
|
|
10
|
-
export { SchemaSummarizer, encodeTreeSchema, makeSchemaCodec, makeSchemaCodecs, getCodecTreeForSchemaFormat, } from "./schema-index/index.js";
|
|
10
|
+
export { SchemaSummarizer, encodeTreeSchema, makeSchemaCodec, makeSchemaCodecs, getCodecTreeForSchemaFormat, clientVersionToSchemaVersion, } from "./schema-index/index.js";
|
|
11
11
|
export { stackTreeNodeCursor, prefixPath, prefixFieldPath, stackTreeFieldCursor, } from "./treeCursorUtils.js";
|
|
12
12
|
export { cursorForJsonableTreeNode, cursorForJsonableTreeField, jsonableTreeFromCursor, jsonableTreeFromFieldCursor, jsonableTreeFromForest, } from "./treeTextCursor.js";
|
|
13
13
|
// Split this up into separate import and export for compatibility with API-Extractor.
|
|
@@ -15,7 +15,7 @@ import * as SequenceField from "./sequence-field/index.js";
|
|
|
15
15
|
export { SequenceField };
|
|
16
16
|
export { isNeverField, ModularEditBuilder, makeModularChangeCodecFamily, CrossFieldTarget, FlexFieldKind, allowsRepoSuperset, genericFieldKind, FieldKindWithEditor, ModularChangeFamily, EncodedModularChangeset, updateRefreshers, isNeverTree, } from "./modular-schema/index.js";
|
|
17
17
|
export { mapRootChanges } from "./deltaUtils.js";
|
|
18
|
-
export { chunkTree, chunkField, chunkFieldSingle, buildChunkedForest, defaultChunkPolicy, getCodecTreeForFieldBatchFormat, makeTreeChunker, makeFieldBatchCodec,
|
|
18
|
+
export { chunkTree, chunkField, chunkFieldSingle, buildChunkedForest, defaultChunkPolicy, getCodecTreeForFieldBatchFormat, makeTreeChunker, makeFieldBatchCodec, emptyChunk, combineChunks, defaultIncrementalEncodingPolicy, } from "./chunked-forest/index.js";
|
|
19
19
|
export { compareLocalNodeIdentifiers, createNodeIdentifierManager, isStableNodeIdentifier, MockNodeIdentifierManager, nodeKeyTreeIdentifier, } from "./node-identifier/index.js";
|
|
20
20
|
export { FieldKinds, DefaultChangeFamily, DefaultEditBuilder, defaultSchemaPolicy, fieldKinds, fieldKindConfigurations, intoDelta, relevantRemovedRoots, SchemaValidationError, isNodeInSchema, isFieldInSchema, throwOutOfSchema, getCodecTreeForModularChangeFormat, } from "./default-schema/index.js";
|
|
21
21
|
export { TreeStatus, Context, isFlexTreeNode, ContextSlot,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,GAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EAEtB,sBAAsB,EACtB,gBAAgB,GAIhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,GAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EAEtB,sBAAsB,EACtB,gBAAgB,GAIhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,4BAA4B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,mBAA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BAA+B,EAC/B,eAAe,EACf,eAAe,GAEf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,uBAAuB,EACvB,+BAA+B,GAE/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EAEN,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAEN,eAAe,EACf,UAAU,GAIV,MAAM,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport {\n\tForestSummarizer,\n\tgetCodecTreeForForestFormat,\n\ttype ForestFormatVersion,\n} from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n\ttype MinimalMapTreeNodeView,\n\tmapTreeFieldsWithField,\n\tmapTreeWithField,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype MinimalFieldMap,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport {\n\tSchemaSummarizer,\n\tencodeTreeSchema,\n\tmakeSchemaCodec,\n\tmakeSchemaCodecs,\n\tgetCodecTreeForSchemaFormat,\n\tclientVersionToSchemaVersion,\n} from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\n// Split this up into separate import and export for compatibility with API-Extractor.\nimport * as SequenceField from \"./sequence-field/index.js\";\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tFieldKindWithEditor,\n\tModularChangeFamily,\n\ttype RelevantRemovedRootsFromChild,\n\tEncodedModularChangeset,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tisNeverTree,\n} from \"./modular-schema/index.js\";\n\nexport { mapRootChanges } from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkField,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\ttype FieldBatchFormatVersion,\n\tgetCodecTreeForFieldBatchFormat,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\temptyChunk,\n\tcombineChunks,\n\ttype IncrementalEncodingPolicy,\n\tdefaultIncrementalEncodingPolicy,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\ttype DefaultChangeset,\n\tDefaultChangeFamily,\n\tDefaultEditBuilder,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tSchemaValidationError,\n\tisNodeInSchema,\n\tisFieldInSchema,\n\tthrowOutOfSchema,\n\tgetCodecTreeForModularChangeFormat,\n\ttype ModularChangeFormatVersion,\n} from \"./default-schema/index.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n\ttype FlexibleNodeContent,\n\ttype FlexibleFieldContent,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype HydratedFlexTreeNode,\n\tgetOrCreateHydratedFlexTreeNode,\n\tcurrentObserver,\n\twithObservation,\n\ttype Observer,\n} from \"./flex-tree/index.js\";\n\nexport {\n\tTreeCompressionStrategy,\n\tTreeCompressionStrategyExtended,\n\ttype TreeCompressionStrategyPrivate,\n} from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n\tgetCodecTreeForSchemaChangeFormat,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { makeSchemaChangeCodecs, getCodecTreeForSchemaChangeFormat,
|
|
5
|
+
export { makeSchemaChangeCodecs, getCodecTreeForSchemaChangeFormat, } from "./schemaChangeCodecs.js";
|
|
6
6
|
export type { SchemaChange } from "./schemaChangeTypes.js";
|
|
7
7
|
export { EncodedSchemaChange } from "./schemaChangeFormat.js";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,sBAAsB,EACtB,iCAAiC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,sBAAsB,EACtB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,sBAAsB,EACtB,iCAAiC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,sBAAsB,EACtB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tmakeSchemaChangeCodecs,\n\tgetCodecTreeForSchemaChangeFormat,\n} from \"./schemaChangeCodecs.js\";\nexport type { SchemaChange } from \"./schemaChangeTypes.js\";\nexport { EncodedSchemaChange } from \"./schemaChangeFormat.js\";\n"]}
|
|
@@ -2,23 +2,22 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import type { MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
|
|
6
|
+
import { type CodecTree, type CodecWriteOptions, type ICodecFamily, type IJsonCodec } from "../../codec/index.js";
|
|
6
7
|
import type { SchemaChange } from "./schemaChangeTypes.js";
|
|
7
|
-
import {
|
|
8
|
-
import type { Brand } from "../../util/index.js";
|
|
8
|
+
import { SchemaFormatVersion } from "../../core/index.js";
|
|
9
9
|
/**
|
|
10
10
|
* Create a family of schema change codecs.
|
|
11
11
|
* @param options - Specifies common codec options, including which `validator` to use.
|
|
12
12
|
* @returns The composed codec family.
|
|
13
13
|
*/
|
|
14
|
-
export declare function makeSchemaChangeCodecs(options:
|
|
15
|
-
export
|
|
16
|
-
export declare function getCodecTreeForSchemaChangeFormat(version: SchemaChangeFormatVersion): CodecTree;
|
|
14
|
+
export declare function makeSchemaChangeCodecs(options: CodecWriteOptions): ICodecFamily<SchemaChange>;
|
|
15
|
+
export declare function getCodecTreeForSchemaChangeFormat(version: SchemaFormatVersion, clientVersion: MinimumVersionForCollab): CodecTree;
|
|
17
16
|
/**
|
|
18
17
|
* Create a schema change codec.
|
|
19
18
|
* @param options - Specifies common codec options, including which `validator` to use.
|
|
20
19
|
* @param writeVersion - The schema change write version.
|
|
21
20
|
* @returns The composed codec.
|
|
22
21
|
*/
|
|
23
|
-
export declare function makeSchemaChangeCodec(options:
|
|
22
|
+
export declare function makeSchemaChangeCodec(options: CodecWriteOptions, writeVersion: SchemaFormatVersion): IJsonCodec<SchemaChange>;
|
|
24
23
|
//# sourceMappingURL=schemaChangeCodecs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaChangeCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"schemaChangeCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAE5F,OAAO,EACN,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,UAAU,EAIf,MAAM,sBAAsB,CAAC;AAI9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D;;;;GAIG;AACH,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,iBAAiB,GACxB,YAAY,CAAC,YAAY,CAAC,CAK5B;AAED,wBAAgB,iCAAiC,CAChD,OAAO,EAAE,mBAAmB,EAC5B,aAAa,EAAE,uBAAuB,GACpC,SAAS,CAMX;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,iBAAiB,EAC1B,YAAY,EAAE,mBAAmB,GAC/B,UAAU,CAAC,YAAY,CAAC,CAG1B"}
|
|
@@ -6,7 +6,8 @@ import { assert } from "@fluidframework/core-utils/internal";
|
|
|
6
6
|
import { makeCodecFamily, makeVersionDispatchingCodec, withSchemaValidation, } from "../../codec/index.js";
|
|
7
7
|
import { getCodecTreeForSchemaFormat, makeSchemaCodec } from "../schema-index/index.js";
|
|
8
8
|
import { EncodedSchemaChange } from "./schemaChangeFormat.js";
|
|
9
|
-
import {
|
|
9
|
+
import { SchemaFormatVersion } from "../../core/index.js";
|
|
10
|
+
import { brand } from "../../util/index.js";
|
|
10
11
|
/**
|
|
11
12
|
* Create a family of schema change codecs.
|
|
12
13
|
* @param options - Specifies common codec options, including which `validator` to use.
|
|
@@ -14,15 +15,15 @@ import { SchemaVersion } from "../../core/index.js";
|
|
|
14
15
|
*/
|
|
15
16
|
export function makeSchemaChangeCodecs(options) {
|
|
16
17
|
return makeCodecFamily([
|
|
17
|
-
[
|
|
18
|
-
[
|
|
18
|
+
[SchemaFormatVersion.v1, makeSchemaChangeCodecV1(options, brand(SchemaFormatVersion.v1))],
|
|
19
|
+
[SchemaFormatVersion.v2, makeSchemaChangeCodecV1(options, brand(SchemaFormatVersion.v2))],
|
|
19
20
|
]);
|
|
20
21
|
}
|
|
21
|
-
export function getCodecTreeForSchemaChangeFormat(version) {
|
|
22
|
+
export function getCodecTreeForSchemaChangeFormat(version, clientVersion) {
|
|
22
23
|
return {
|
|
23
24
|
name: "SchemaChange",
|
|
24
25
|
version,
|
|
25
|
-
children: [getCodecTreeForSchemaFormat(
|
|
26
|
+
children: [getCodecTreeForSchemaFormat(clientVersion)],
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaChangeCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"schemaChangeCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAG7D,OAAO,EAKN,eAAe,EACf,2BAA2B,EAC3B,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAExF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACrC,OAA0B;IAE1B,OAAO,eAAe,CAAC;QACtB,CAAC,mBAAmB,CAAC,EAAE,EAAE,uBAAuB,CAAC,OAAO,EAAE,KAAK,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC;QACzF,CAAC,mBAAmB,CAAC,EAAE,EAAE,uBAAuB,CAAC,OAAO,EAAE,KAAK,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC;KACzF,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iCAAiC,CAChD,OAA4B,EAC5B,aAAsC;IAEtC,OAAO;QACN,IAAI,EAAE,cAAc;QACpB,OAAO;QACP,QAAQ,EAAE,CAAC,2BAA2B,CAAC,aAAa,CAAC,CAAC;KACtD,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACpC,OAA0B,EAC1B,YAAiC;IAEjC,MAAM,MAAM,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC/C,OAAO,2BAA2B,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED;;;;;GAKG;AACH,SAAS,uBAAuB,CAC/B,OAA0B,EAC1B,kBAAuC;IAEvC,MAAM,WAAW,GAAG,eAAe,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;IACjE,MAAM,iBAAiB,GAAkD;QACxE,MAAM,EAAE,CAAC,YAAY,EAAE,EAAE;YACxB,MAAM,CACL,CAAC,YAAY,CAAC,SAAS,EACvB,KAAK,CAAC,wDAAwD,CAC9D,CAAC;YACF,OAAO;gBACN,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;gBAChD,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;aAChD,CAAC;QACH,CAAC;QACD,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;YACnB,OAAO;gBACN,MAAM,EAAE;oBACP,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;oBACpC,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;iBACpC;gBACD,SAAS,EAAE,KAAK;aAChB,CAAC;QACH,CAAC;QACD,aAAa,EAAE,mBAAmB;KAClC,CAAC;IAEF,OAAO,oBAAoB,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;AAC5F,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 { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\n\nimport {\n\ttype CodecTree,\n\ttype CodecWriteOptions,\n\ttype ICodecFamily,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n\twithSchemaValidation,\n} from \"../../codec/index.js\";\nimport { getCodecTreeForSchemaFormat, makeSchemaCodec } from \"../schema-index/index.js\";\n\nimport { EncodedSchemaChange } from \"./schemaChangeFormat.js\";\nimport type { SchemaChange } from \"./schemaChangeTypes.js\";\nimport { SchemaFormatVersion } from \"../../core/index.js\";\nimport { brand } from \"../../util/index.js\";\n\n/**\n * Create a family of schema change codecs.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The composed codec family.\n */\nexport function makeSchemaChangeCodecs(\n\toptions: CodecWriteOptions,\n): ICodecFamily<SchemaChange> {\n\treturn makeCodecFamily([\n\t\t[SchemaFormatVersion.v1, makeSchemaChangeCodecV1(options, brand(SchemaFormatVersion.v1))],\n\t\t[SchemaFormatVersion.v2, makeSchemaChangeCodecV1(options, brand(SchemaFormatVersion.v2))],\n\t]);\n}\n\nexport function getCodecTreeForSchemaChangeFormat(\n\tversion: SchemaFormatVersion,\n\tclientVersion: MinimumVersionForCollab,\n): CodecTree {\n\treturn {\n\t\tname: \"SchemaChange\",\n\t\tversion,\n\t\tchildren: [getCodecTreeForSchemaFormat(clientVersion)],\n\t};\n}\n\n/**\n * Create a schema change codec.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @param writeVersion - The schema change write version.\n * @returns The composed codec.\n */\nexport function makeSchemaChangeCodec(\n\toptions: CodecWriteOptions,\n\twriteVersion: SchemaFormatVersion,\n): IJsonCodec<SchemaChange> {\n\tconst family = makeSchemaChangeCodecs(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * Compose the change codec using mostly v1 logic.\n * @param options - The codec options.\n * @param schemaWriteVersion - The schema write version.\n * @returns The composed schema change codec.\n */\nfunction makeSchemaChangeCodecV1(\n\toptions: CodecWriteOptions,\n\tschemaWriteVersion: SchemaFormatVersion,\n): IJsonCodec<SchemaChange, EncodedSchemaChange> {\n\tconst schemaCodec = makeSchemaCodec(options, schemaWriteVersion);\n\tconst schemaChangeCodec: IJsonCodec<SchemaChange, EncodedSchemaChange> = {\n\t\tencode: (schemaChange) => {\n\t\t\tassert(\n\t\t\t\t!schemaChange.isInverse,\n\t\t\t\t0x933 /* Inverse schema changes should never be transmitted */,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tnew: schemaCodec.encode(schemaChange.schema.new),\n\t\t\t\told: schemaCodec.encode(schemaChange.schema.old),\n\t\t\t};\n\t\t},\n\t\tdecode: (encoded) => {\n\t\t\treturn {\n\t\t\t\tschema: {\n\t\t\t\t\tnew: schemaCodec.decode(encoded.new),\n\t\t\t\t\told: schemaCodec.decode(encoded.old),\n\t\t\t\t},\n\t\t\t\tisInverse: false,\n\t\t\t};\n\t\t},\n\t\tencodedSchema: EncodedSchemaChange,\n\t};\n\n\treturn withSchemaValidation(EncodedSchemaChange, schemaChangeCodec, options.jsonValidator);\n}\n"]}
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { type CodecTree, type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../../codec/index.js";
|
|
6
|
-
import {
|
|
5
|
+
import { type CodecTree, type CodecWriteOptions, type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../../codec/index.js";
|
|
6
|
+
import { SchemaFormatVersion, type TreeStoredSchema } from "../../core/index.js";
|
|
7
7
|
import { type JsonCompatible } from "../../util/index.js";
|
|
8
8
|
import type { MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
|
|
9
9
|
/**
|
|
10
|
-
* Convert a MinimumVersionForCollab to a
|
|
10
|
+
* Convert a MinimumVersionForCollab to a SchemaFormatVersion.
|
|
11
11
|
* @param clientVersion - The MinimumVersionForCollab to convert.
|
|
12
|
-
* @returns The
|
|
12
|
+
* @returns The SchemaFormatVersion that corresponds to the provided MinimumVersionForCollab.
|
|
13
13
|
*/
|
|
14
|
-
export declare function clientVersionToSchemaVersion(clientVersion: MinimumVersionForCollab):
|
|
15
|
-
export declare function getCodecTreeForSchemaFormat(
|
|
14
|
+
export declare function clientVersionToSchemaVersion(clientVersion: MinimumVersionForCollab): SchemaFormatVersion;
|
|
15
|
+
export declare function getCodecTreeForSchemaFormat(clientVersion: MinimumVersionForCollab): CodecTree;
|
|
16
16
|
/**
|
|
17
17
|
* Create a schema codec.
|
|
18
|
-
* @param options - Specifies common codec options, including which `validator` to use.
|
|
19
|
-
* @param
|
|
18
|
+
* @param options - Specifies common codec options, including `minVersionForCollab` and which `validator` to use.
|
|
19
|
+
* @param writeVersionOverride - The schema version to write. If not provided, the version will be derived from `minVersionForCollab`.
|
|
20
20
|
* @returns The composed codec.
|
|
21
21
|
*
|
|
22
22
|
* @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.
|
|
23
23
|
*/
|
|
24
|
-
export declare function makeSchemaCodec(options:
|
|
24
|
+
export declare function makeSchemaCodec(options: CodecWriteOptions, writeVersionOverride?: SchemaFormatVersion): IJsonCodec<TreeStoredSchema>;
|
|
25
25
|
/**
|
|
26
26
|
* Create a family of schema codecs.
|
|
27
27
|
* @param options - Specifies common codec options, including which `validator` to use.
|
|
@@ -34,5 +34,5 @@ export declare function makeSchemaCodecs(options: ICodecOptions): ICodecFamily<T
|
|
|
34
34
|
* @param version - The schema write version.
|
|
35
35
|
* @returns The encoded schema.
|
|
36
36
|
*/
|
|
37
|
-
export declare function encodeRepo(repo: TreeStoredSchema, version:
|
|
37
|
+
export declare function encodeRepo(repo: TreeStoredSchema, version: SchemaFormatVersion): JsonCompatible;
|
|
38
38
|
//# sourceMappingURL=codec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAIf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,
|
|
1
|
+
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,SAAS,EACd,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAIf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,mBAAmB,EAGnB,KAAK,gBAAgB,EAKrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAS,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAE5F;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC3C,aAAa,EAAE,uBAAuB,GACpC,mBAAmB,CAIrB;AAED,wBAAgB,2BAA2B,CAC1C,aAAa,EAAE,uBAAuB,GACpC,SAAS,CAEX;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,oBAAoB,CAAC,EAAE,mBAAmB,GACxC,UAAU,CAAC,gBAAgB,CAAC,CAO9B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAKvF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACzB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,mBAAmB,GAC1B,cAAc,CAShB"}
|
|
@@ -3,34 +3,38 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { fail, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
6
|
-
import { makeCodecFamily, makeVersionDispatchingCodec, makeVersionedValidatedCodec, } from "../../codec/index.js";
|
|
7
|
-
import {
|
|
6
|
+
import { FluidClientVersion, makeCodecFamily, makeVersionDispatchingCodec, makeVersionedValidatedCodec, } from "../../codec/index.js";
|
|
7
|
+
import { SchemaFormatVersion, decodeFieldSchema, encodeFieldSchemaV1, encodeFieldSchemaV2, storedSchemaDecodeDispatcher, } from "../../core/index.js";
|
|
8
8
|
import { brand } from "../../util/index.js";
|
|
9
9
|
import { Format as FormatV1 } from "./formatV1.js";
|
|
10
10
|
import { Format as FormatV2 } from "./formatV2.js";
|
|
11
11
|
/**
|
|
12
|
-
* Convert a MinimumVersionForCollab to a
|
|
12
|
+
* Convert a MinimumVersionForCollab to a SchemaFormatVersion.
|
|
13
13
|
* @param clientVersion - The MinimumVersionForCollab to convert.
|
|
14
|
-
* @returns The
|
|
14
|
+
* @returns The SchemaFormatVersion that corresponds to the provided MinimumVersionForCollab.
|
|
15
15
|
*/
|
|
16
16
|
export function clientVersionToSchemaVersion(clientVersion) {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
return clientVersion < FluidClientVersion.v2_43
|
|
18
|
+
? brand(SchemaFormatVersion.v1)
|
|
19
|
+
: brand(SchemaFormatVersion.v2);
|
|
19
20
|
}
|
|
20
|
-
export function getCodecTreeForSchemaFormat(
|
|
21
|
-
return { name: "Schema", version };
|
|
21
|
+
export function getCodecTreeForSchemaFormat(clientVersion) {
|
|
22
|
+
return { name: "Schema", version: clientVersionToSchemaVersion(clientVersion) };
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* Create a schema codec.
|
|
25
|
-
* @param options - Specifies common codec options, including which `validator` to use.
|
|
26
|
-
* @param
|
|
26
|
+
* @param options - Specifies common codec options, including `minVersionForCollab` and which `validator` to use.
|
|
27
|
+
* @param writeVersionOverride - The schema version to write. If not provided, the version will be derived from `minVersionForCollab`.
|
|
27
28
|
* @returns The composed codec.
|
|
28
29
|
*
|
|
29
30
|
* @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.
|
|
30
31
|
*/
|
|
31
|
-
export function makeSchemaCodec(options,
|
|
32
|
+
export function makeSchemaCodec(options, writeVersionOverride) {
|
|
32
33
|
const family = makeSchemaCodecs(options);
|
|
33
|
-
return makeVersionDispatchingCodec(family, {
|
|
34
|
+
return makeVersionDispatchingCodec(family, {
|
|
35
|
+
...options,
|
|
36
|
+
writeVersion: writeVersionOverride ?? clientVersionToSchemaVersion(options.minVersionForCollab),
|
|
37
|
+
});
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
40
|
* Create a family of schema codecs.
|
|
@@ -39,8 +43,8 @@ export function makeSchemaCodec(options, writeVersion) {
|
|
|
39
43
|
*/
|
|
40
44
|
export function makeSchemaCodecs(options) {
|
|
41
45
|
return makeCodecFamily([
|
|
42
|
-
[
|
|
43
|
-
[
|
|
46
|
+
[SchemaFormatVersion.v1, makeSchemaCodecV1(options)],
|
|
47
|
+
[SchemaFormatVersion.v2, makeSchemaCodecV2(options)],
|
|
44
48
|
]);
|
|
45
49
|
}
|
|
46
50
|
/**
|
|
@@ -51,9 +55,9 @@ export function makeSchemaCodecs(options) {
|
|
|
51
55
|
*/
|
|
52
56
|
export function encodeRepo(repo, version) {
|
|
53
57
|
switch (version) {
|
|
54
|
-
case
|
|
58
|
+
case SchemaFormatVersion.v1:
|
|
55
59
|
return encodeRepoV1(repo);
|
|
56
|
-
case
|
|
60
|
+
case SchemaFormatVersion.v2:
|
|
57
61
|
return encodeRepoV2(repo);
|
|
58
62
|
default:
|
|
59
63
|
unreachableCase(version);
|
|
@@ -63,7 +67,7 @@ function encodeRepoV1(repo) {
|
|
|
63
67
|
const nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV1());
|
|
64
68
|
const rootFieldSchema = encodeFieldSchemaV1(repo.rootFieldSchema);
|
|
65
69
|
return {
|
|
66
|
-
version:
|
|
70
|
+
version: SchemaFormatVersion.v1,
|
|
67
71
|
nodes: nodeSchema,
|
|
68
72
|
root: rootFieldSchema,
|
|
69
73
|
};
|
|
@@ -72,7 +76,7 @@ function encodeRepoV2(repo) {
|
|
|
72
76
|
const nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV2());
|
|
73
77
|
const rootFieldSchema = encodeFieldSchemaV2(repo.rootFieldSchema);
|
|
74
78
|
return {
|
|
75
|
-
version:
|
|
79
|
+
version: SchemaFormatVersion.v2,
|
|
76
80
|
nodes: nodeSchema,
|
|
77
81
|
root: rootFieldSchema,
|
|
78
82
|
};
|
|
@@ -126,7 +130,7 @@ function decodeV2(f) {
|
|
|
126
130
|
* @returns The codec.
|
|
127
131
|
*/
|
|
128
132
|
function makeSchemaCodecV1(options) {
|
|
129
|
-
return makeVersionedValidatedCodec(options, new Set([
|
|
133
|
+
return makeVersionedValidatedCodec(options, new Set([SchemaFormatVersion.v1]), FormatV1, {
|
|
130
134
|
encode: (data) => encodeRepoV1(data),
|
|
131
135
|
decode: (data) => decodeV1(data),
|
|
132
136
|
});
|
|
@@ -137,7 +141,7 @@ function makeSchemaCodecV1(options) {
|
|
|
137
141
|
* @returns The codec.
|
|
138
142
|
*/
|
|
139
143
|
function makeSchemaCodecV2(options) {
|
|
140
|
-
return makeVersionedValidatedCodec(options, new Set([
|
|
144
|
+
return makeVersionedValidatedCodec(options, new Set([SchemaFormatVersion.v2]), FormatV2, {
|
|
141
145
|
encode: (data) => encodeRepoV2(data),
|
|
142
146
|
decode: (data) => decodeV2(data),
|
|
143
147
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAKN,eAAe,EACf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ChD,OAAO,2BAA2B,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE;QAClF,MAAM,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;KAC1C,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,OAAsB;IAChD,OAAO,2BAA2B,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE;QAClF,MAAM,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;KAC1C,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype CodecTree,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n\tmakeVersionedValidatedCodec,\n} from \"../../codec/index.js\";\nimport {\n\tSchemaVersion,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchemaV1,\n\tencodeFieldSchemaV2,\n\tstoredSchemaDecodeDispatcher,\n} from \"../../core/index.js\";\nimport { brand, type JsonCompatible } from \"../../util/index.js\";\n\nimport { Format as FormatV1 } from \"./formatV1.js\";\nimport { Format as FormatV2 } from \"./formatV2.js\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\n\n/**\n * Convert a MinimumVersionForCollab to a SchemaVersion.\n * @param clientVersion - The MinimumVersionForCollab to convert.\n * @returns The SchemaVersion that corresponds to the provided MinimumVersionForCollab.\n */\nexport function clientVersionToSchemaVersion(\n\tclientVersion: MinimumVersionForCollab,\n): SchemaVersion {\n\t// Only one version of the schema codec is currently supported.\n\treturn SchemaVersion.v1;\n}\n\nexport function getCodecTreeForSchemaFormat(version: SchemaVersion): CodecTree {\n\treturn { name: \"Schema\", version };\n}\n\n/**\n * Create a schema codec.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @param writeVersion - The schema write version.\n * @returns The composed codec.\n *\n * @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.\n */\nexport function makeSchemaCodec(\n\toptions: ICodecOptions,\n\twriteVersion: SchemaVersion,\n): IJsonCodec<TreeStoredSchema> {\n\tconst family = makeSchemaCodecs(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * Create a family of schema codecs.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The composed codec family.\n */\nexport function makeSchemaCodecs(options: ICodecOptions): ICodecFamily<TreeStoredSchema> {\n\treturn makeCodecFamily([\n\t\t[SchemaVersion.v1, makeSchemaCodecV1(options)],\n\t\t[SchemaVersion.v2, makeSchemaCodecV2(options)],\n\t]);\n}\n\n/**\n * Encode an in-memory TreeStoredSchema into the specified format version.\n * @param repo - The in-memory schema.\n * @param version - The schema write version.\n * @returns The encoded schema.\n */\nexport function encodeRepo(repo: TreeStoredSchema, version: SchemaVersion): JsonCompatible {\n\tswitch (version) {\n\t\tcase SchemaVersion.v1:\n\t\t\treturn encodeRepoV1(repo) as JsonCompatible;\n\t\tcase SchemaVersion.v2:\n\t\t\treturn encodeRepoV2(repo) as JsonCompatible;\n\t\tdefault:\n\t\t\tunreachableCase(version);\n\t}\n}\n\nfunction encodeRepoV1(repo: TreeStoredSchema): FormatV1 {\n\tconst nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV1());\n\tconst rootFieldSchema = encodeFieldSchemaV1(repo.rootFieldSchema);\n\treturn {\n\t\tversion: SchemaVersion.v1,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\nfunction encodeRepoV2(repo: TreeStoredSchema): FormatV2 {\n\tconst nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV2());\n\tconst rootFieldSchema = encodeFieldSchemaV2(repo.rootFieldSchema);\n\treturn {\n\t\tversion: SchemaVersion.v2,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\n/**\n * Shared logic for encoding node schemas.\n * @param repo - The stored schema to encode.\n * @param encodeValue - A function which encodes a single node schema.\n * @returns The encoded node schema.\n */\nfunction encodeNodeSchema<TFormat>(\n\trepo: TreeStoredSchema,\n\tencodeValue: (schema: TreeNodeStoredSchema) => TFormat,\n): Record<string, TFormat> {\n\tconst nodeSchema: Record<string, TFormat> = Object.create(null);\n\tfor (const name of [...repo.nodeSchema.keys()].sort()) {\n\t\tconst schema = repo.nodeSchema.get(name) ?? fail(0xb28 /* missing schema */);\n\t\tObject.defineProperty(nodeSchema, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tvalue: encodeValue(schema),\n\t\t});\n\t}\n\n\treturn nodeSchema;\n}\n\nfunction decodeV1(f: FormatV1): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tconst storedSchemaDecoder = storedSchemaDecodeDispatcher.dispatch(schema);\n\n\t\t// No metadata in v1, so pass undefined\n\t\tnodeSchema.set(brand(key), storedSchemaDecoder(undefined));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\nfunction decodeV2(f: FormatV2): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tconst storedSchemaDecoder = storedSchemaDecodeDispatcher.dispatch(schema.kind);\n\n\t\t// Pass in the node metadata\n\t\tnodeSchema.set(brand(key), storedSchemaDecoder(schema.metadata));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The codec.\n */\nfunction makeSchemaCodecV1(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV1> {\n\treturn makeVersionedValidatedCodec(options, new Set([SchemaVersion.v1]), FormatV1, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepoV1(data),\n\t\tdecode: (data: FormatV1) => decodeV1(data),\n\t});\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The codec.\n */\nfunction makeSchemaCodecV2(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV2> {\n\treturn makeVersionedValidatedCodec(options, new Set([SchemaVersion.v2]), FormatV2, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepoV2(data),\n\t\tdecode: (data: FormatV2) => decodeV2(data),\n\t});\n}\n"]}
|
|
1
|
+
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAGN,kBAAkB,EAIlB,eAAe,EACf,2BAA2B,EAC3B,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,mBAAmB,EAInB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,4BAA4B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B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AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,OAAsB;IAChD,OAAO,2BAA2B,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE;QACxF,MAAM,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;KAC1C,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,OAAsB;IAChD,OAAO,2BAA2B,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE;QACxF,MAAM,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;KAC1C,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype CodecTree,\n\ttype CodecWriteOptions,\n\tFluidClientVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n\tmakeVersionedValidatedCodec,\n} from \"../../codec/index.js\";\nimport {\n\tSchemaFormatVersion,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchemaV1,\n\tencodeFieldSchemaV2,\n\tstoredSchemaDecodeDispatcher,\n} from \"../../core/index.js\";\nimport { brand, type JsonCompatible } from \"../../util/index.js\";\n\nimport { Format as FormatV1 } from \"./formatV1.js\";\nimport { Format as FormatV2 } from \"./formatV2.js\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\n\n/**\n * Convert a MinimumVersionForCollab to a SchemaFormatVersion.\n * @param clientVersion - The MinimumVersionForCollab to convert.\n * @returns The SchemaFormatVersion that corresponds to the provided MinimumVersionForCollab.\n */\nexport function clientVersionToSchemaVersion(\n\tclientVersion: MinimumVersionForCollab,\n): SchemaFormatVersion {\n\treturn clientVersion < FluidClientVersion.v2_43\n\t\t? brand(SchemaFormatVersion.v1)\n\t\t: brand(SchemaFormatVersion.v2);\n}\n\nexport function getCodecTreeForSchemaFormat(\n\tclientVersion: MinimumVersionForCollab,\n): CodecTree {\n\treturn { name: \"Schema\", version: clientVersionToSchemaVersion(clientVersion) };\n}\n\n/**\n * Create a schema codec.\n * @param options - Specifies common codec options, including `minVersionForCollab` and which `validator` to use.\n * @param writeVersionOverride - The schema version to write. If not provided, the version will be derived from `minVersionForCollab`.\n * @returns The composed codec.\n *\n * @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.\n */\nexport function makeSchemaCodec(\n\toptions: CodecWriteOptions,\n\twriteVersionOverride?: SchemaFormatVersion,\n): IJsonCodec<TreeStoredSchema> {\n\tconst family = makeSchemaCodecs(options);\n\treturn makeVersionDispatchingCodec(family, {\n\t\t...options,\n\t\twriteVersion:\n\t\t\twriteVersionOverride ?? clientVersionToSchemaVersion(options.minVersionForCollab),\n\t});\n}\n\n/**\n * Create a family of schema codecs.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The composed codec family.\n */\nexport function makeSchemaCodecs(options: ICodecOptions): ICodecFamily<TreeStoredSchema> {\n\treturn makeCodecFamily([\n\t\t[SchemaFormatVersion.v1, makeSchemaCodecV1(options)],\n\t\t[SchemaFormatVersion.v2, makeSchemaCodecV2(options)],\n\t]);\n}\n\n/**\n * Encode an in-memory TreeStoredSchema into the specified format version.\n * @param repo - The in-memory schema.\n * @param version - The schema write version.\n * @returns The encoded schema.\n */\nexport function encodeRepo(\n\trepo: TreeStoredSchema,\n\tversion: SchemaFormatVersion,\n): JsonCompatible {\n\tswitch (version) {\n\t\tcase SchemaFormatVersion.v1:\n\t\t\treturn encodeRepoV1(repo) as JsonCompatible;\n\t\tcase SchemaFormatVersion.v2:\n\t\t\treturn encodeRepoV2(repo) as JsonCompatible;\n\t\tdefault:\n\t\t\tunreachableCase(version);\n\t}\n}\n\nfunction encodeRepoV1(repo: TreeStoredSchema): FormatV1 {\n\tconst nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV1());\n\tconst rootFieldSchema = encodeFieldSchemaV1(repo.rootFieldSchema);\n\treturn {\n\t\tversion: SchemaFormatVersion.v1,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\nfunction encodeRepoV2(repo: TreeStoredSchema): FormatV2 {\n\tconst nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV2());\n\tconst rootFieldSchema = encodeFieldSchemaV2(repo.rootFieldSchema);\n\treturn {\n\t\tversion: SchemaFormatVersion.v2,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\n/**\n * Shared logic for encoding node schemas.\n * @param repo - The stored schema to encode.\n * @param encodeValue - A function which encodes a single node schema.\n * @returns The encoded node schema.\n */\nfunction encodeNodeSchema<TFormat>(\n\trepo: TreeStoredSchema,\n\tencodeValue: (schema: TreeNodeStoredSchema) => TFormat,\n): Record<string, TFormat> {\n\tconst nodeSchema: Record<string, TFormat> = Object.create(null);\n\tfor (const name of [...repo.nodeSchema.keys()].sort()) {\n\t\tconst schema = repo.nodeSchema.get(name) ?? fail(0xb28 /* missing schema */);\n\t\tObject.defineProperty(nodeSchema, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tvalue: encodeValue(schema),\n\t\t});\n\t}\n\n\treturn nodeSchema;\n}\n\nfunction decodeV1(f: FormatV1): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tconst storedSchemaDecoder = storedSchemaDecodeDispatcher.dispatch(schema);\n\n\t\t// No metadata in v1, so pass undefined\n\t\tnodeSchema.set(brand(key), storedSchemaDecoder(undefined));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\nfunction decodeV2(f: FormatV2): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tconst storedSchemaDecoder = storedSchemaDecodeDispatcher.dispatch(schema.kind);\n\n\t\t// Pass in the node metadata\n\t\tnodeSchema.set(brand(key), storedSchemaDecoder(schema.metadata));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The codec.\n */\nfunction makeSchemaCodecV1(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV1> {\n\treturn makeVersionedValidatedCodec(options, new Set([SchemaFormatVersion.v1]), FormatV1, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepoV1(data),\n\t\tdecode: (data: FormatV1) => decodeV1(data),\n\t});\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The codec.\n */\nfunction makeSchemaCodecV2(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV2> {\n\treturn makeVersionedValidatedCodec(options, new Set([SchemaFormatVersion.v2]), FormatV2, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepoV2(data),\n\t\tdecode: (data: FormatV2) => decodeV2(data),\n\t});\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { type Static } from "@sinclair/typebox";
|
|
6
|
-
import {
|
|
6
|
+
import { schemaFormatV1 } from "../../core/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* Format for encoding as json.
|
|
9
9
|
*
|
|
@@ -15,7 +15,7 @@ import { SchemaVersion, schemaFormatV1 } from "../../core/index.js";
|
|
|
15
15
|
* It also makes it simpler to determinately sort by keys.
|
|
16
16
|
*/
|
|
17
17
|
export declare const Format: import("@sinclair/typebox").TObject<{
|
|
18
|
-
version: import("@sinclair/typebox").TLiteral<
|
|
18
|
+
version: import("@sinclair/typebox").TLiteral<1>;
|
|
19
19
|
nodes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
20
20
|
object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
21
21
|
kind: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKindIdentifier>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAE1E,OAAO,
|
|
1
|
+
{"version":3,"file":"formatV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAuB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1E;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;EAOlB,CAAC;AACF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
|
-
import {
|
|
6
|
+
import { SchemaFormatVersion, schemaFormatV1 } from "../../core/index.js";
|
|
7
7
|
const noAdditionalProps = { additionalProperties: false };
|
|
8
8
|
/**
|
|
9
9
|
* Format for encoding as json.
|
|
@@ -16,7 +16,7 @@ const noAdditionalProps = { additionalProperties: false };
|
|
|
16
16
|
* It also makes it simpler to determinately sort by keys.
|
|
17
17
|
*/
|
|
18
18
|
export const Format = Type.Object({
|
|
19
|
-
version: Type.Literal(
|
|
19
|
+
version: Type.Literal(SchemaFormatVersion.v1),
|
|
20
20
|
nodes: Type.Record(Type.String(), schemaFormatV1.TreeNodeSchemaDataFormat),
|
|
21
21
|
root: schemaFormatV1.FieldSchemaFormat,
|
|
22
22
|
}, noAdditionalProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmC,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmC,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAChC;IACC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;IAC7C,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,cAAc,CAAC,wBAAwB,CAAC;IAC1E,IAAI,EAAE,cAAc,CAAC,iBAAiB;CACtC,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { SchemaFormatVersion, schemaFormatV1 } from \"../../core/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n/**\n * Format for encoding as json.\n *\n * For consistency all lists are sorted and undefined values are omitted.\n *\n * This chooses to use lists of named objects instead of maps:\n * this choice is somewhat arbitrary, but avoids user data being used as object keys,\n * which can sometimes be an issue (for example handling that for \"__proto__\" can require care).\n * It also makes it simpler to determinately sort by keys.\n */\nexport const Format = Type.Object(\n\t{\n\t\tversion: Type.Literal(SchemaFormatVersion.v1),\n\t\tnodes: Type.Record(Type.String(), schemaFormatV1.TreeNodeSchemaDataFormat),\n\t\troot: schemaFormatV1.FieldSchemaFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type Format = Static<typeof Format>;\n"]}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { type Static } from "@sinclair/typebox";
|
|
6
|
-
import { SchemaVersion } from "../../core/index.js";
|
|
7
6
|
/**
|
|
8
7
|
* Format for encoding as json.
|
|
9
8
|
*
|
|
@@ -15,7 +14,7 @@ import { SchemaVersion } from "../../core/index.js";
|
|
|
15
14
|
* It also makes it simpler to determinately sort by keys.
|
|
16
15
|
*/
|
|
17
16
|
export declare const Format: import("@sinclair/typebox").TObject<{
|
|
18
|
-
version: import("@sinclair/typebox").TLiteral<
|
|
17
|
+
version: import("@sinclair/typebox").TLiteral<2>;
|
|
19
18
|
nodes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
20
19
|
kind: import("@sinclair/typebox").TObject<{
|
|
21
20
|
object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAM1E;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;EAOlB,CAAC;AACF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
|