@fluidframework/tree 2.117.0 → 2.118.1
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 +86 -0
- package/api-report/tree.alpha.api.md +44 -1
- package/api-report/tree.beta.api.md +38 -0
- package/api-report/tree.legacy.beta.api.md +38 -0
- package/dist/entrypoints/alpha.d.ts +1 -1
- package/dist/entrypoints/alpha.d.ts.map +1 -1
- package/dist/entrypoints/alpha.js.map +1 -1
- package/dist/entrypoints/beta.d.ts +1 -1
- package/dist/entrypoints/beta.d.ts.map +1 -1
- package/dist/entrypoints/beta.js.map +1 -1
- package/dist/entrypoints/legacy.d.ts +1 -1
- package/dist/entrypoints/legacy.d.ts.map +1 -1
- package/dist/entrypoints/legacy.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +1 -1
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/schemaChecker.d.ts +9 -19
- package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
- package/dist/feature-libraries/schemaChecker.js +130 -46
- package/dist/feature-libraries/schemaChecker.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +13 -3
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +48 -11
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +4 -4
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts +36 -3
- package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/dist/simple-tree/api/discrepancies.js +40 -14
- package/dist/simple-tree/api/discrepancies.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 +3 -2
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +22 -3
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js +140 -10
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +172 -7
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/core/toStored.d.ts +7 -0
- package/dist/simple-tree/core/toStored.d.ts.map +1 -1
- package/dist/simple-tree/core/toStored.js.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.js +2 -2
- package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/index.d.ts +1 -1
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +4 -3
- package/dist/simple-tree/index.js.map +1 -1
- package/docs/main/glossary.md +163 -0
- package/lib/entrypoints/alpha.d.ts +1 -1
- package/lib/entrypoints/alpha.d.ts.map +1 -1
- package/lib/entrypoints/alpha.js.map +1 -1
- package/lib/entrypoints/beta.d.ts +1 -1
- package/lib/entrypoints/beta.d.ts.map +1 -1
- package/lib/entrypoints/beta.js.map +1 -1
- package/lib/entrypoints/legacy.d.ts +1 -1
- package/lib/entrypoints/legacy.d.ts.map +1 -1
- package/lib/entrypoints/legacy.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/schemaChecker.d.ts +9 -19
- package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
- package/lib/feature-libraries/schemaChecker.js +133 -49
- package/lib/feature-libraries/schemaChecker.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +13 -3
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +49 -12
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +4 -4
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts +36 -3
- package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/lib/simple-tree/api/discrepancies.js +40 -14
- package/lib/simple-tree/api/discrepancies.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 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +22 -3
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js +136 -7
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +172 -7
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/core/toStored.d.ts +7 -0
- package/lib/simple-tree/core/toStored.d.ts.map +1 -1
- package/lib/simple-tree/core/toStored.js.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.js +3 -3
- package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/index.d.ts +1 -1
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/package.json +22 -22
- package/src/entrypoints/alpha.ts +3 -0
- package/src/entrypoints/beta.ts +2 -0
- package/src/entrypoints/legacy.ts +2 -0
- package/src/feature-libraries/index.ts +1 -1
- package/src/feature-libraries/schemaChecker.ts +198 -82
- package/src/index.ts +3 -0
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/schematizingTreeView.ts +75 -21
- package/src/simple-tree/api/configuration.ts +4 -4
- package/src/simple-tree/api/discrepancies.ts +100 -5
- package/src/simple-tree/api/index.ts +7 -1
- package/src/simple-tree/api/schemaCompatibilityTester.ts +186 -11
- package/src/simple-tree/api/tree.ts +184 -8
- package/src/simple-tree/core/toStored.ts +8 -0
- package/src/simple-tree/core/treeNodeValid.ts +3 -1
- package/src/simple-tree/index.ts +4 -0
- package/docs/main/runtime-schema-upgrade.md +0 -208
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/simple-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EAKnB,QAAQ,EAIR,QAAQ,EAGR,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,4BAA4B,EAC5B,mCAAmC,EACnC,SAAS,EAET,qBAAqB,EASrB,qBAAqB,EAIrB,kBAAkB,EAIlB,aAAa,EAKb,cAAc,EACd,gBAAgB,EAGhB,sBAAsB,EAItB,6BAA6B,EAE7B,yBAAyB,EAEzB,YAAY,EACZ,mBAAmB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAMN,qBAAqB,EACrB,0BAA0B,EAK1B,aAAa,EACb,MAAM,EACN,iBAAiB,EAEjB,kBAAkB,EAQlB,SAAS,EACT,eAAe,EACf,eAAe,EACf,WAAW,EAaX,+BAA+B,EAC/B,aAAa,EACb,aAAa,EACb,QAAQ,EAIR,eAAe,EACf,qBAAqB,EAGrB,eAAe,EAkBf,aAAa,EACb,eAAe,EAIf,sBAAsB,EACtB,sBAAsB,EAEtB,wBAAwB,EAwBxB,2BAA2B,EAC3B,YAAY,EACZ,YAAY,EACZ,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EAGtB,sBAAsB,EAkBtB,QAAQ,EACR,8BAA8B,EAC9B,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EAEzB,WAAW,EAEX,qBAAqB,EAGrB,aAAa,EAIb,kBAAkB,EAElB,sBAAsB,EACtB,wCAAwC,EAExC,iCAAiC,EACjC,iCAAiC,EACjC,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,EAClB,kBAAkB,EAClB,8BAA8B,EAI9B,2BAA2B,EAG3B,2CAA2C,GAG3C,MAAM,gBAAgB,CAAC;AAexB,OAAO,EAGN,SAAS,EACT,WAAW,EACX,gBAAgB,EAKhB,oBAAoB,EACpB,mBAAmB,EACnB,2BAA2B,GAO3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAIN,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,wBAAwB,EAExB,aAAa,EAIb,aAAa,EACb,eAAe,EASf,gBAAgB,EAGhB,YAAY,EACZ,kBAAkB,EAElB,QAAQ,EACR,kBAAkB,EAIlB,gBAAgB,EAGhB,0BAA0B,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,gCAAgC,GAIhC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACN,mBAAmB,EACnB,8BAA8B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,GACV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttypeNameSymbol,\n\ttypeSchemaSymbol,\n\tcontentSchemaSymbol,\n\ttype WithType,\n\ttype TreeNodeSchema,\n\ttype AnnotatedAllowedType,\n\ttype AllowedTypesFullEvaluated,\n\tNodeKind,\n\ttype TreeNodeSchemaClass,\n\ttype TreeNodeSchemaNonClass,\n\ttype TreeNodeSchemaCore,\n\tTreeNode,\n\ttype Unhydrated,\n\ttype InternalTreeNode,\n\tisTreeNode,\n\ttryDisposeTreeNode,\n\tHydratedContext,\n\tSimpleContextSlot,\n\tgetInnerNode,\n\tgetOrCreateNodeFromInnerNode,\n\tgetOrCreateNodeFromInnerUnboxedNode,\n\tgetKernel,\n\ttype NodeFromSchema,\n\tisTreeNodeSchemaClass,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\ttype AllowedTypes,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype InsertableTypedNode,\n\ttype NodeBuilderData,\n\ttype Input,\n\tnormalizeAllowedTypes,\n\ttype NodeSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype AllowedTypesMetadata,\n\tevaluateLazySchema,\n\ttype UnannotateAllowedTypesList,\n\ttype AllowedTypeMetadata,\n\ttype AnnotatedAllowedTypes,\n\tSchemaUpgrade,\n\ttype LazyItem,\n\ttype FlexList,\n\ttype FlexListToUnion,\n\ttype ExtractItemType,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\ttype SimpleNodeSchemaBase,\n\twithBufferedTreeEvents,\n\ttype AnnotateAllowedTypesList,\n\ttype AllowedTypesFull,\n\ttype AllowedTypesFullFromMixed,\n\tAnnotatedAllowedTypesInternal,\n\ttype NumberKeys,\n\tStagedSchemaUpgradePolicy,\n\ttype StagedSchemaUpgradePolicyFactory,\n\tExpectStored,\n\tcreateSchemaUpgrade,\n} from \"./core/index.js\";\nexport { walkFieldSchema } from \"./walkFieldSchema.js\";\nexport type { UnsafeUnknownSchema, Insertable } from \"./unsafeUnknownSchema.js\";\nexport {\n\ttype CommitRevision,\n\ttype ITree,\n\ttype TreeView,\n\ttype ViewableTree,\n\ttype TreeViewEvents,\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n\ttype ITreeViewConfiguration,\n\ttype ITreeViewConfigurationAlpha,\n\ttype SchemaCompatibilityStatus,\n\ttype ITreeConfigurationOptions,\n\tSchemaFactory,\n\tscoped,\n\tSchemaFactoryBeta,\n\ttype SchemaStaticsBeta,\n\tSchemaFactoryAlpha,\n\ttype SchemaStaticsAlpha,\n\ttype NodeProvider,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype ScopedSchemaName,\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttype ArrayNodeDeltaOp,\n\ttype ArrayNodeInsertOp,\n\ttype ArrayNodeRemoveOp,\n\ttype ArrayNodeRetainOp,\n\ttype ArrayNodeTreeChangedDeltaOp,\n\ttype ArrayNodeTreeChangedRetainOp,\n\ttype NodeChangedData,\n\ttype NodeChangedDataAlpha,\n\ttype NodeChangedDataDelta,\n\ttype NodeChangedDataProperties,\n\ttype NodeChangedDataTreeDelta,\n\tborrowCursorFromTreeNodeOrValue,\n\texportConcise,\n\timportConcise,\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\ttype TreeChangeEventsAlpha,\n\ttype IdentifierIndex,\n\tcreateTreeIndex,\n\tcreateIdentifierIndex,\n\ttype TreeIndexKey,\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n\ttype JsonSchemaId,\n\ttype JsonSchemaType,\n\ttype JsonObjectNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonLeafNodeSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonTreeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\ttype TreeSchemaEncodingOptions,\n\tgetJsonSchema,\n\tgetSimpleSchema,\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\tcheckSchemaCompatibility,\n\ttype Unenforced,\n\ttype System_Unsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype UnannotateAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypesUnsafe,\n\ttype AllowedTypesFullUnsafe,\n\ttype AllowedTypesFullFromMixedUnsafe,\n\ttype UnannotateAllowedTypesListUnsafe,\n\ttype AnnotateAllowedTypesListUnsafe,\n\ttype FieldHasDefaultAlphaUnsafe,\n\ttype InsertableObjectFromSchemaRecordAlphaUnsafe,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype UntypedTreeView,\n\ttype TreeBranch,\n\ttype TreeBranchAlpha,\n\ttype UntypedTreeViewAlpha,\n\ttype TreeBranchEvents,\n\ttype TreeBranchCommitMetadata,\n\ttype TreeBranchHistory,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttryGetSchema,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\tconciseFromCursor,\n\tcreateFromCursor,\n\tasTreeViewAlpha,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype NoChangeConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParamsAlpha,\n\ttype RunTransactionParamsBeta,\n\ttype TransactionCallbackStatusAlpha,\n\ttype TransactionCallbackStatusBeta,\n\ttype TransactionConstraint,\n\ttype TransactionConstraintAlpha,\n\ttype TransactionPostProcessor,\n\ttype TransactionResultFailed,\n\ttype TransactionResultSuccess,\n\ttype TransactionValueResult,\n\ttype TransactionVoidResult,\n\ttype VoidTransactionCallbackStatusAlpha,\n\ttype VoidTransactionCallbackStatusBeta,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype FieldSchemaAlphaUnsafe,\n\tgetIdentifierFromNode,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tschemaStatics,\n\ttype TreeChangeEvents,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n\tincrementalSummaryHint,\n\tincrementalEncodingPolicyForAllowedTypes,\n\ttype SchemaFactory_base,\n\tencodeSchemaCompatibilitySnapshot,\n\tdecodeSchemaCompatibilitySnapshot,\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n\teraseSchemaDetails,\n\teraseSchemaDetailsSubclassable,\n\ttype ErasedSchema,\n\ttype ErasedNode,\n\ttype ErasedSchemaSubclassable,\n\tsnapshotSchemaCompatibility,\n\ttype SnapshotFileSystem,\n\ttype SnapshotSchemaCompatibilityOptions,\n\tcreateCustomizedFluidFrameworkScopedFactory,\n\ttype TreeContextAlpha,\n\ttype WithValue,\n} from \"./api/index.js\";\nexport type {\n\tSimpleTreeSchema,\n\tSimpleNodeSchema,\n\tSimpleFieldSchema,\n\tSimpleLeafNodeSchema,\n\tSimpleMapNodeSchema,\n\tSimpleArrayNodeSchema,\n\tSimpleObjectNodeSchema,\n\tSimpleNodeSchemaBaseAlpha,\n\tSimpleObjectFieldSchema,\n\tSimpleRecordNodeSchema,\n\tSimpleAllowedTypeAttributes,\n\tSchemaType,\n} from \"./simpleSchema.js\";\nexport {\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\tFieldKind,\n\tFieldSchema,\n\tFieldSchemaAlpha,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype DefaultProvider,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\tareFieldSchemaEqual,\n\tareImplicitFieldSchemaEqual,\n\ttype ApplyKind,\n\ttype FieldSchemaMetadata,\n\ttype InsertableField,\n\ttype ApplyKindInput,\n\ttype ReadableField,\n\ttype ReadSchema,\n} from \"./fieldSchema.js\";\nexport { tryGetTreeNodeForField } from \"./getTreeNodeForField.js\";\nexport {\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodeCustomizableSchemaAlpha,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\tasIndex,\n\tisArrayNodeSchema,\n\tIterableTreeArrayContent,\n\ttype ReadonlyArrayNode,\n\tTreeArrayNode,\n\ttype TreeArrayNodeAlpha,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\tisMapNodeSchema,\n\ttype TreeMapNode,\n\ttype TreeMapNodeAlpha,\n\ttype MapNodeInsertableData,\n\ttype FieldHasDefault,\n\ttype FieldHasDefaultAlpha,\n\ttype InsertableObjectFromSchemaRecord,\n\ttype InsertableObjectFromSchemaRecordAlpha,\n\ttype ObjectFromSchemaRecord,\n\tObjectNodeSchema,\n\ttype ObjectNodeSchemaWorkaround,\n\ttype ObjectNodeSchemaPrivate,\n\tobjectSchema,\n\tisObjectNodeSchema,\n\ttype TreeObjectNode,\n\tsetField,\n\tisRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\tRecordNodeSchema,\n\ttype TreeRecordNode,\n\ttype ArrayPlaceAnchor,\n\tcreateArrayInsertionAnchor,\n} from \"./node-kinds/index.js\";\nexport {\n\tunhydratedFlexTreeFromInsertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n} from \"./unhydratedFlexTreeFromInsertable.js\";\nexport {\n\tprepareForInsertion,\n\tprepareForInsertionContextless,\n} from \"./prepareForInsertion.js\";\nexport {\n\ttoStoredSchema,\n\tconvertFieldKind,\n\ttoUpgradeSchema,\n\ttoInitialSchema,\n\ttoUnhydratedSchema,\n} from \"./toStoredSchema.js\";\nexport {\n\tnumberSchema,\n\tstringSchema,\n\tbooleanSchema,\n\thandleSchema,\n\tnullSchema,\n} from \"./leafNodeSchema.js\";\nexport type { LeafSchema, StringSchema } from \"./leafNodeSchema.js\";\nexport { getUnhydratedContext } from \"./createContext.js\";\nexport { type TreeSchema, createTreeSchema } from \"./treeSchema.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/simple-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EAKnB,QAAQ,EAIR,QAAQ,EAGR,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,4BAA4B,EAC5B,mCAAmC,EACnC,SAAS,EAET,qBAAqB,EASrB,qBAAqB,EAIrB,kBAAkB,EAIlB,aAAa,EAKb,cAAc,EACd,gBAAgB,EAGhB,sBAAsB,EAItB,6BAA6B,EAE7B,yBAAyB,EAEzB,YAAY,EACZ,mBAAmB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAMN,qBAAqB,EACrB,0BAA0B,EAO1B,aAAa,EACb,MAAM,EACN,iBAAiB,EAEjB,kBAAkB,EAQlB,SAAS,EACT,eAAe,EACf,eAAe,EACf,WAAW,EAaX,+BAA+B,EAC/B,aAAa,EACb,aAAa,EACb,QAAQ,EAIR,eAAe,EACf,qBAAqB,EAGrB,eAAe,EAkBf,aAAa,EACb,eAAe,EAKf,sBAAsB,EACtB,sBAAsB,EAEtB,wBAAwB,EACxB,+BAA+B,EAwB/B,2BAA2B,EAC3B,YAAY,EACZ,YAAY,EACZ,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EAGtB,sBAAsB,EAkBtB,QAAQ,EACR,8BAA8B,EAC9B,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EAEzB,WAAW,EAEX,qBAAqB,EAGrB,aAAa,EAIb,kBAAkB,EAElB,sBAAsB,EACtB,wCAAwC,EAExC,iCAAiC,EACjC,iCAAiC,EACjC,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,EAClB,kBAAkB,EAClB,8BAA8B,EAI9B,2BAA2B,EAG3B,2CAA2C,GAG3C,MAAM,gBAAgB,CAAC;AAexB,OAAO,EAGN,SAAS,EACT,WAAW,EACX,gBAAgB,EAKhB,oBAAoB,EACpB,mBAAmB,EACnB,2BAA2B,GAO3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAIN,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,wBAAwB,EAExB,aAAa,EAIb,aAAa,EACb,eAAe,EASf,gBAAgB,EAGhB,YAAY,EACZ,kBAAkB,EAElB,QAAQ,EACR,kBAAkB,EAIlB,gBAAgB,EAGhB,0BAA0B,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,gCAAgC,GAIhC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACN,mBAAmB,EACnB,8BAA8B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,GACV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttypeNameSymbol,\n\ttypeSchemaSymbol,\n\tcontentSchemaSymbol,\n\ttype WithType,\n\ttype TreeNodeSchema,\n\ttype AnnotatedAllowedType,\n\ttype AllowedTypesFullEvaluated,\n\tNodeKind,\n\ttype TreeNodeSchemaClass,\n\ttype TreeNodeSchemaNonClass,\n\ttype TreeNodeSchemaCore,\n\tTreeNode,\n\ttype Unhydrated,\n\ttype InternalTreeNode,\n\tisTreeNode,\n\ttryDisposeTreeNode,\n\tHydratedContext,\n\tSimpleContextSlot,\n\tgetInnerNode,\n\tgetOrCreateNodeFromInnerNode,\n\tgetOrCreateNodeFromInnerUnboxedNode,\n\tgetKernel,\n\ttype NodeFromSchema,\n\tisTreeNodeSchemaClass,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\ttype AllowedTypes,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype InsertableTypedNode,\n\ttype NodeBuilderData,\n\ttype Input,\n\tnormalizeAllowedTypes,\n\ttype NodeSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype AllowedTypesMetadata,\n\tevaluateLazySchema,\n\ttype UnannotateAllowedTypesList,\n\ttype AllowedTypeMetadata,\n\ttype AnnotatedAllowedTypes,\n\tSchemaUpgrade,\n\ttype LazyItem,\n\ttype FlexList,\n\ttype FlexListToUnion,\n\ttype ExtractItemType,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\ttype SimpleNodeSchemaBase,\n\twithBufferedTreeEvents,\n\ttype AnnotateAllowedTypesList,\n\ttype AllowedTypesFull,\n\ttype AllowedTypesFullFromMixed,\n\tAnnotatedAllowedTypesInternal,\n\ttype NumberKeys,\n\tStagedSchemaUpgradePolicy,\n\ttype StagedSchemaUpgradePolicyFactory,\n\tExpectStored,\n\tcreateSchemaUpgrade,\n} from \"./core/index.js\";\nexport { walkFieldSchema } from \"./walkFieldSchema.js\";\nexport type { UnsafeUnknownSchema, Insertable } from \"./unsafeUnknownSchema.js\";\nexport {\n\ttype CommitRevision,\n\ttype ITree,\n\ttype TreeView,\n\ttype ViewableTree,\n\ttype TreeViewEvents,\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n\ttype ITreeViewConfiguration,\n\ttype ITreeViewConfigurationAlpha,\n\ttype SchemaCompatibilityStatus,\n\ttype SchemaCompatibilityStatusBeta,\n\ttype SchemaDiscrepancy,\n\ttype ITreeConfigurationOptions,\n\tSchemaFactory,\n\tscoped,\n\tSchemaFactoryBeta,\n\ttype SchemaStaticsBeta,\n\tSchemaFactoryAlpha,\n\ttype SchemaStaticsAlpha,\n\ttype NodeProvider,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype ScopedSchemaName,\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttype ArrayNodeDeltaOp,\n\ttype ArrayNodeInsertOp,\n\ttype ArrayNodeRemoveOp,\n\ttype ArrayNodeRetainOp,\n\ttype ArrayNodeTreeChangedDeltaOp,\n\ttype ArrayNodeTreeChangedRetainOp,\n\ttype NodeChangedData,\n\ttype NodeChangedDataAlpha,\n\ttype NodeChangedDataDelta,\n\ttype NodeChangedDataProperties,\n\ttype NodeChangedDataTreeDelta,\n\tborrowCursorFromTreeNodeOrValue,\n\texportConcise,\n\timportConcise,\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\ttype TreeChangeEventsAlpha,\n\ttype IdentifierIndex,\n\tcreateTreeIndex,\n\tcreateIdentifierIndex,\n\ttype TreeIndexKey,\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n\ttype JsonSchemaId,\n\ttype JsonSchemaType,\n\ttype JsonObjectNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonLeafNodeSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonTreeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\ttype TreeSchemaEncodingOptions,\n\tgetJsonSchema,\n\tgetSimpleSchema,\n\ttype StagedUpgradeStatus,\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\tcheckSchemaCompatibility,\n\tgetSchemaIncompatibilityDetails,\n\ttype Unenforced,\n\ttype System_Unsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype UnannotateAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypesUnsafe,\n\ttype AllowedTypesFullUnsafe,\n\ttype AllowedTypesFullFromMixedUnsafe,\n\ttype UnannotateAllowedTypesListUnsafe,\n\ttype AnnotateAllowedTypesListUnsafe,\n\ttype FieldHasDefaultAlphaUnsafe,\n\ttype InsertableObjectFromSchemaRecordAlphaUnsafe,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype UntypedTreeView,\n\ttype TreeBranch,\n\ttype TreeBranchAlpha,\n\ttype UntypedTreeViewAlpha,\n\ttype TreeBranchEvents,\n\ttype TreeBranchCommitMetadata,\n\ttype TreeBranchHistory,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttryGetSchema,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\tconciseFromCursor,\n\tcreateFromCursor,\n\tasTreeViewAlpha,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype NoChangeConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParamsAlpha,\n\ttype RunTransactionParamsBeta,\n\ttype TransactionCallbackStatusAlpha,\n\ttype TransactionCallbackStatusBeta,\n\ttype TransactionConstraint,\n\ttype TransactionConstraintAlpha,\n\ttype TransactionPostProcessor,\n\ttype TransactionResultFailed,\n\ttype TransactionResultSuccess,\n\ttype TransactionValueResult,\n\ttype TransactionVoidResult,\n\ttype VoidTransactionCallbackStatusAlpha,\n\ttype VoidTransactionCallbackStatusBeta,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype FieldSchemaAlphaUnsafe,\n\tgetIdentifierFromNode,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tschemaStatics,\n\ttype TreeChangeEvents,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n\tincrementalSummaryHint,\n\tincrementalEncodingPolicyForAllowedTypes,\n\ttype SchemaFactory_base,\n\tencodeSchemaCompatibilitySnapshot,\n\tdecodeSchemaCompatibilitySnapshot,\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n\teraseSchemaDetails,\n\teraseSchemaDetailsSubclassable,\n\ttype ErasedSchema,\n\ttype ErasedNode,\n\ttype ErasedSchemaSubclassable,\n\tsnapshotSchemaCompatibility,\n\ttype SnapshotFileSystem,\n\ttype SnapshotSchemaCompatibilityOptions,\n\tcreateCustomizedFluidFrameworkScopedFactory,\n\ttype TreeContextAlpha,\n\ttype WithValue,\n} from \"./api/index.js\";\nexport type {\n\tSimpleTreeSchema,\n\tSimpleNodeSchema,\n\tSimpleFieldSchema,\n\tSimpleLeafNodeSchema,\n\tSimpleMapNodeSchema,\n\tSimpleArrayNodeSchema,\n\tSimpleObjectNodeSchema,\n\tSimpleNodeSchemaBaseAlpha,\n\tSimpleObjectFieldSchema,\n\tSimpleRecordNodeSchema,\n\tSimpleAllowedTypeAttributes,\n\tSchemaType,\n} from \"./simpleSchema.js\";\nexport {\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\tFieldKind,\n\tFieldSchema,\n\tFieldSchemaAlpha,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype DefaultProvider,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\tareFieldSchemaEqual,\n\tareImplicitFieldSchemaEqual,\n\ttype ApplyKind,\n\ttype FieldSchemaMetadata,\n\ttype InsertableField,\n\ttype ApplyKindInput,\n\ttype ReadableField,\n\ttype ReadSchema,\n} from \"./fieldSchema.js\";\nexport { tryGetTreeNodeForField } from \"./getTreeNodeForField.js\";\nexport {\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodeCustomizableSchemaAlpha,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\tasIndex,\n\tisArrayNodeSchema,\n\tIterableTreeArrayContent,\n\ttype ReadonlyArrayNode,\n\tTreeArrayNode,\n\ttype TreeArrayNodeAlpha,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\tisMapNodeSchema,\n\ttype TreeMapNode,\n\ttype TreeMapNodeAlpha,\n\ttype MapNodeInsertableData,\n\ttype FieldHasDefault,\n\ttype FieldHasDefaultAlpha,\n\ttype InsertableObjectFromSchemaRecord,\n\ttype InsertableObjectFromSchemaRecordAlpha,\n\ttype ObjectFromSchemaRecord,\n\tObjectNodeSchema,\n\ttype ObjectNodeSchemaWorkaround,\n\ttype ObjectNodeSchemaPrivate,\n\tobjectSchema,\n\tisObjectNodeSchema,\n\ttype TreeObjectNode,\n\tsetField,\n\tisRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\tRecordNodeSchema,\n\ttype TreeRecordNode,\n\ttype ArrayPlaceAnchor,\n\tcreateArrayInsertionAnchor,\n} from \"./node-kinds/index.js\";\nexport {\n\tunhydratedFlexTreeFromInsertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n} from \"./unhydratedFlexTreeFromInsertable.js\";\nexport {\n\tprepareForInsertion,\n\tprepareForInsertionContextless,\n} from \"./prepareForInsertion.js\";\nexport {\n\ttoStoredSchema,\n\tconvertFieldKind,\n\ttoUpgradeSchema,\n\ttoInitialSchema,\n\ttoUnhydratedSchema,\n} from \"./toStoredSchema.js\";\nexport {\n\tnumberSchema,\n\tstringSchema,\n\tbooleanSchema,\n\thandleSchema,\n\tnullSchema,\n} from \"./leafNodeSchema.js\";\nexport type { LeafSchema, StringSchema } from \"./leafNodeSchema.js\";\nexport { getUnhydratedContext } from \"./createContext.js\";\nexport { type TreeSchema, createTreeSchema } from \"./treeSchema.js\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/tree",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.118.1",
|
|
4
4
|
"description": "Distributed tree",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -101,17 +101,17 @@
|
|
|
101
101
|
"temp-directory": "nyc/.nyc_output"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
|
-
"@fluid-internal/client-utils": "~2.
|
|
105
|
-
"@fluidframework/core-interfaces": "~2.
|
|
106
|
-
"@fluidframework/core-utils": "~2.
|
|
107
|
-
"@fluidframework/datastore-definitions": "~2.
|
|
108
|
-
"@fluidframework/driver-definitions": "~2.
|
|
109
|
-
"@fluidframework/id-compressor": "~2.
|
|
110
|
-
"@fluidframework/runtime-definitions": "~2.
|
|
111
|
-
"@fluidframework/runtime-utils": "~2.
|
|
112
|
-
"@fluidframework/shared-object-base": "~2.
|
|
113
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
114
|
-
"@fluidframework/type-factory": "~2.
|
|
104
|
+
"@fluid-internal/client-utils": "~2.118.1",
|
|
105
|
+
"@fluidframework/core-interfaces": "~2.118.1",
|
|
106
|
+
"@fluidframework/core-utils": "~2.118.1",
|
|
107
|
+
"@fluidframework/datastore-definitions": "~2.118.1",
|
|
108
|
+
"@fluidframework/driver-definitions": "~2.118.1",
|
|
109
|
+
"@fluidframework/id-compressor": "~2.118.1",
|
|
110
|
+
"@fluidframework/runtime-definitions": "~2.118.1",
|
|
111
|
+
"@fluidframework/runtime-utils": "~2.118.1",
|
|
112
|
+
"@fluidframework/shared-object-base": "~2.118.1",
|
|
113
|
+
"@fluidframework/telemetry-utils": "~2.118.1",
|
|
114
|
+
"@fluidframework/type-factory": "~2.118.1",
|
|
115
115
|
"@sinclair/typebox": "^0.34.13",
|
|
116
116
|
"@tylerbu/sorted-btree-es6": "^2.1.1",
|
|
117
117
|
"semver-ts": "^1.0.3",
|
|
@@ -121,21 +121,21 @@
|
|
|
121
121
|
"devDependencies": {
|
|
122
122
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
123
123
|
"@biomejs/biome": "~2.4.5",
|
|
124
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
125
|
-
"@fluid-private/stochastic-test-utils": "~2.
|
|
126
|
-
"@fluid-private/test-dds-utils": "~2.
|
|
127
|
-
"@fluid-private/test-drivers": "~2.
|
|
124
|
+
"@fluid-internal/mocha-test-setup": "~2.118.1",
|
|
125
|
+
"@fluid-private/stochastic-test-utils": "~2.118.1",
|
|
126
|
+
"@fluid-private/test-dds-utils": "~2.118.1",
|
|
127
|
+
"@fluid-private/test-drivers": "~2.118.1",
|
|
128
128
|
"@fluid-tools/benchmark": "^0.59.0",
|
|
129
129
|
"@fluid-tools/build-cli": "^0.67.0",
|
|
130
130
|
"@fluidframework/build-common": "^2.0.3",
|
|
131
131
|
"@fluidframework/build-tools": "^0.67.0",
|
|
132
|
-
"@fluidframework/container-definitions": "~2.
|
|
133
|
-
"@fluidframework/container-loader": "~2.
|
|
134
|
-
"@fluidframework/container-runtime": "~2.
|
|
132
|
+
"@fluidframework/container-definitions": "~2.118.1",
|
|
133
|
+
"@fluidframework/container-loader": "~2.118.1",
|
|
134
|
+
"@fluidframework/container-runtime": "~2.118.1",
|
|
135
135
|
"@fluidframework/eslint-config-fluid": "^14.0.0",
|
|
136
|
-
"@fluidframework/local-driver": "~2.
|
|
137
|
-
"@fluidframework/test-runtime-utils": "~2.
|
|
138
|
-
"@fluidframework/test-utils": "~2.
|
|
136
|
+
"@fluidframework/local-driver": "~2.118.1",
|
|
137
|
+
"@fluidframework/test-runtime-utils": "~2.118.1",
|
|
138
|
+
"@fluidframework/test-utils": "~2.118.1",
|
|
139
139
|
"@fluidframework/tree-previous": "npm:@fluidframework/tree@2.116.0",
|
|
140
140
|
"@microsoft/api-extractor": "7.58.1",
|
|
141
141
|
"@types/diff": "^3.5.1",
|
package/src/entrypoints/alpha.ts
CHANGED
|
@@ -121,6 +121,8 @@ export {
|
|
|
121
121
|
PopUnion,
|
|
122
122
|
RecordNodeInsertableData,
|
|
123
123
|
RunTransactionParamsBeta,
|
|
124
|
+
SchemaCompatibilityStatusBeta,
|
|
125
|
+
SchemaDiscrepancy,
|
|
124
126
|
SchemaFactoryBeta,
|
|
125
127
|
SchemaStaticsBeta,
|
|
126
128
|
SchemaUpgrade,
|
|
@@ -281,6 +283,7 @@ export {
|
|
|
281
283
|
SimpleTreeSchema,
|
|
282
284
|
StagedSchemaUpgradePolicy,
|
|
283
285
|
StagedSchemaUpgradePolicyFactory,
|
|
286
|
+
StagedUpgradeStatus,
|
|
284
287
|
StringSchema,
|
|
285
288
|
TransactionCallbackStatusAlpha,
|
|
286
289
|
TransactionConstraintAlpha,
|
package/src/entrypoints/beta.ts
CHANGED
|
@@ -3,8 +3,16 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
appendDebugMessage,
|
|
8
|
+
unreachableCase,
|
|
9
|
+
fail,
|
|
10
|
+
} from "@fluidframework/core-utils/internal";
|
|
11
|
+
import type {
|
|
12
|
+
ITelemetryBaseProperties,
|
|
13
|
+
TelemetryBaseEventPropertyType,
|
|
14
|
+
} from "@fluidframework/core-interfaces";
|
|
15
|
+
import { tagSchemaArtifacts, UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
8
16
|
|
|
9
17
|
import {
|
|
10
18
|
type TreeFieldStoredSchema,
|
|
@@ -13,6 +21,7 @@ import {
|
|
|
13
21
|
MapNodeStoredSchema,
|
|
14
22
|
Multiplicity,
|
|
15
23
|
type SchemaAndPolicy,
|
|
24
|
+
ValueSchema,
|
|
16
25
|
} from "../core/index.js";
|
|
17
26
|
import { iterableHasSome, mapIterable } from "../util/index.js";
|
|
18
27
|
|
|
@@ -33,83 +42,137 @@ export enum SchemaValidationError {
|
|
|
33
42
|
}
|
|
34
43
|
|
|
35
44
|
/**
|
|
36
|
-
*
|
|
37
|
-
* @remarks
|
|
38
|
-
* Not all fields are populated for every error type — only those relevant to the specific error.
|
|
45
|
+
* Information about a schema validation error.
|
|
39
46
|
*/
|
|
40
|
-
export interface
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
readonly nodeType?: string;
|
|
45
|
-
/**
|
|
46
|
-
* The set of type identifiers allowed in the field, if applicable.
|
|
47
|
-
*/
|
|
48
|
-
readonly allowedTypes?: ReadonlySet<string>;
|
|
49
|
-
/**
|
|
50
|
-
* Field keys on the node that were not recognized by its schema.
|
|
51
|
-
*/
|
|
52
|
-
readonly unexpectedFields?: ReadonlySet<string>;
|
|
47
|
+
export interface SchemaValidationErrorDetails {
|
|
48
|
+
readonly error: SchemaValidationError;
|
|
49
|
+
readonly path: readonly (string | number)[];
|
|
50
|
+
readonly telemetryProperties?: ITelemetryBaseProperties;
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
/**
|
|
56
54
|
* Throws a UsageError indicating a tree is out of schema.
|
|
57
55
|
*/
|
|
58
|
-
export function throwOutOfSchema(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
)
|
|
62
|
-
|
|
56
|
+
export function throwOutOfSchema(details: SchemaValidationErrorDetails): never {
|
|
57
|
+
const message = `Tree does not conform to schema. ${getSchemaValidationErrorMessage(details.error)}`;
|
|
58
|
+
throw new UsageError(
|
|
59
|
+
appendDebugMessage(message, () => getSchemaValidationDebugMessage(details)),
|
|
60
|
+
{
|
|
61
|
+
...tagSchemaArtifacts({
|
|
62
|
+
schemaValidationError: SchemaValidationError[details.error],
|
|
63
|
+
schemaValidationPath: JSON.stringify(details.path),
|
|
64
|
+
}),
|
|
65
|
+
...details.telemetryProperties,
|
|
66
|
+
},
|
|
67
|
+
);
|
|
63
68
|
}
|
|
64
69
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
function getTelemetryProperty(
|
|
71
|
+
details: SchemaValidationErrorDetails,
|
|
72
|
+
key: string,
|
|
73
|
+
): TelemetryBaseEventPropertyType {
|
|
74
|
+
const property = details.telemetryProperties?.[key];
|
|
75
|
+
return typeof property === "object" ? property.value : property;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function getSchemaValidationDebugMessage(details: SchemaValidationErrorDetails): string {
|
|
79
|
+
const path = details.path.length === 0 ? "" : ` at path ${JSON.stringify(details.path)}`;
|
|
80
|
+
const nodeType = getTelemetryProperty(details, "nodeType");
|
|
81
|
+
const fieldKind = getTelemetryProperty(details, "fieldKind");
|
|
82
|
+
const childCount = getTelemetryProperty(details, "childCount");
|
|
83
|
+
switch (details.error) {
|
|
84
|
+
case SchemaValidationError.Field_KindNotInSchemaPolicy: {
|
|
85
|
+
return `Field kind ${JSON.stringify(fieldKind)} is not supported by the schema policy${path}.`;
|
|
86
|
+
}
|
|
87
|
+
case SchemaValidationError.Field_MissingRequiredChild: {
|
|
88
|
+
return `A required field of kind ${JSON.stringify(fieldKind)} must contain exactly one child, but found ${childCount}${path}.`;
|
|
89
|
+
}
|
|
90
|
+
case SchemaValidationError.Field_MultipleChildrenNotAllowed: {
|
|
91
|
+
return `A field of kind ${JSON.stringify(fieldKind)} allows at most one child, but found ${childCount}${path}.`;
|
|
92
|
+
}
|
|
93
|
+
case SchemaValidationError.Field_ChildInForbiddenField: {
|
|
94
|
+
return `A forbidden field of kind ${JSON.stringify(fieldKind)} must be empty, but found ${childCount} ${childCount === 1 ? "child" : "children"}${path}.`;
|
|
95
|
+
}
|
|
71
96
|
case SchemaValidationError.Field_NodeTypeNotAllowed: {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
97
|
+
return `A node of type ${JSON.stringify(nodeType)} is not allowed in this field${path}. Allowed types: ${getTelemetryProperty(details, "allowedTypes")}. If using a staged allowed type, upgrade the stored schema before inserting this content.`;
|
|
98
|
+
}
|
|
99
|
+
case SchemaValidationError.LeafNode_InvalidValue: {
|
|
100
|
+
return `Leaf node ${JSON.stringify(nodeType)} requires a value matching ${JSON.stringify(getTelemetryProperty(details, "expectedValueType"))}, but found ${JSON.stringify(getTelemetryProperty(details, "actualValueType"))}${path}.`;
|
|
101
|
+
}
|
|
102
|
+
case SchemaValidationError.LeafNode_FieldsNotAllowed: {
|
|
103
|
+
return `Leaf node ${JSON.stringify(nodeType)} must not contain fields${path}. Unexpected fields: ${getTelemetryProperty(details, "unexpectedFields")}.`;
|
|
104
|
+
}
|
|
105
|
+
case SchemaValidationError.ObjectNode_FieldNotInSchema: {
|
|
106
|
+
return `A node of type ${JSON.stringify(nodeType)} has fields not defined in its schema${path}. Unexpected fields: ${getTelemetryProperty(details, "unexpectedFields")}.`;
|
|
107
|
+
}
|
|
108
|
+
case SchemaValidationError.NonLeafNode_ValueNotAllowed: {
|
|
109
|
+
return `Non-leaf node ${JSON.stringify(nodeType)} must not have a value, but found ${JSON.stringify(getTelemetryProperty(details, "actualValueType"))}${path}.`;
|
|
83
110
|
}
|
|
84
111
|
case SchemaValidationError.Node_MissingSchema: {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
112
|
+
return `No schema definition was found for node type ${JSON.stringify(nodeType)}${path}. Ensure the node's type is included in the schema and that the stored schema has been upgraded if needed.`;
|
|
113
|
+
}
|
|
114
|
+
default: {
|
|
115
|
+
return unreachableCase(details.error);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function getSchemaValidationErrorMessage(error: SchemaValidationError): string {
|
|
121
|
+
switch (error) {
|
|
122
|
+
case SchemaValidationError.Field_KindNotInSchemaPolicy: {
|
|
123
|
+
return "The field kind is not supported by the schema policy.";
|
|
124
|
+
}
|
|
125
|
+
case SchemaValidationError.Field_MissingRequiredChild: {
|
|
126
|
+
return "A required field is missing its child.";
|
|
127
|
+
}
|
|
128
|
+
case SchemaValidationError.Field_MultipleChildrenNotAllowed: {
|
|
129
|
+
return "A field contains more children than its kind allows.";
|
|
130
|
+
}
|
|
131
|
+
case SchemaValidationError.Field_ChildInForbiddenField: {
|
|
132
|
+
return "A forbidden field contains children.";
|
|
133
|
+
}
|
|
134
|
+
case SchemaValidationError.Field_NodeTypeNotAllowed: {
|
|
135
|
+
return "A node type is not allowed in its field.";
|
|
136
|
+
}
|
|
137
|
+
case SchemaValidationError.LeafNode_InvalidValue: {
|
|
138
|
+
return "A leaf node value does not match its schema.";
|
|
139
|
+
}
|
|
140
|
+
case SchemaValidationError.LeafNode_FieldsNotAllowed: {
|
|
141
|
+
return "A leaf node contains fields.";
|
|
91
142
|
}
|
|
92
143
|
case SchemaValidationError.ObjectNode_FieldNotInSchema: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
? "The node has fields that are not defined in its schema."
|
|
101
|
-
: `Unexpected fields: ${fieldsDesc}.`;
|
|
102
|
-
return (
|
|
103
|
-
`Tree does not conform to schema. ` +
|
|
104
|
-
`A node of type ${nodeDesc} has fields not defined in its schema. ${fieldsPart}`
|
|
105
|
-
);
|
|
144
|
+
return "An object node contains fields not defined in its schema.";
|
|
145
|
+
}
|
|
146
|
+
case SchemaValidationError.NonLeafNode_ValueNotAllowed: {
|
|
147
|
+
return "A non-leaf node contains a value.";
|
|
148
|
+
}
|
|
149
|
+
case SchemaValidationError.Node_MissingSchema: {
|
|
150
|
+
return "The node type has no schema definition.";
|
|
106
151
|
}
|
|
107
152
|
default: {
|
|
108
|
-
return
|
|
153
|
+
return unreachableCase(error);
|
|
109
154
|
}
|
|
110
155
|
}
|
|
111
156
|
}
|
|
112
157
|
|
|
158
|
+
function schemaValidationError(
|
|
159
|
+
error: SchemaValidationError,
|
|
160
|
+
telemetryProperties?: ITelemetryBaseProperties,
|
|
161
|
+
): SchemaValidationErrorDetails {
|
|
162
|
+
return { error, path: [], telemetryProperties };
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function prependPath<T extends NotUndefined>(
|
|
166
|
+
onError: (details: SchemaValidationErrorDetails) => T,
|
|
167
|
+
segment: string | number,
|
|
168
|
+
): (details: SchemaValidationErrorDetails) => T {
|
|
169
|
+
return (details) => onError({ ...details, path: [segment, ...details.path] });
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function getValueType(value: unknown): string {
|
|
173
|
+
return value === null ? "null" : typeof value;
|
|
174
|
+
}
|
|
175
|
+
|
|
113
176
|
type NotUndefined = number | string | boolean | bigint | symbol | object;
|
|
114
177
|
|
|
115
178
|
/**
|
|
@@ -122,28 +185,52 @@ type NotUndefined = number | string | boolean | bigint | symbol | object;
|
|
|
122
185
|
export function isNodeInSchema<T extends NotUndefined>(
|
|
123
186
|
node: MinimalMapTreeNodeView,
|
|
124
187
|
schemaAndPolicy: SchemaAndPolicy,
|
|
125
|
-
onError: (
|
|
188
|
+
onError: (details: SchemaValidationErrorDetails) => T,
|
|
126
189
|
): T | undefined {
|
|
127
190
|
// Validate the schema declared by the node exists
|
|
128
191
|
const schema = schemaAndPolicy.schema.nodeSchema.get(node.type);
|
|
129
192
|
if (schema === undefined) {
|
|
130
|
-
return onError(
|
|
131
|
-
|
|
132
|
-
|
|
193
|
+
return onError(
|
|
194
|
+
schemaValidationError(
|
|
195
|
+
SchemaValidationError.Node_MissingSchema,
|
|
196
|
+
tagSchemaArtifacts({ nodeType: node.type }),
|
|
197
|
+
),
|
|
198
|
+
);
|
|
133
199
|
}
|
|
134
200
|
|
|
135
201
|
// Validate the node is well formed according to its schema
|
|
136
202
|
|
|
137
203
|
if (schema instanceof LeafNodeStoredSchema) {
|
|
138
204
|
if (iterableHasSome(node.fields)) {
|
|
139
|
-
|
|
205
|
+
const unexpectedFields = [...mapIterable(node.fields, ([key]) => key)].sort();
|
|
206
|
+
return onError(
|
|
207
|
+
schemaValidationError(SchemaValidationError.LeafNode_FieldsNotAllowed, {
|
|
208
|
+
...tagSchemaArtifacts({
|
|
209
|
+
nodeType: node.type,
|
|
210
|
+
unexpectedFields: JSON.stringify(unexpectedFields),
|
|
211
|
+
}),
|
|
212
|
+
}),
|
|
213
|
+
);
|
|
140
214
|
}
|
|
141
215
|
if (!allowsValue(schema.leafValue, node.value)) {
|
|
142
|
-
return onError(
|
|
216
|
+
return onError(
|
|
217
|
+
schemaValidationError(SchemaValidationError.LeafNode_InvalidValue, {
|
|
218
|
+
...tagSchemaArtifacts({
|
|
219
|
+
nodeType: node.type,
|
|
220
|
+
expectedValueType: ValueSchema[schema.leafValue],
|
|
221
|
+
}),
|
|
222
|
+
actualValueType: getValueType(node.value),
|
|
223
|
+
}),
|
|
224
|
+
);
|
|
143
225
|
}
|
|
144
226
|
} else {
|
|
145
227
|
if (node.value !== undefined) {
|
|
146
|
-
return onError(
|
|
228
|
+
return onError(
|
|
229
|
+
schemaValidationError(SchemaValidationError.NonLeafNode_ValueNotAllowed, {
|
|
230
|
+
...tagSchemaArtifacts({ nodeType: node.type }),
|
|
231
|
+
actualValueType: getValueType(node.value),
|
|
232
|
+
}),
|
|
233
|
+
);
|
|
147
234
|
}
|
|
148
235
|
|
|
149
236
|
if (schema instanceof ObjectNodeStoredSchema) {
|
|
@@ -154,7 +241,7 @@ export function isNodeInSchema<T extends NotUndefined>(
|
|
|
154
241
|
nodeField,
|
|
155
242
|
fieldSchema,
|
|
156
243
|
schemaAndPolicy,
|
|
157
|
-
onError,
|
|
244
|
+
prependPath(onError, fieldKey),
|
|
158
245
|
);
|
|
159
246
|
if (fieldInSchemaResult !== undefined) {
|
|
160
247
|
return fieldInSchemaResult;
|
|
@@ -166,18 +253,22 @@ export function isNodeInSchema<T extends NotUndefined>(
|
|
|
166
253
|
// Code using this with a stored schema derived from a view schema rather than the document can be problematic because it may be missing unknown fields that the actual document has.
|
|
167
254
|
// Other schema evolution features like "staged" allowed types will likely cause similar issues elsewhere in this checker.
|
|
168
255
|
if (uncheckedFieldsFromNode.size > 0) {
|
|
169
|
-
return onError(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
256
|
+
return onError(
|
|
257
|
+
schemaValidationError(SchemaValidationError.ObjectNode_FieldNotInSchema, {
|
|
258
|
+
...tagSchemaArtifacts({
|
|
259
|
+
nodeType: node.type,
|
|
260
|
+
unexpectedFields: JSON.stringify([...uncheckedFieldsFromNode].sort()),
|
|
261
|
+
}),
|
|
262
|
+
}),
|
|
263
|
+
);
|
|
173
264
|
}
|
|
174
265
|
} else if (schema instanceof MapNodeStoredSchema) {
|
|
175
|
-
for (const [
|
|
266
|
+
for (const [key, field] of node.fields) {
|
|
176
267
|
const fieldInSchemaResult = isFieldInSchema(
|
|
177
268
|
field,
|
|
178
269
|
schema.mapFields,
|
|
179
270
|
schemaAndPolicy,
|
|
180
|
-
onError,
|
|
271
|
+
prependPath(onError, key),
|
|
181
272
|
);
|
|
182
273
|
if (fieldInSchemaResult !== undefined) {
|
|
183
274
|
return fieldInSchemaResult;
|
|
@@ -202,36 +293,61 @@ export function isFieldInSchema<T extends NotUndefined>(
|
|
|
202
293
|
childNodes: MapTreeFieldViewGeneric<MinimalMapTreeNodeView>,
|
|
203
294
|
schema: TreeFieldStoredSchema,
|
|
204
295
|
schemaAndPolicy: SchemaAndPolicy,
|
|
205
|
-
onError: (
|
|
296
|
+
onError: (details: SchemaValidationErrorDetails) => T,
|
|
206
297
|
): T | undefined {
|
|
207
298
|
// Validate that the field kind is handled by the schema policy
|
|
208
299
|
const kind = schemaAndPolicy.policy.fieldKinds.get(schema.kind);
|
|
209
300
|
if (kind === undefined) {
|
|
210
|
-
return onError(
|
|
301
|
+
return onError(
|
|
302
|
+
schemaValidationError(
|
|
303
|
+
SchemaValidationError.Field_KindNotInSchemaPolicy,
|
|
304
|
+
tagSchemaArtifacts({ fieldKind: schema.kind }),
|
|
305
|
+
),
|
|
306
|
+
);
|
|
211
307
|
}
|
|
212
308
|
|
|
213
309
|
// Validate that the field doesn't contain more nodes than its type supports
|
|
214
310
|
{
|
|
215
311
|
const multiplicityCheck = compliesWithMultiplicity(childNodes.length, kind.multiplicity);
|
|
216
312
|
if (multiplicityCheck !== undefined) {
|
|
217
|
-
return onError(
|
|
313
|
+
return onError(
|
|
314
|
+
schemaValidationError(multiplicityCheck, {
|
|
315
|
+
...tagSchemaArtifacts({ fieldKind: schema.kind }),
|
|
316
|
+
childCount: childNodes.length,
|
|
317
|
+
}),
|
|
318
|
+
);
|
|
218
319
|
}
|
|
219
320
|
}
|
|
220
321
|
|
|
322
|
+
let index = 0;
|
|
221
323
|
for (const node of childNodes) {
|
|
222
324
|
// Validate the type declared by the node is allowed in this field
|
|
223
325
|
if (schema.types !== undefined && !schema.types.has(node.type)) {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
326
|
+
const allowedTypes = [...schema.types].sort();
|
|
327
|
+
return prependPath(
|
|
328
|
+
onError,
|
|
329
|
+
index,
|
|
330
|
+
)(
|
|
331
|
+
schemaValidationError(
|
|
332
|
+
SchemaValidationError.Field_NodeTypeNotAllowed,
|
|
333
|
+
tagSchemaArtifacts({
|
|
334
|
+
nodeType: node.type,
|
|
335
|
+
allowedTypes: JSON.stringify(allowedTypes),
|
|
336
|
+
}),
|
|
337
|
+
),
|
|
338
|
+
);
|
|
228
339
|
}
|
|
229
340
|
|
|
230
341
|
// Validate the node complies with the type it declares to be.
|
|
231
|
-
const nodeInSchemaResult = isNodeInSchema(
|
|
342
|
+
const nodeInSchemaResult = isNodeInSchema(
|
|
343
|
+
node,
|
|
344
|
+
schemaAndPolicy,
|
|
345
|
+
prependPath(onError, index),
|
|
346
|
+
);
|
|
232
347
|
if (nodeInSchemaResult !== undefined) {
|
|
233
348
|
return nodeInSchemaResult;
|
|
234
349
|
}
|
|
350
|
+
index += 1;
|
|
235
351
|
}
|
|
236
352
|
|
|
237
353
|
return undefined;
|
package/src/index.ts
CHANGED
|
@@ -137,6 +137,8 @@ export {
|
|
|
137
137
|
type TreeNodeFromImplicitAllowedTypes,
|
|
138
138
|
type TreeNodeSchemaClass,
|
|
139
139
|
type SchemaCompatibilityStatus,
|
|
140
|
+
type SchemaCompatibilityStatusBeta,
|
|
141
|
+
type SchemaDiscrepancy,
|
|
140
142
|
type FieldProps,
|
|
141
143
|
type FieldPropsAlpha,
|
|
142
144
|
normalizeFieldSchema,
|
|
@@ -198,6 +200,7 @@ export {
|
|
|
198
200
|
singletonSchema,
|
|
199
201
|
type UnsafeUnknownSchema,
|
|
200
202
|
type TreeViewAlpha,
|
|
203
|
+
type StagedUpgradeStatus,
|
|
201
204
|
type TreeViewBeta,
|
|
202
205
|
type InsertableField,
|
|
203
206
|
type Insertable,
|
package/src/packageVersion.ts
CHANGED