@fluidframework/tree 3.0.0 → 3.0.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/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +1 -1
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +2 -3
- 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 +1 -1
- package/dist/simple-tree/core/toStored.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.js +1 -1
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +2 -3
- 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 +1 -1
- package/lib/simple-tree/core/toStored.js.map +1 -1
- package/package.json +22 -22
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/schematizingTreeView.ts +1 -1
- package/src/simple-tree/api/schemaCompatibilityTester.ts +2 -1
- package/src/simple-tree/api/tree.ts +2 -3
- package/src/simple-tree/core/toStored.ts +1 -1
package/dist/packageVersion.d.ts
CHANGED
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/tree";
|
|
11
|
-
exports.pkgVersion = "3.0.
|
|
11
|
+
exports.pkgVersion = "3.0.1";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sBAAsB,CAAC;AACjC,QAAA,UAAU,GAAG,OAAO,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tree\";\nexport const pkgVersion = \"3.0.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sBAAsB,CAAC;AACjC,QAAA,UAAU,GAAG,OAAO,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tree\";\nexport const pkgVersion = \"3.0.1\";\n"]}
|
|
@@ -210,7 +210,7 @@ let SchematizingSimpleTreeView = (() => {
|
|
|
210
210
|
}
|
|
211
211
|
get effectiveUpgradePolicy() {
|
|
212
212
|
const configuredPolicy = this.stagedUpgradePolicy;
|
|
213
|
-
if (configuredPolicy.includeAlreadyEnabledUpgrades
|
|
213
|
+
if (configuredPolicy.includeAlreadyEnabledUpgrades !== true) {
|
|
214
214
|
return configuredPolicy;
|
|
215
215
|
}
|
|
216
216
|
const enabledUpgrades = this.currentEnabledUpgrades;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematizingTreeView.js","sourceRoot":"","sources":["../../src/shared-tree/schematizingTreeView.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,+DAA6D;AAM7D,kEAA6D;AAC7D,uEAA0F;AAE1F,+CAAuF;AACvF,4DAWuC;AACvC,sDAsCiC;AACjC,+CAM0B;AAE1B,2DAAsF;AAGtF;;;GAGG;AACU,QAAA,QAAQ,GAAG,IAAA,qBAAU,GAAoB,CAAC;AAEvD,SAAS,2BAA2B,CAAC,aAA4C;IAChF,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;QAC3B,OAAO;IACR,CAAC;IAED,MAAM,UAAU,GAAG,aAAa,CAAC,aAAa;QAC7C,CAAC,CAAC,oGAAoG;QACtG,CAAC,CAAC,aAAa,CAAC,UAAU;YACzB,CAAC,CAAC,2GAA2G;YAC7G,CAAC,CAAC,gIAAgI,CAAC;IACrI,MAAM,IAAI,qBAAU,CACnB,gGAAgG,UAAU,EAAE,EAC5G,IAAA,6BAAkB,EAAC;QAClB,4BAA4B,EAC3B,aAAa,CAAC,aAAa,KAAK,SAAS;YACxC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC;KAC/C,CAAC,CACF,CAAC;AACH,CAAC;AAED;;GAEG;IAEU,0BAA0B;4BADtC,wBAAa;;;;;;;;YACd,qLAmhBC;;;YAnhBY,+DAA0B;;QA6DrB,QAAQ;QACR,MAAM;QACN,cAAc;QACb,SAAS;QA5D3B;;;;WAIG;QACK,eAAe,CAAsB;QAE7C;;WAEG;QACK,oBAAoB,CAA4C;QACxE;;;WAGG;QACK,sBAAsB,CAA8D;QAC5E,MAAM,GAE6B,IAAA,4BAAa,GAAE,CAAC;QAEnE;;WAEG;QACc,UAAU,CAAa;QACxC;;WAEG;QACc,mBAAmB,CAA4B;QAEhE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,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC;QAED,uBAAuB;QAEvB,IAAW,aAAa;YACvB,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;QACpC,CAAC;;;;AAlhBW,gEAA0B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type {\n\tHasListeners,\n\tIEmitter,\n\tListenable,\n} from \"@fluidframework/core-interfaces/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { tagSchemaArtifacts, UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { anchorSlot, rootFieldKey, type RevertToOptionsAlpha } from \"../core/index.js\";\nimport {\n\ttype NodeIdentifierManager,\n\tdefaultSchemaPolicy,\n\tcursorForMapTreeField,\n\tContext,\n\tcombineChunks,\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeUnknownUnboxed,\n\tFieldKinds,\n\ttype FlexTreeRequiredField,\n\tallowsRepoSuperset,\n} from \"../feature-libraries/index.js\";\nimport {\n\ttype ImplicitFieldSchema,\n\ttype SchemaCompatibilityStatusBeta,\n\ttype TreeContextAlpha,\n\ttype TreeViewEvents,\n\ttryGetTreeNodeForField,\n\tsetField,\n\tnormalizeFieldSchema,\n\tcheckSchemaCompatibility,\n\ttype InsertableContent,\n\ttype StagedSchemaUpgradePolicy,\n\ttype TreeViewConfiguration,\n\ttype TreeViewAlpha,\n\ttype InsertableField,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeBranchEvents,\n\ttype VoidTransactionCallbackStatusAlpha,\n\ttype TransactionCallbackStatusAlpha,\n\ttype TransactionVoidResult,\n\ttype TransactionValueResult,\n\ttype RunTransactionParamsAlpha,\n\tHydratedContext,\n\tSimpleContextSlot,\n\tareImplicitFieldSchemaEqual,\n\tprepareForInsertionContextless,\n\ttype FieldSchema,\n\ttryDisposeTreeNode,\n\tFieldSchemaAlpha,\n\tTreeViewConfigurationAlpha,\n\ttoInitialSchema,\n\ttoUpgradeSchema,\n\ttype TreeBranchHistory,\n\ttype UntypedTreeViewAlpha,\n\ttype TreeSchema,\n\ttype SchemaUpgrade,\n\ttype StagedUpgradeStatus,\n} from \"../simple-tree/index.js\";\nimport {\n\ttype Breakable,\n\tbreakingClass,\n\tdisposeSymbol,\n\ttype JsonCompatibleReadOnly,\n\ttype WithBreakable,\n} from \"../util/index.js\";\n\nimport { canInitialize, initialize, initializerFromChunk } from \"./schematizeTree.js\";\nimport type { TreeCheckout } from \"./treeCheckout.js\";\n\n/**\n * Creating multiple tree views from the same checkout is not supported. This slot is used to detect if one already\n * exists and error if creating a second.\n */\nexport const ViewSlot = anchorSlot<TreeContextAlpha>();\n\nfunction throwIfSchemaIsIncompatible(compatibility: SchemaCompatibilityStatusBeta): void {\n\tif (compatibility.canView) {\n\t\treturn;\n\t}\n\n\tconst resolution = compatibility.canInitialize\n\t\t? \"The document is uninitialized; call TreeView.initialize() before reading or writing TreeView.root.\"\n\t\t: compatibility.canUpgrade\n\t\t\t? \"The stored schema can be upgraded; call TreeView.upgradeSchema() before reading or writing TreeView.root.\"\n\t\t\t: \"The schemas cannot be upgraded automatically. Use a compatible view schema or explicitly migrate the document schema and data.\";\n\tthrow new UsageError(\n\t\t`TreeView.root is unavailable because the view schema is incompatible with the stored schema. ${resolution}`,\n\t\ttagSchemaArtifacts({\n\t\t\tschemaIncompatibilityDetails:\n\t\t\t\tcompatibility.discrepancies === undefined\n\t\t\t\t\t? undefined\n\t\t\t\t\t: JSON.stringify(compatibility.discrepancies),\n\t\t}),\n\t);\n}\n\n/**\n * Implementation of TreeView wrapping a FlexTreeView.\n */\n@breakingClass\nexport class SchematizingSimpleTreeView<\n\tin out TRootSchema extends ImplicitFieldSchema | UnsafeUnknownSchema,\n> implements TreeViewAlpha<TRootSchema>, WithBreakable\n{\n\t/**\n\t * This is set to undefined when this object is disposed or the view schema does not support viewing the document's stored schema.\n\t *\n\t * The view schema may be incompatible with the stored schema. Use `compatibility` to check.\n\t */\n\tprivate flexTreeContext: Context | undefined;\n\n\t/**\n\t * Undefined if and only if uninitialized or disposed.\n\t */\n\tprivate currentCompatibility: SchemaCompatibilityStatusBeta | undefined;\n\t/**\n\t * Cached map of upgrade statuses, computed alongside compatibility.\n\t * @remarks Undefined if and only if uninitialized or disposed.\n\t */\n\tprivate currentEnabledUpgrades: ReadonlyMap<SchemaUpgrade, StagedUpgradeStatus> | undefined;\n\tpublic readonly events: Listenable<TreeViewEvents & TreeBranchEvents> &\n\t\tIEmitter<TreeViewEvents & TreeBranchEvents> &\n\t\tHasListeners<TreeViewEvents & TreeBranchEvents> = createEmitter();\n\n\t/**\n\t * The schema for this view, captured at construction time for compatibility checking.\n\t */\n\tprivate readonly viewSchema: TreeSchema;\n\t/**\n\t * Stored-schema generation policy from the view configuration, frozen at construction time.\n\t */\n\tprivate readonly stagedUpgradePolicy: StagedSchemaUpgradePolicy;\n\n\t/**\n\t * Events to unregister upon flex-tree view disposal.\n\t */\n\tprivate readonly flexTreeViewUnregisterCallbacks = new Set<() => void>();\n\n\t/**\n\t * Events to unregister upon disposal.\n\t */\n\tprivate readonly unregisterCallbacks = new Set<() => void>();\n\n\tpublic disposed = false;\n\t/**\n\t * This is set to true while an edit impacting the document schema is in progress.\n\t * This allows suppressing extra rootChanged / schemaChanged events until the edit concludes.\n\t * This is useful especially for some initialization edits, since document initialization can involve transient schemas\n\t * which are implementation details and should not be exposed to the user.\n\t */\n\tprivate midUpgrade = false;\n\n\t/**\n\t * Hydration work deferred until Context has been created.\n\t */\n\tprivate pendingHydration?: () => void;\n\n\tprivate readonly rootFieldSchema: FieldSchema;\n\tpublic readonly breaker: Breakable;\n\n\tpublic constructor(\n\t\tpublic readonly checkout: TreeCheckout,\n\t\tpublic readonly config: TreeViewConfiguration<ReadSchema<TRootSchema>>,\n\t\tpublic readonly nodeKeyManager: NodeIdentifierManager,\n\t\tprivate readonly onDispose?: () => void,\n\t) {\n\t\tthis.breaker = checkout.breaker;\n\t\tif (checkout.forest.anchors.slots.has(ViewSlot)) {\n\t\t\tthrow new UsageError(\"Cannot create a second tree view from the same checkout\");\n\t\t}\n\t\tcheckout.forest.anchors.slots.set(ViewSlot, this);\n\n\t\tthis.rootFieldSchema = normalizeFieldSchema(config.schema);\n\n\t\tconst stagedUpgradePolicy =\n\t\t\tconfig instanceof TreeViewConfigurationAlpha ? config.stagedUpgradePolicy : undefined;\n\t\tconst configAlpha = new TreeViewConfigurationAlpha({\n\t\t\t...config,\n\t\t\tstagedUpgradePolicy,\n\t\t});\n\t\tthis.stagedUpgradePolicy = configAlpha.stagedUpgradePolicy;\n\n\t\t// Store viewSchema directly from the configuration (TreeViewConfigurationAlpha implements TreeSchema)\n\t\tthis.viewSchema = configAlpha;\n\t\t// This must be initialized before `update` can be called.\n\t\tthis.currentCompatibility = {\n\t\t\tcanView: false,\n\t\t\tcanUpgrade: true,\n\t\t\tisEquivalent: false,\n\t\t\tcanInitialize: true,\n\t\t\tdiscrepancies: undefined,\n\t\t};\n\t\tthis.currentEnabledUpgrades = new Map();\n\t\tthis.update();\n\n\t\tthis.unregisterCallbacks.add(\n\t\t\tthis.checkout.events.on(\"changed\", (data, getRevertible) => {\n\t\t\t\tthis.events.emit(\"changed\", data, getRevertible);\n\t\t\t\tthis.events.emit(\"commitApplied\", data, getRevertible);\n\t\t\t}),\n\t\t);\n\t}\n\n\tpublic isBranch(): this is UntypedTreeViewAlpha {\n\t\treturn this.isView();\n\t}\n\n\tpublic isView(): this is UntypedTreeViewAlpha {\n\t\treturn true;\n\t}\n\n\tpublic applyChange(change: JsonCompatibleReadOnly): void {\n\t\tthis.checkout.applySerializedChange(change);\n\t}\n\n\tpublic hasRootSchema<TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t): this is TreeViewAlpha<TSchema> {\n\t\treturn areImplicitFieldSchemaEqual(this.rootFieldSchema, schema);\n\t}\n\n\tpublic get schema(): ReadSchema<TRootSchema> {\n\t\treturn this.config.schema;\n\t}\n\n\tpublic initialize(content: InsertableField<TRootSchema>): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (!compatibility.canInitialize) {\n\t\t\tthrow new UsageError(\"Tree cannot be initialized more than once.\");\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst schema = toInitialSchema(this.config.schema, this.stagedUpgradePolicy);\n\t\t\t// This has to be the contextless version, since when \"initialize\" is called (right after this),\n\t\t\t// it will do a schema change which would dispose of the current context (see inside `update`).\n\t\t\t// Thus using the current context (if any) would hydrate nodes then\n\t\t\t// immediately dispose them instead of having them actually be useable after initialize.\n\t\t\t// For this to work,\n\t\t\t// the hydration must be deferred until after the content is inserted into the tree and the final schema change is done (for required roots),\n\t\t\t// but before any user event could could run.\n\t\t\tconst mapTree = prepareForInsertionContextless(\n\t\t\t\tcontent as InsertableContent | undefined,\n\t\t\t\tthis.rootFieldSchema,\n\t\t\t\t{\n\t\t\t\t\tschema,\n\t\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t\t},\n\t\t\t\tthis,\n\t\t\t\tschema.rootFieldSchema,\n\t\t\t\t(batches, doHydration) => {\n\t\t\t\t\tassert(\n\t\t\t\t\t\tthis.pendingHydration === undefined,\n\t\t\t\t\t\t0xc74 /* pendingHydration already set */,\n\t\t\t\t\t);\n\t\t\t\t\tthis.pendingHydration = () => {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tbatches.length <= 1,\n\t\t\t\t\t\t\t0xc75 /* initialize should at most one hydration batch */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tfor (const batch of batches) {\n\t\t\t\t\t\t\tdoHydration(batch, {\n\t\t\t\t\t\t\t\tparent: undefined,\n\t\t\t\t\t\t\t\tparentField: rootFieldKey,\n\t\t\t\t\t\t\t\tparentIndex: 0,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tthis.runTransaction(() => {\n\t\t\t\tinitialize(\n\t\t\t\t\tthis.checkout,\n\t\t\t\t\tschema,\n\t\t\t\t\tinitializerFromChunk(this.checkout, () => {\n\t\t\t\t\t\t// This must be done after initial schema is set!\n\t\t\t\t\t\treturn combineChunks(\n\t\t\t\t\t\t\tthis.checkout.forest.chunkField(\n\t\t\t\t\t\t\t\tcursorForMapTreeField(mapTree === undefined ? [] : [mapTree]),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic upgradeSchema(): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst newSchema = toUpgradeSchema(this.viewSchema.root, this.effectiveUpgradePolicy);\n\t\tconst storedSchema = this.checkout.storedSchema.clone();\n\t\tif (!allowsRepoSuperset(defaultSchemaPolicy, storedSchema, newSchema)) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Existing stored schema cannot be upgraded to the requested schema (see TreeView.compatibility.canUpgrade).\",\n\t\t\t);\n\t\t}\n\t\tif (allowsRepoSuperset(defaultSchemaPolicy, newSchema, storedSchema)) {\n\t\t\t// No-op\n\t\t\treturn;\n\t\t}\n\n\t\tthis.runSchemaEdit(() => this.checkout.updateSchema(newSchema));\n\t}\n\n\tpublic isStagedUpgradeEnabled(upgrade: SchemaUpgrade): StagedUpgradeStatus {\n\t\tif (!this.currentEnabledUpgrades) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t\treturn this.currentEnabledUpgrades.get(upgrade) ?? \"disabled\";\n\t}\n\n\tprivate get effectiveUpgradePolicy(): StagedSchemaUpgradePolicy {\n\t\tconst configuredPolicy = this.stagedUpgradePolicy;\n\t\tif (configuredPolicy.includeAlreadyEnabledUpgrades === false) {\n\t\t\treturn configuredPolicy;\n\t\t}\n\t\tconst enabledUpgrades = this.currentEnabledUpgrades;\n\t\tassert(\n\t\t\tenabledUpgrades !== undefined,\n\t\t\t0xd3e /* Enabled upgrades must be available for an active view */,\n\t\t);\n\t\tif (enabledUpgrades.size === 0) {\n\t\t\treturn configuredPolicy;\n\t\t}\n\n\t\treturn {\n\t\t\tincludeStaged: (upgrade) =>\n\t\t\t\tconfiguredPolicy.includeStaged(upgrade) || enabledUpgrades.has(upgrade),\n\t\t\tincludeStagedOptional: (upgrade) =>\n\t\t\t\tconfiguredPolicy.includeStagedOptional(upgrade) || enabledUpgrades.has(upgrade),\n\t\t};\n\t}\n\n\t/**\n\t * Gets the flex-tree context. Throws when disposed or out of schema.\n\t */\n\tpublic getFlexTreeContext(): Context {\n\t\tthis.ensureUndisposed();\n\t\tassert(this.flexTreeContext !== undefined, 0x8c0 /* unexpected getViewOrError */);\n\t\treturn this.flexTreeContext;\n\t}\n\n\tpublic runTransaction<TSuccessValue, TFailureValue>(\n\t\ttransaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>,\n\t\tparams?: RunTransactionParamsAlpha,\n\t): TransactionValueResult<TSuccessValue, TFailureValue>;\n\tpublic runTransaction(\n\t\ttransaction: () => VoidTransactionCallbackStatusAlpha | void,\n\t\tparams?: RunTransactionParamsAlpha,\n\t): TransactionVoidResult;\n\tpublic runTransaction<TSuccessValue, TFailureValue>(\n\t\ttransaction: () =>\n\t\t\t| TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>\n\t\t\t| VoidTransactionCallbackStatusAlpha\n\t\t\t| void,\n\t\tparams?: RunTransactionParamsAlpha,\n\t): TransactionValueResult<TSuccessValue, TFailureValue> | TransactionVoidResult {\n\t\tthis.ensureUndisposed();\n\t\treturn this.checkout.runTransaction(transaction, params);\n\t}\n\n\tpublic runTransactionAsync<TSuccessValue, TFailureValue>(\n\t\ttransaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>,\n\t\tparams?: RunTransactionParamsAlpha,\n\t): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;\n\tpublic runTransactionAsync(\n\t\ttransaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>,\n\t\tparams?: RunTransactionParamsAlpha,\n\t): Promise<TransactionVoidResult>;\n\tpublic async runTransactionAsync<TSuccessValue, TFailureValue>(\n\t\ttransaction: () => Promise<\n\t\t\t| TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>\n\t\t\t| VoidTransactionCallbackStatusAlpha\n\t\t\t| void\n\t\t>,\n\t\tparams: RunTransactionParamsAlpha | undefined,\n\t): Promise<TransactionValueResult<TSuccessValue, TFailureValue> | TransactionVoidResult> {\n\t\tthis.ensureUndisposed();\n\t\tif (this.checkout.transaction.size > 0) {\n\t\t\t// breaker.break() sets brokenBy synchronously before throwing.\n\t\t\t// A plain `throw` inside an async function would be captured as a rejected Promise\n\t\t\t// before @breakingClass could set brokenBy. By setting it here first, the\n\t\t\t// subsequent call to unmountTransaction (also @breakingClass-wrapped) will see the\n\t\t\t// broken state and throw synchronously, propagating out of the outer runTransaction\n\t\t\t// to its caller.\n\t\t\tthis.breaker.break(\n\t\t\t\tnew UsageError(\n\t\t\t\t\t\"An asynchronous transaction cannot be started while another transaction is already in progress.\",\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\treturn this.checkout.runTransactionAsync(transaction, params);\n\t}\n\n\tprivate ensureUndisposed(): void {\n\t\tif (this.disposed) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t}\n\n\tprivate failDisposed(): never {\n\t\tthrow new UsageError(\"Accessed a disposed TreeView.\");\n\t}\n\n\t/**\n\t * Updates `this.view` and the current compatibility status.\n\t * Invoked during initialization and when `this.view` needs to be replaced due to stored schema changes.\n\t * Handles re-registering for events to call update in the future.\n\t * @remarks\n\t * This does not check if the view needs to be replaced, it replaces it unconditionally:\n\t * callers should do any checking to detect if it's really needed before calling `update`.\n\t * @privateRemarks\n\t * This implementation avoids making any edits, which prevents it from being invoked reentrantly.\n\t * If implicit initialization (or some other edit) is desired, it should be done outside of this method.\n\t */\n\tprivate update(): void {\n\t\tthis.disposeFlexView();\n\n\t\tconst compatibility = this.computeCompatibility();\n\t\tthis.currentCompatibility = compatibility;\n\n\t\tconst anchors = this.checkout.forest.anchors;\n\t\tconst slots = anchors.slots;\n\n\t\tif (compatibility.canView) {\n\t\t\tthis.flexTreeContext = new Context(\n\t\t\t\tdefaultSchemaPolicy,\n\t\t\t\tthis.checkout,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t);\n\t\t\tassert(!slots.has(SimpleContextSlot), 0xa47 /* extra simple tree context */);\n\t\t\tassert(\n\t\t\t\tthis.rootFieldSchema instanceof FieldSchemaAlpha,\n\t\t\t\t0xbfa /* all field schema should be FieldSchemaAlpha */,\n\t\t\t);\n\t\t\tslots.set(\n\t\t\t\tSimpleContextSlot,\n\t\t\t\tnew HydratedContext(\n\t\t\t\t\tthis.flexTreeContext,\n\t\t\t\t\tHydratedContext.schemaMapFromRootSchema(\n\t\t\t\t\t\tthis.rootFieldSchema.allowedTypesFull.evaluate(),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t// Trigger \"rootChanged\" events if the root changes in the future.\n\t\t\t{\n\t\t\t\t// Currently there is no good way to do this as FlexTreeField has no events for changes.\n\t\t\t\t// this.root.on(????)\n\t\t\t\t// As a workaround for the above, trigger \"rootChanged\" in \"afterBatch\".\n\t\t\t\t// Ideally these events would be just events for changes within the root.\n\t\t\t\t// TODO: provide a better event: this.view.flexTree.on(????) and/or integrate with with the normal event code paths.\n\n\t\t\t\t// Track what the root was before to be able to detect changes.\n\t\t\t\t// This uses the flex tree root to avoid demanding the simple-tree TreeNode when it might not be hydrated yet.\n\t\t\t\tlet lastRoot: FlexTreeUnknownUnboxed | undefined = (\n\t\t\t\t\tthis.flexTreeContext.root as FlexTreeOptionalField\n\t\t\t\t).content;\n\n\t\t\t\tthis.flexTreeViewUnregisterCallbacks.add(\n\t\t\t\t\tthis.checkout.events.on(\"afterBatch\", () => {\n\t\t\t\t\t\t// In the initialization flow, this event is raised before the correct compatibility w.r.t the new schema is calculated.\n\t\t\t\t\t\t// Accessing `this.root` in that case can throw. It's OK to ignore this because:\n\t\t\t\t\t\t// - The rootChanged event will already be raised at the end of the current upgrade\n\t\t\t\t\t\t// - It doesn't matter that `lastRoot` isn't updated in this case, because `update` will be called again before the upgrade\n\t\t\t\t\t\t// completes (at which point this callback and the `lastRoot` captured here will be out of scope anyway)\n\t\t\t\t\t\tif (!this.midUpgrade && lastRoot !== this.flexRoot.content) {\n\t\t\t\t\t\t\tlastRoot = this.flexRoot.content;\n\t\t\t\t\t\t\tthis.events.emit(\"rootChanged\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.flexTreeViewUnregisterCallbacks.add(\n\t\t\t// Will dispose the old view (if there is one) when its no longer valid, and create a new one if appropriate.\n\t\t\tthis.checkout.storedSchema.events.on(\"afterSchemaChange\", () => this.update()),\n\t\t);\n\n\t\tif (!this.midUpgrade) {\n\t\t\tassert(\n\t\t\t\tthis.pendingHydration === undefined,\n\t\t\t\t0xc76 /* no nodes should be pending hydration when triggering events that could access nodes */,\n\t\t\t);\n\t\t\tthis.events.emit(\"schemaChanged\");\n\t\t\tthis.events.emit(\"rootChanged\");\n\t\t}\n\t}\n\n\t/**\n\t * Computes the current schema compatibility status and updates the cached enabled upgrades.\n\t */\n\tprivate computeCompatibility(): SchemaCompatibilityStatusBeta {\n\t\tconst { enabledUpgrades, ...compatibility } = checkSchemaCompatibility(\n\t\t\tthis.viewSchema,\n\t\t\tthis.checkout.storedSchema,\n\t\t\tthis.stagedUpgradePolicy,\n\t\t);\n\t\tthis.currentEnabledUpgrades = enabledUpgrades;\n\t\treturn {\n\t\t\t...compatibility,\n\t\t\tcanInitialize: canInitialize(this.checkout),\n\t\t};\n\t}\n\n\tprivate runSchemaEdit(edit: () => void): void {\n\t\tthis.midUpgrade = true;\n\t\ttry {\n\t\t\tedit();\n\t\t} finally {\n\t\t\tthis.midUpgrade = false;\n\t\t}\n\t\t// Ensure hydration is flushed before events run which could access nodes.\n\t\tthis.pendingHydration?.();\n\t\tthis.pendingHydration = undefined;\n\t\tthis.events.emit(\"schemaChanged\");\n\t\tthis.events.emit(\"rootChanged\");\n\t}\n\n\tprivate disposeFlexView(): void {\n\t\tconst anchors = this.checkout.forest.anchors;\n\t\tif (this.flexTreeContext !== undefined) {\n\t\t\t// Cleanup any TreeNodes cached in the AnchorSet when disposing the flex-tree which they wrap.\n\t\t\tfor (const anchorNode of anchors) {\n\t\t\t\ttryDisposeTreeNode(anchorNode);\n\t\t\t}\n\n\t\t\tthis.flexTreeContext[disposeSymbol]();\n\t\t\tthis.flexTreeContext = undefined;\n\t\t}\n\t\tfor (const unregister of this.flexTreeViewUnregisterCallbacks) {\n\t\t\tunregister();\n\t\t}\n\t\tthis.flexTreeViewUnregisterCallbacks.clear();\n\t\tanchors.slots.delete(SimpleContextSlot);\n\t}\n\n\tpublic get compatibility(): SchemaCompatibilityStatusBeta {\n\t\tif (!this.currentCompatibility) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t\treturn this.currentCompatibility;\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.disposed = true;\n\t\tthis.disposeFlexView();\n\t\tfor (const unregister of this.unregisterCallbacks) {\n\t\t\tunregister();\n\t\t}\n\t\tthis.checkout.forest.anchors.slots.delete(ViewSlot);\n\t\tthis.currentCompatibility = undefined;\n\t\tthis.currentEnabledUpgrades = undefined;\n\t\tthis.onDispose?.();\n\t\tif (!this.checkout.isSharedBranch && !this.checkout.disposed) {\n\t\t\t// All non-shared branches are 1:1 with views, so if a user manually disposes a view, we should also dispose the checkout/branch.\n\t\t\tthis.checkout.dispose();\n\t\t}\n\t}\n\n\tprivate get flexRoot(): FlexTreeOptionalField | FlexTreeRequiredField {\n\t\tthis.breaker.use();\n\t\tthrowIfSchemaIsIncompatible(this.compatibility);\n\t\tconst view = this.getFlexTreeContext();\n\t\tassert(\n\t\t\tview.root.is(FieldKinds.optional) ||\n\t\t\t\tview.root.is(FieldKinds.required) ||\n\t\t\t\tview.root.is(FieldKinds.identifier),\n\t\t\t0xc77 /* unexpected root field kind */,\n\t\t);\n\t\treturn view.root;\n\t}\n\n\tpublic get root(): ReadableField<TRootSchema> {\n\t\treturn tryGetTreeNodeForField(this.flexRoot) as ReadableField<TRootSchema>;\n\t}\n\n\tpublic set root(newRoot: InsertableField<TRootSchema>) {\n\t\tthis.breaker.use();\n\t\tthrowIfSchemaIsIncompatible(this.compatibility);\n\t\tconst view = this.getFlexTreeContext();\n\t\tsetField(\n\t\t\tview.root,\n\t\t\tthis.rootFieldSchema,\n\t\t\tnewRoot as InsertableContent | undefined,\n\t\t\tthis.checkout.storedSchema.rootFieldSchema,\n\t\t);\n\t}\n\n\t// #region Branching\n\n\tpublic fork(): ReturnType<UntypedTreeViewAlpha[\"fork\"]> &\n\t\tSchematizingSimpleTreeView<TRootSchema> {\n\t\treturn this.checkout.fork().viewWith(this.config);\n\t}\n\n\tpublic rewindTo(revision: string): void {\n\t\tthis.checkout.rewindTo(revision);\n\t}\n\n\tpublic revertTo(revision: string, options?: RevertToOptionsAlpha): void {\n\t\tthis.checkout.revertTo(revision, options);\n\t}\n\n\tpublic merge(context: UntypedTreeViewAlpha, disposeMerged = true): void {\n\t\tthis.checkout.merge(context, disposeMerged);\n\t}\n\n\tpublic rebaseOnto(context: UntypedTreeViewAlpha): void {\n\t\tthis.checkout.rebaseOnto(context);\n\t}\n\n\tpublic isMissingEditsFrom(context: UntypedTreeViewAlpha): boolean {\n\t\treturn this.checkout.isMissingEditsFrom(context);\n\t}\n\n\tpublic computeNetChangeIfRebasedOnto(\n\t\tcontext: UntypedTreeViewAlpha,\n\t): JsonCompatibleReadOnly | undefined {\n\t\treturn this.checkout.computeNetChangeIfRebasedOnto(context);\n\t}\n\n\t// #endregion Branching\n\n\tpublic get branchHistory(): TreeBranchHistory {\n\t\treturn this.checkout.branchHistory;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"schematizingTreeView.js","sourceRoot":"","sources":["../../src/shared-tree/schematizingTreeView.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,+DAA6D;AAM7D,kEAA6D;AAC7D,uEAA0F;AAE1F,+CAAuF;AACvF,4DAWuC;AACvC,sDAsCiC;AACjC,+CAM0B;AAE1B,2DAAsF;AAGtF;;;GAGG;AACU,QAAA,QAAQ,GAAG,IAAA,qBAAU,GAAoB,CAAC;AAEvD,SAAS,2BAA2B,CAAC,aAA4C;IAChF,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;QAC3B,OAAO;IACR,CAAC;IAED,MAAM,UAAU,GAAG,aAAa,CAAC,aAAa;QAC7C,CAAC,CAAC,oGAAoG;QACtG,CAAC,CAAC,aAAa,CAAC,UAAU;YACzB,CAAC,CAAC,2GAA2G;YAC7G,CAAC,CAAC,gIAAgI,CAAC;IACrI,MAAM,IAAI,qBAAU,CACnB,gGAAgG,UAAU,EAAE,EAC5G,IAAA,6BAAkB,EAAC;QAClB,4BAA4B,EAC3B,aAAa,CAAC,aAAa,KAAK,SAAS;YACxC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC;KAC/C,CAAC,CACF,CAAC;AACH,CAAC;AAED;;GAEG;IAEU,0BAA0B;4BADtC,wBAAa;;;;;;;;YACd,qLAmhBC;;;YAnhBY,+DAA0B;;QA6DrB,QAAQ;QACR,MAAM;QACN,cAAc;QACb,SAAS;QA5D3B;;;;WAIG;QACK,eAAe,CAAsB;QAE7C;;WAEG;QACK,oBAAoB,CAA4C;QACxE;;;WAGG;QACK,sBAAsB,CAA8D;QAC5E,MAAM,GAE6B,IAAA,4BAAa,GAAE,CAAC;QAEnE;;WAEG;QACc,UAAU,CAAa;QACxC;;WAEG;QACc,mBAAmB,CAA4B;QAEhE;;WAEG;QACc,+BAA+B,GAAG,IAAI,GAAG,EAAc,CAAC;QAEzE;;W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AuB;QAEvB,IAAW,aAAa;YACvB,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;QACpC,CAAC;;;;AAlhBW,gEAA0B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type {\n\tHasListeners,\n\tIEmitter,\n\tListenable,\n} from \"@fluidframework/core-interfaces/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { tagSchemaArtifacts, UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { anchorSlot, rootFieldKey, type RevertToOptionsAlpha } from \"../core/index.js\";\nimport {\n\ttype NodeIdentifierManager,\n\tdefaultSchemaPolicy,\n\tcursorForMapTreeField,\n\tContext,\n\tcombineChunks,\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeUnknownUnboxed,\n\tFieldKinds,\n\ttype FlexTreeRequiredField,\n\tallowsRepoSuperset,\n} from \"../feature-libraries/index.js\";\nimport {\n\ttype ImplicitFieldSchema,\n\ttype SchemaCompatibilityStatusBeta,\n\ttype TreeContextAlpha,\n\ttype TreeViewEvents,\n\ttryGetTreeNodeForField,\n\tsetField,\n\tnormalizeFieldSchema,\n\tcheckSchemaCompatibility,\n\ttype InsertableContent,\n\ttype StagedSchemaUpgradePolicy,\n\ttype TreeViewConfiguration,\n\ttype TreeViewAlpha,\n\ttype InsertableField,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeBranchEvents,\n\ttype VoidTransactionCallbackStatusAlpha,\n\ttype TransactionCallbackStatusAlpha,\n\ttype TransactionVoidResult,\n\ttype TransactionValueResult,\n\ttype RunTransactionParamsAlpha,\n\tHydratedContext,\n\tSimpleContextSlot,\n\tareImplicitFieldSchemaEqual,\n\tprepareForInsertionContextless,\n\ttype FieldSchema,\n\ttryDisposeTreeNode,\n\tFieldSchemaAlpha,\n\tTreeViewConfigurationAlpha,\n\ttoInitialSchema,\n\ttoUpgradeSchema,\n\ttype TreeBranchHistory,\n\ttype UntypedTreeViewAlpha,\n\ttype TreeSchema,\n\ttype SchemaUpgrade,\n\ttype StagedUpgradeStatus,\n} from \"../simple-tree/index.js\";\nimport {\n\ttype Breakable,\n\tbreakingClass,\n\tdisposeSymbol,\n\ttype JsonCompatibleReadOnly,\n\ttype WithBreakable,\n} from \"../util/index.js\";\n\nimport { canInitialize, initialize, initializerFromChunk } from \"./schematizeTree.js\";\nimport type { TreeCheckout } from \"./treeCheckout.js\";\n\n/**\n * Creating multiple tree views from the same checkout is not supported. This slot is used to detect if one already\n * exists and error if creating a second.\n */\nexport const ViewSlot = anchorSlot<TreeContextAlpha>();\n\nfunction throwIfSchemaIsIncompatible(compatibility: SchemaCompatibilityStatusBeta): void {\n\tif (compatibility.canView) {\n\t\treturn;\n\t}\n\n\tconst resolution = compatibility.canInitialize\n\t\t? \"The document is uninitialized; call TreeView.initialize() before reading or writing TreeView.root.\"\n\t\t: compatibility.canUpgrade\n\t\t\t? \"The stored schema can be upgraded; call TreeView.upgradeSchema() before reading or writing TreeView.root.\"\n\t\t\t: \"The schemas cannot be upgraded automatically. Use a compatible view schema or explicitly migrate the document schema and data.\";\n\tthrow new UsageError(\n\t\t`TreeView.root is unavailable because the view schema is incompatible with the stored schema. ${resolution}`,\n\t\ttagSchemaArtifacts({\n\t\t\tschemaIncompatibilityDetails:\n\t\t\t\tcompatibility.discrepancies === undefined\n\t\t\t\t\t? undefined\n\t\t\t\t\t: JSON.stringify(compatibility.discrepancies),\n\t\t}),\n\t);\n}\n\n/**\n * Implementation of TreeView wrapping a FlexTreeView.\n */\n@breakingClass\nexport class SchematizingSimpleTreeView<\n\tin out TRootSchema extends ImplicitFieldSchema | UnsafeUnknownSchema,\n> implements TreeViewAlpha<TRootSchema>, WithBreakable\n{\n\t/**\n\t * This is set to undefined when this object is disposed or the view schema does not support viewing the document's stored schema.\n\t *\n\t * The view schema may be incompatible with the stored schema. Use `compatibility` to check.\n\t */\n\tprivate flexTreeContext: Context | undefined;\n\n\t/**\n\t * Undefined if and only if uninitialized or disposed.\n\t */\n\tprivate currentCompatibility: SchemaCompatibilityStatusBeta | undefined;\n\t/**\n\t * Cached map of upgrade statuses, computed alongside compatibility.\n\t * @remarks Undefined if and only if uninitialized or disposed.\n\t */\n\tprivate currentEnabledUpgrades: ReadonlyMap<SchemaUpgrade, StagedUpgradeStatus> | undefined;\n\tpublic readonly events: Listenable<TreeViewEvents & TreeBranchEvents> &\n\t\tIEmitter<TreeViewEvents & TreeBranchEvents> &\n\t\tHasListeners<TreeViewEvents & TreeBranchEvents> = createEmitter();\n\n\t/**\n\t * The schema for this view, captured at construction time for compatibility checking.\n\t */\n\tprivate readonly viewSchema: TreeSchema;\n\t/**\n\t * Stored-schema generation policy from the view configuration, frozen at construction time.\n\t */\n\tprivate readonly stagedUpgradePolicy: StagedSchemaUpgradePolicy;\n\n\t/**\n\t * Events to unregister upon flex-tree view disposal.\n\t */\n\tprivate readonly flexTreeViewUnregisterCallbacks = new Set<() => void>();\n\n\t/**\n\t * Events to unregister upon disposal.\n\t */\n\tprivate readonly unregisterCallbacks = new Set<() => void>();\n\n\tpublic disposed = false;\n\t/**\n\t * This is set to true while an edit impacting the document schema is in progress.\n\t * This allows suppressing extra rootChanged / schemaChanged events until the edit concludes.\n\t * This is useful especially for some initialization edits, since document initialization can involve transient schemas\n\t * which are implementation details and should not be exposed to the user.\n\t */\n\tprivate midUpgrade = false;\n\n\t/**\n\t * Hydration work deferred until Context has been created.\n\t */\n\tprivate pendingHydration?: () => void;\n\n\tprivate readonly rootFieldSchema: FieldSchema;\n\tpublic readonly breaker: Breakable;\n\n\tpublic constructor(\n\t\tpublic readonly checkout: TreeCheckout,\n\t\tpublic readonly config: TreeViewConfiguration<ReadSchema<TRootSchema>>,\n\t\tpublic readonly nodeKeyManager: NodeIdentifierManager,\n\t\tprivate readonly onDispose?: () => void,\n\t) {\n\t\tthis.breaker = checkout.breaker;\n\t\tif (checkout.forest.anchors.slots.has(ViewSlot)) {\n\t\t\tthrow new UsageError(\"Cannot create a second tree view from the same checkout\");\n\t\t}\n\t\tcheckout.forest.anchors.slots.set(ViewSlot, this);\n\n\t\tthis.rootFieldSchema = normalizeFieldSchema(config.schema);\n\n\t\tconst stagedUpgradePolicy =\n\t\t\tconfig instanceof TreeViewConfigurationAlpha ? config.stagedUpgradePolicy : undefined;\n\t\tconst configAlpha = new TreeViewConfigurationAlpha({\n\t\t\t...config,\n\t\t\tstagedUpgradePolicy,\n\t\t});\n\t\tthis.stagedUpgradePolicy = configAlpha.stagedUpgradePolicy;\n\n\t\t// Store viewSchema directly from the configuration (TreeViewConfigurationAlpha implements TreeSchema)\n\t\tthis.viewSchema = configAlpha;\n\t\t// This must be initialized before `update` can be called.\n\t\tthis.currentCompatibility = {\n\t\t\tcanView: false,\n\t\t\tcanUpgrade: true,\n\t\t\tisEquivalent: false,\n\t\t\tcanInitialize: true,\n\t\t\tdiscrepancies: undefined,\n\t\t};\n\t\tthis.currentEnabledUpgrades = new Map();\n\t\tthis.update();\n\n\t\tthis.unregisterCallbacks.add(\n\t\t\tthis.checkout.events.on(\"changed\", (data, getRevertible) => {\n\t\t\t\tthis.events.emit(\"changed\", data, getRevertible);\n\t\t\t\tthis.events.emit(\"commitApplied\", data, getRevertible);\n\t\t\t}),\n\t\t);\n\t}\n\n\tpublic isBranch(): this is UntypedTreeViewAlpha {\n\t\treturn this.isView();\n\t}\n\n\tpublic isView(): this is UntypedTreeViewAlpha {\n\t\treturn true;\n\t}\n\n\tpublic applyChange(change: JsonCompatibleReadOnly): void {\n\t\tthis.checkout.applySerializedChange(change);\n\t}\n\n\tpublic hasRootSchema<TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t): this is TreeViewAlpha<TSchema> {\n\t\treturn areImplicitFieldSchemaEqual(this.rootFieldSchema, schema);\n\t}\n\n\tpublic get schema(): ReadSchema<TRootSchema> {\n\t\treturn this.config.schema;\n\t}\n\n\tpublic initialize(content: InsertableField<TRootSchema>): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (!compatibility.canInitialize) {\n\t\t\tthrow new UsageError(\"Tree cannot be initialized more than once.\");\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst schema = toInitialSchema(this.config.schema, this.stagedUpgradePolicy);\n\t\t\t// This has to be the contextless version, since when \"initialize\" is called (right after this),\n\t\t\t// it will do a schema change which would dispose of the current context (see inside `update`).\n\t\t\t// Thus using the current context (if any) would hydrate nodes then\n\t\t\t// immediately dispose them instead of having them actually be useable after initialize.\n\t\t\t// For this to work,\n\t\t\t// the hydration must be deferred until after the content is inserted into the tree and the final schema change is done (for required roots),\n\t\t\t// but before any user event could could run.\n\t\t\tconst mapTree = prepareForInsertionContextless(\n\t\t\t\tcontent as InsertableContent | undefined,\n\t\t\t\tthis.rootFieldSchema,\n\t\t\t\t{\n\t\t\t\t\tschema,\n\t\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t\t},\n\t\t\t\tthis,\n\t\t\t\tschema.rootFieldSchema,\n\t\t\t\t(batches, doHydration) => {\n\t\t\t\t\tassert(\n\t\t\t\t\t\tthis.pendingHydration === undefined,\n\t\t\t\t\t\t0xc74 /* pendingHydration already set */,\n\t\t\t\t\t);\n\t\t\t\t\tthis.pendingHydration = () => {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tbatches.length <= 1,\n\t\t\t\t\t\t\t0xc75 /* initialize should at most one hydration batch */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tfor (const batch of batches) {\n\t\t\t\t\t\t\tdoHydration(batch, {\n\t\t\t\t\t\t\t\tparent: undefined,\n\t\t\t\t\t\t\t\tparentField: rootFieldKey,\n\t\t\t\t\t\t\t\tparentIndex: 0,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tthis.runTransaction(() => {\n\t\t\t\tinitialize(\n\t\t\t\t\tthis.checkout,\n\t\t\t\t\tschema,\n\t\t\t\t\tinitializerFromChunk(this.checkout, () => {\n\t\t\t\t\t\t// This must be done after initial schema is set!\n\t\t\t\t\t\treturn combineChunks(\n\t\t\t\t\t\t\tthis.checkout.forest.chunkField(\n\t\t\t\t\t\t\t\tcursorForMapTreeField(mapTree === undefined ? [] : [mapTree]),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic upgradeSchema(): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst newSchema = toUpgradeSchema(this.viewSchema.root, this.effectiveUpgradePolicy);\n\t\tconst storedSchema = this.checkout.storedSchema.clone();\n\t\tif (!allowsRepoSuperset(defaultSchemaPolicy, storedSchema, newSchema)) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Existing stored schema cannot be upgraded to the requested schema (see TreeView.compatibility.canUpgrade).\",\n\t\t\t);\n\t\t}\n\t\tif (allowsRepoSuperset(defaultSchemaPolicy, newSchema, storedSchema)) {\n\t\t\t// No-op\n\t\t\treturn;\n\t\t}\n\n\t\tthis.runSchemaEdit(() => this.checkout.updateSchema(newSchema));\n\t}\n\n\tpublic isStagedUpgradeEnabled(upgrade: SchemaUpgrade): StagedUpgradeStatus {\n\t\tif (!this.currentEnabledUpgrades) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t\treturn this.currentEnabledUpgrades.get(upgrade) ?? \"disabled\";\n\t}\n\n\tprivate get effectiveUpgradePolicy(): StagedSchemaUpgradePolicy {\n\t\tconst configuredPolicy = this.stagedUpgradePolicy;\n\t\tif (configuredPolicy.includeAlreadyEnabledUpgrades !== true) {\n\t\t\treturn configuredPolicy;\n\t\t}\n\t\tconst enabledUpgrades = this.currentEnabledUpgrades;\n\t\tassert(\n\t\t\tenabledUpgrades !== undefined,\n\t\t\t0xd3e /* Enabled upgrades must be available for an active view */,\n\t\t);\n\t\tif (enabledUpgrades.size === 0) {\n\t\t\treturn configuredPolicy;\n\t\t}\n\n\t\treturn {\n\t\t\tincludeStaged: (upgrade) =>\n\t\t\t\tconfiguredPolicy.includeStaged(upgrade) || enabledUpgrades.has(upgrade),\n\t\t\tincludeStagedOptional: (upgrade) =>\n\t\t\t\tconfiguredPolicy.includeStagedOptional(upgrade) || enabledUpgrades.has(upgrade),\n\t\t};\n\t}\n\n\t/**\n\t * Gets the flex-tree context. Throws when disposed or out of schema.\n\t */\n\tpublic getFlexTreeContext(): Context {\n\t\tthis.ensureUndisposed();\n\t\tassert(this.flexTreeContext !== undefined, 0x8c0 /* unexpected getViewOrError */);\n\t\treturn this.flexTreeContext;\n\t}\n\n\tpublic runTransaction<TSuccessValue, TFailureValue>(\n\t\ttransaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>,\n\t\tparams?: RunTransactionParamsAlpha,\n\t): TransactionValueResult<TSuccessValue, TFailureValue>;\n\tpublic runTransaction(\n\t\ttransaction: () => VoidTransactionCallbackStatusAlpha | void,\n\t\tparams?: RunTransactionParamsAlpha,\n\t): TransactionVoidResult;\n\tpublic runTransaction<TSuccessValue, TFailureValue>(\n\t\ttransaction: () =>\n\t\t\t| TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>\n\t\t\t| VoidTransactionCallbackStatusAlpha\n\t\t\t| void,\n\t\tparams?: RunTransactionParamsAlpha,\n\t): TransactionValueResult<TSuccessValue, TFailureValue> | TransactionVoidResult {\n\t\tthis.ensureUndisposed();\n\t\treturn this.checkout.runTransaction(transaction, params);\n\t}\n\n\tpublic runTransactionAsync<TSuccessValue, TFailureValue>(\n\t\ttransaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>,\n\t\tparams?: RunTransactionParamsAlpha,\n\t): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;\n\tpublic runTransactionAsync(\n\t\ttransaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>,\n\t\tparams?: RunTransactionParamsAlpha,\n\t): Promise<TransactionVoidResult>;\n\tpublic async runTransactionAsync<TSuccessValue, TFailureValue>(\n\t\ttransaction: () => Promise<\n\t\t\t| TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>\n\t\t\t| VoidTransactionCallbackStatusAlpha\n\t\t\t| void\n\t\t>,\n\t\tparams: RunTransactionParamsAlpha | undefined,\n\t): Promise<TransactionValueResult<TSuccessValue, TFailureValue> | TransactionVoidResult> {\n\t\tthis.ensureUndisposed();\n\t\tif (this.checkout.transaction.size > 0) {\n\t\t\t// breaker.break() sets brokenBy synchronously before throwing.\n\t\t\t// A plain `throw` inside an async function would be captured as a rejected Promise\n\t\t\t// before @breakingClass could set brokenBy. By setting it here first, the\n\t\t\t// subsequent call to unmountTransaction (also @breakingClass-wrapped) will see the\n\t\t\t// broken state and throw synchronously, propagating out of the outer runTransaction\n\t\t\t// to its caller.\n\t\t\tthis.breaker.break(\n\t\t\t\tnew UsageError(\n\t\t\t\t\t\"An asynchronous transaction cannot be started while another transaction is already in progress.\",\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\treturn this.checkout.runTransactionAsync(transaction, params);\n\t}\n\n\tprivate ensureUndisposed(): void {\n\t\tif (this.disposed) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t}\n\n\tprivate failDisposed(): never {\n\t\tthrow new UsageError(\"Accessed a disposed TreeView.\");\n\t}\n\n\t/**\n\t * Updates `this.view` and the current compatibility status.\n\t * Invoked during initialization and when `this.view` needs to be replaced due to stored schema changes.\n\t * Handles re-registering for events to call update in the future.\n\t * @remarks\n\t * This does not check if the view needs to be replaced, it replaces it unconditionally:\n\t * callers should do any checking to detect if it's really needed before calling `update`.\n\t * @privateRemarks\n\t * This implementation avoids making any edits, which prevents it from being invoked reentrantly.\n\t * If implicit initialization (or some other edit) is desired, it should be done outside of this method.\n\t */\n\tprivate update(): void {\n\t\tthis.disposeFlexView();\n\n\t\tconst compatibility = this.computeCompatibility();\n\t\tthis.currentCompatibility = compatibility;\n\n\t\tconst anchors = this.checkout.forest.anchors;\n\t\tconst slots = anchors.slots;\n\n\t\tif (compatibility.canView) {\n\t\t\tthis.flexTreeContext = new Context(\n\t\t\t\tdefaultSchemaPolicy,\n\t\t\t\tthis.checkout,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t);\n\t\t\tassert(!slots.has(SimpleContextSlot), 0xa47 /* extra simple tree context */);\n\t\t\tassert(\n\t\t\t\tthis.rootFieldSchema instanceof FieldSchemaAlpha,\n\t\t\t\t0xbfa /* all field schema should be FieldSchemaAlpha */,\n\t\t\t);\n\t\t\tslots.set(\n\t\t\t\tSimpleContextSlot,\n\t\t\t\tnew HydratedContext(\n\t\t\t\t\tthis.flexTreeContext,\n\t\t\t\t\tHydratedContext.schemaMapFromRootSchema(\n\t\t\t\t\t\tthis.rootFieldSchema.allowedTypesFull.evaluate(),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t// Trigger \"rootChanged\" events if the root changes in the future.\n\t\t\t{\n\t\t\t\t// Currently there is no good way to do this as FlexTreeField has no events for changes.\n\t\t\t\t// this.root.on(????)\n\t\t\t\t// As a workaround for the above, trigger \"rootChanged\" in \"afterBatch\".\n\t\t\t\t// Ideally these events would be just events for changes within the root.\n\t\t\t\t// TODO: provide a better event: this.view.flexTree.on(????) and/or integrate with with the normal event code paths.\n\n\t\t\t\t// Track what the root was before to be able to detect changes.\n\t\t\t\t// This uses the flex tree root to avoid demanding the simple-tree TreeNode when it might not be hydrated yet.\n\t\t\t\tlet lastRoot: FlexTreeUnknownUnboxed | undefined = (\n\t\t\t\t\tthis.flexTreeContext.root as FlexTreeOptionalField\n\t\t\t\t).content;\n\n\t\t\t\tthis.flexTreeViewUnregisterCallbacks.add(\n\t\t\t\t\tthis.checkout.events.on(\"afterBatch\", () => {\n\t\t\t\t\t\t// In the initialization flow, this event is raised before the correct compatibility w.r.t the new schema is calculated.\n\t\t\t\t\t\t// Accessing `this.root` in that case can throw. It's OK to ignore this because:\n\t\t\t\t\t\t// - The rootChanged event will already be raised at the end of the current upgrade\n\t\t\t\t\t\t// - It doesn't matter that `lastRoot` isn't updated in this case, because `update` will be called again before the upgrade\n\t\t\t\t\t\t// completes (at which point this callback and the `lastRoot` captured here will be out of scope anyway)\n\t\t\t\t\t\tif (!this.midUpgrade && lastRoot !== this.flexRoot.content) {\n\t\t\t\t\t\t\tlastRoot = this.flexRoot.content;\n\t\t\t\t\t\t\tthis.events.emit(\"rootChanged\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.flexTreeViewUnregisterCallbacks.add(\n\t\t\t// Will dispose the old view (if there is one) when its no longer valid, and create a new one if appropriate.\n\t\t\tthis.checkout.storedSchema.events.on(\"afterSchemaChange\", () => this.update()),\n\t\t);\n\n\t\tif (!this.midUpgrade) {\n\t\t\tassert(\n\t\t\t\tthis.pendingHydration === undefined,\n\t\t\t\t0xc76 /* no nodes should be pending hydration when triggering events that could access nodes */,\n\t\t\t);\n\t\t\tthis.events.emit(\"schemaChanged\");\n\t\t\tthis.events.emit(\"rootChanged\");\n\t\t}\n\t}\n\n\t/**\n\t * Computes the current schema compatibility status and updates the cached enabled upgrades.\n\t */\n\tprivate computeCompatibility(): SchemaCompatibilityStatusBeta {\n\t\tconst { enabledUpgrades, ...compatibility } = checkSchemaCompatibility(\n\t\t\tthis.viewSchema,\n\t\t\tthis.checkout.storedSchema,\n\t\t\tthis.stagedUpgradePolicy,\n\t\t);\n\t\tthis.currentEnabledUpgrades = enabledUpgrades;\n\t\treturn {\n\t\t\t...compatibility,\n\t\t\tcanInitialize: canInitialize(this.checkout),\n\t\t};\n\t}\n\n\tprivate runSchemaEdit(edit: () => void): void {\n\t\tthis.midUpgrade = true;\n\t\ttry {\n\t\t\tedit();\n\t\t} finally {\n\t\t\tthis.midUpgrade = false;\n\t\t}\n\t\t// Ensure hydration is flushed before events run which could access nodes.\n\t\tthis.pendingHydration?.();\n\t\tthis.pendingHydration = undefined;\n\t\tthis.events.emit(\"schemaChanged\");\n\t\tthis.events.emit(\"rootChanged\");\n\t}\n\n\tprivate disposeFlexView(): void {\n\t\tconst anchors = this.checkout.forest.anchors;\n\t\tif (this.flexTreeContext !== undefined) {\n\t\t\t// Cleanup any TreeNodes cached in the AnchorSet when disposing the flex-tree which they wrap.\n\t\t\tfor (const anchorNode of anchors) {\n\t\t\t\ttryDisposeTreeNode(anchorNode);\n\t\t\t}\n\n\t\t\tthis.flexTreeContext[disposeSymbol]();\n\t\t\tthis.flexTreeContext = undefined;\n\t\t}\n\t\tfor (const unregister of this.flexTreeViewUnregisterCallbacks) {\n\t\t\tunregister();\n\t\t}\n\t\tthis.flexTreeViewUnregisterCallbacks.clear();\n\t\tanchors.slots.delete(SimpleContextSlot);\n\t}\n\n\tpublic get compatibility(): SchemaCompatibilityStatusBeta {\n\t\tif (!this.currentCompatibility) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t\treturn this.currentCompatibility;\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.disposed = true;\n\t\tthis.disposeFlexView();\n\t\tfor (const unregister of this.unregisterCallbacks) {\n\t\t\tunregister();\n\t\t}\n\t\tthis.checkout.forest.anchors.slots.delete(ViewSlot);\n\t\tthis.currentCompatibility = undefined;\n\t\tthis.currentEnabledUpgrades = undefined;\n\t\tthis.onDispose?.();\n\t\tif (!this.checkout.isSharedBranch && !this.checkout.disposed) {\n\t\t\t// All non-shared branches are 1:1 with views, so if a user manually disposes a view, we should also dispose the checkout/branch.\n\t\t\tthis.checkout.dispose();\n\t\t}\n\t}\n\n\tprivate get flexRoot(): FlexTreeOptionalField | FlexTreeRequiredField {\n\t\tthis.breaker.use();\n\t\tthrowIfSchemaIsIncompatible(this.compatibility);\n\t\tconst view = this.getFlexTreeContext();\n\t\tassert(\n\t\t\tview.root.is(FieldKinds.optional) ||\n\t\t\t\tview.root.is(FieldKinds.required) ||\n\t\t\t\tview.root.is(FieldKinds.identifier),\n\t\t\t0xc77 /* unexpected root field kind */,\n\t\t);\n\t\treturn view.root;\n\t}\n\n\tpublic get root(): ReadableField<TRootSchema> {\n\t\treturn tryGetTreeNodeForField(this.flexRoot) as ReadableField<TRootSchema>;\n\t}\n\n\tpublic set root(newRoot: InsertableField<TRootSchema>) {\n\t\tthis.breaker.use();\n\t\tthrowIfSchemaIsIncompatible(this.compatibility);\n\t\tconst view = this.getFlexTreeContext();\n\t\tsetField(\n\t\t\tview.root,\n\t\t\tthis.rootFieldSchema,\n\t\t\tnewRoot as InsertableContent | undefined,\n\t\t\tthis.checkout.storedSchema.rootFieldSchema,\n\t\t);\n\t}\n\n\t// #region Branching\n\n\tpublic fork(): ReturnType<UntypedTreeViewAlpha[\"fork\"]> &\n\t\tSchematizingSimpleTreeView<TRootSchema> {\n\t\treturn this.checkout.fork().viewWith(this.config);\n\t}\n\n\tpublic rewindTo(revision: string): void {\n\t\tthis.checkout.rewindTo(revision);\n\t}\n\n\tpublic revertTo(revision: string, options?: RevertToOptionsAlpha): void {\n\t\tthis.checkout.revertTo(revision, options);\n\t}\n\n\tpublic merge(context: UntypedTreeViewAlpha, disposeMerged = true): void {\n\t\tthis.checkout.merge(context, disposeMerged);\n\t}\n\n\tpublic rebaseOnto(context: UntypedTreeViewAlpha): void {\n\t\tthis.checkout.rebaseOnto(context);\n\t}\n\n\tpublic isMissingEditsFrom(context: UntypedTreeViewAlpha): boolean {\n\t\treturn this.checkout.isMissingEditsFrom(context);\n\t}\n\n\tpublic computeNetChangeIfRebasedOnto(\n\t\tcontext: UntypedTreeViewAlpha,\n\t): JsonCompatibleReadOnly | undefined {\n\t\treturn this.checkout.computeNetChangeIfRebasedOnto(context);\n\t}\n\n\t// #endregion Branching\n\n\tpublic get branchHistory(): TreeBranchHistory {\n\t\treturn this.checkout.branchHistory;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaCompatibilityTester.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAGN,KAAK,gBAAgB,EAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAIjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAOnD,OAAO,KAAK,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAElF;;;GAGG;AACH,wBAAgB,+BAA+B,CAC9C,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,gBAAgB,GACtB,SAAS,iBAAiB,EAAE,GAAG,SAAS,CAO1C;AAmED;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAErE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACvC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,gBAAgB,EACxB,oBAAoB,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,yBAAyB,GACxE,IAAI,CAAC,6BAA6B,EAAE,eAAe,CAAC,GAAG;IACzD,eAAe,EAAE,WAAW,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC;CACjE,
|
|
1
|
+
{"version":3,"file":"schemaCompatibilityTester.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAGN,KAAK,gBAAgB,EAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAIjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAOnD,OAAO,KAAK,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAElF;;;GAGG;AACH,wBAAgB,+BAA+B,CAC9C,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,gBAAgB,GACtB,SAAS,iBAAiB,EAAE,GAAG,SAAS,CAO1C;AAmED;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAErE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACvC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,gBAAgB,EACxB,oBAAoB,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,yBAAyB,GACxE,IAAI,CAAC,6BAA6B,EAAE,eAAe,CAAC,GAAG;IACzD,eAAe,EAAE,WAAW,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC;CACjE,CA6DA"}
|
|
@@ -102,7 +102,7 @@ function checkSchemaCompatibility(viewSchema, stored, stagedSchemaUpgrades) {
|
|
|
102
102
|
// The public API surface assumes defaultSchemaPolicy
|
|
103
103
|
const policy = index_js_3.defaultSchemaPolicy;
|
|
104
104
|
const configuredPolicy = (0, toStoredSchema_js_1.resolveStoredSchemaGenerationOptions)(stagedSchemaUpgrades);
|
|
105
|
-
const includeAlreadyEnabledUpgrades = configuredPolicy.includeAlreadyEnabledUpgrades ??
|
|
105
|
+
const includeAlreadyEnabledUpgrades = configuredPolicy.includeAlreadyEnabledUpgrades ?? false;
|
|
106
106
|
// Collect upgrade locations during the discrepancy walk (single pass).
|
|
107
107
|
const totalLocations = new Map();
|
|
108
108
|
const enabledLocations = new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaCompatibilityTester.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA2BH,0EAUC;AA6FD,4DAkEC;AAlMD,kEAAsE;AAEtE,kDAK6B;AAE7B,+CAA4C;AAC5C,+DAA2F;AAC3F,4DAA6F;AAG7F,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EhE,IAAI,eAAe,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,gBAAgB,CAAC;IACzB,CAAC;IACD,OAAO;QACN,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE,CAC1B,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC;QACxE,qBAAqB,EAAE,CAAC,OAAO,EAAE,EAAE,CAClC,gBAAgB,CAAC,qBAAqB,CAAC,OAAO,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC;KAChF,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,sBAAsB,CAC9B,cAAkD,EAClD,gBAAoD;IAEpD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAsC,CAAC;IAC7D,KAAK,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,cAAc,EAAE,CAAC;QAC/C,MAAM,OAAO,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;YACpC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAChC,CAAC;aAAM,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YAC5C,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAChC,CAAC;IACF,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tMapNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tValueSchema,\n} from \"../../core/index.js\";\nimport type { SchemaUpgrade, StagedSchemaUpgradePolicy } from \"../core/index.js\";\nimport { NodeKind } from \"../core/index.js\";\nimport { allowsRepoSuperset, defaultSchemaPolicy } from \"../../feature-libraries/index.js\";\nimport { resolveStoredSchemaGenerationOptions, toUpgradeSchema } from \"../toStoredSchema.js\";\nimport type { TreeSchema } from \"../treeSchema.js\";\n\nimport {\n\tgetDiscrepanciesInAllowedContent,\n\ttype Discrepancy,\n\ttype UpgradeLocationCollector,\n} from \"./discrepancies.js\";\nimport type { SchemaCompatibilityStatusBeta, SchemaDiscrepancy } from \"./tree.js\";\n\n/**\n * Describes the discrepancies that prevent a view schema from viewing a stored schema as a\n * readonly array.\n */\nexport function getSchemaIncompatibilityDetails(\n\tviewSchema: TreeSchema,\n\tstored: TreeStoredSchema,\n): readonly SchemaDiscrepancy[] | undefined {\n\tconst discrepancies = [...getDiscrepanciesInAllowedContent(viewSchema, stored)];\n\tif (discrepancies.length === 0) {\n\t\treturn undefined;\n\t}\n\n\treturn discrepancies.map(formatSchemaDiscrepancy);\n}\n\nfunction formatSchemaDiscrepancy(value: Discrepancy): SchemaDiscrepancy {\n\tswitch (value.mismatch) {\n\t\tcase \"allowedTypes\": {\n\t\t\treturn {\n\t\t\t\tmismatch: value.mismatch,\n\t\t\t\tlocation:\n\t\t\t\t\tvalue.identifier === undefined\n\t\t\t\t\t\t? \"root\"\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tnodeType: value.identifier,\n\t\t\t\t\t\t\t\tfieldKey: value.fieldKey,\n\t\t\t\t\t\t\t},\n\t\t\t\tview: value.view.map(({ type }) => type.identifier).sort(),\n\t\t\t\t...(value.stagedView === undefined\n\t\t\t\t\t? {}\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tstagedView: value.stagedView.map(({ type }) => type.identifier).sort(),\n\t\t\t\t\t\t}),\n\t\t\t\tstored: [...value.stored].sort(),\n\t\t\t\t...(value.viewIsStagedOptional === true ? { viewIsStagedOptional: true } : {}),\n\t\t\t};\n\t\t}\n\t\tcase \"fieldKind\": {\n\t\t\treturn {\n\t\t\t\tmismatch: value.mismatch,\n\t\t\t\tlocation:\n\t\t\t\t\tvalue.identifier === undefined\n\t\t\t\t\t\t? \"root\"\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tnodeType: value.identifier,\n\t\t\t\t\t\t\t\tfieldKey: value.fieldKey,\n\t\t\t\t\t\t\t},\n\t\t\t\tview: value.view,\n\t\t\t\tstored: value.stored,\n\t\t\t\t...(value.viewIsStagedOptional === true ? { viewIsStagedOptional: true } : {}),\n\t\t\t};\n\t\t}\n\t\tcase \"valueSchema\": {\n\t\t\treturn {\n\t\t\t\tmismatch: value.mismatch,\n\t\t\t\tnodeType: value.identifier,\n\t\t\t\tview: value.view === undefined ? undefined : ValueSchema[value.view],\n\t\t\t\tstored: value.stored === undefined ? undefined : ValueSchema[value.stored],\n\t\t\t};\n\t\t}\n\t\tcase \"nodeKind\": {\n\t\t\tconst storedNodeKind =\n\t\t\t\tvalue.stored === ObjectNodeStoredSchema\n\t\t\t\t\t? \"Object\"\n\t\t\t\t\t: value.stored === MapNodeStoredSchema\n\t\t\t\t\t\t? \"Map\"\n\t\t\t\t\t\t: \"Leaf\";\n\t\t\treturn {\n\t\t\t\tmismatch: value.mismatch,\n\t\t\t\tnodeType: value.identifier,\n\t\t\t\tview: NodeKind[value.view],\n\t\t\t\tstored: storedNodeKind,\n\t\t\t};\n\t\t}\n\t\tdefault: {\n\t\t\treturn unreachableCase(value);\n\t\t}\n\t}\n}\n\n/**\n * The enablement status of a staged schema upgrade in a document's stored schema.\n *\n * @remarks\n * - `\"disabled\"` — no locations guarded by the upgrade are enabled in stored schema.\n * - `\"partial\"` — at least one location is enabled but not all of them.\n * - `\"enabled\"` — all locations guarded by the upgrade are enabled in stored schema.\n *\n * @alpha\n */\nexport type StagedUpgradeStatus = \"disabled\" | \"partial\" | \"enabled\";\n\n/**\n * Determines the compatibility of a stored document (based on its stored schema) with a viewer (based on its view schema).\n *\n * Adapters can be provided to handle differences between the two schema.\n * Adapters should only use to types in the `view` SchemaRepository.\n *\n * TODO: this API violates the parse don't validate design philosophy.\n * It should be wrapped with (or replaced by) a parse style API.\n *\n * @param viewSchema - Schema for the view\n * @param stored - The stored schema to check compatibility against\n * @param stagedSchemaUpgrades - Staged schema upgrades enabled for this view, or explicit stored-schema generation options\n *\n */\nexport function checkSchemaCompatibility(\n\tviewSchema: TreeSchema,\n\tstored: TreeStoredSchema,\n\tstagedSchemaUpgrades?: Iterable<SchemaUpgrade> | StagedSchemaUpgradePolicy,\n): Omit<SchemaCompatibilityStatusBeta, \"canInitialize\"> & {\n\tenabledUpgrades: ReadonlyMap<SchemaUpgrade, StagedUpgradeStatus>;\n} {\n\t// The public API surface assumes defaultSchemaPolicy\n\tconst policy = defaultSchemaPolicy;\n\tconst configuredPolicy = resolveStoredSchemaGenerationOptions(stagedSchemaUpgrades);\n\tconst includeAlreadyEnabledUpgrades = configuredPolicy.includeAlreadyEnabledUpgrades ?? true;\n\n\t// Collect upgrade locations during the discrepancy walk (single pass).\n\tconst totalLocations = new Map<SchemaUpgrade, number>();\n\tconst enabledLocations = new Map<SchemaUpgrade, number>();\n\tconst upgradeCollector: UpgradeLocationCollector = {\n\t\tallowedType(upgrade, isEnabled) {\n\t\t\ttotalLocations.set(upgrade, (totalLocations.get(upgrade) ?? 0) + 1);\n\t\t\tif (isEnabled) {\n\t\t\t\tenabledLocations.set(upgrade, (enabledLocations.get(upgrade) ?? 0) + 1);\n\t\t\t}\n\t\t},\n\t\toptionalField(upgrade, isEnabled) {\n\t\t\ttotalLocations.set(upgrade, (totalLocations.get(upgrade) ?? 0) + 1);\n\t\t\tif (isEnabled) {\n\t\t\t\tenabledLocations.set(upgrade, (enabledLocations.get(upgrade) ?? 0) + 1);\n\t\t\t}\n\t\t},\n\t};\n\n\t// View schema allows a subset of documents that stored schema does, and the discrepancies are allowed by policy\n\t// determined by the view schema (i.e. objects with extra optional fields in the stored schema have opted into allowing this.\n\t// In the future, this would also include things like:\n\t// - fields with more allowed types in the stored schema than in the view schema have out-of-schema \"unknown content\" adapters\n\t// Complete the full walk even after finding an incompatibility so discrepancy details and\n\t// staged-upgrade status contain all available information for debugging.\n\tconst discrepancies: SchemaDiscrepancy[] = [];\n\tfor (const discrepancy of getDiscrepanciesInAllowedContent(\n\t\tviewSchema,\n\t\tstored,\n\t\tupgradeCollector,\n\t)) {\n\t\tdiscrepancies.push(formatSchemaDiscrepancy(discrepancy));\n\t}\n\tconst canView = discrepancies.length === 0;\n\n\tconst enabledUpgrades = computeUpgradeStatuses(totalLocations, enabledLocations);\n\tconst upgradePolicy = includeAlreadyEnabledUpgrades\n\t\t? includeEnabledUpgrades(configuredPolicy, enabledUpgrades)\n\t\t: configuredPolicy;\n\tconst wouldUpgradeTo = toUpgradeSchema(viewSchema.root, upgradePolicy);\n\n\tconst canUpgrade = allowsRepoSuperset(policy, stored, wouldUpgradeTo);\n\n\t// If true, then upgrading has no effect on what can be stored in the document.\n\t// TODO: This should likely be changed to indicate up a schema upgrade would be a no-op, including stored schema metadata.\n\tconst isEquivalent =\n\t\tcanView && canUpgrade && allowsRepoSuperset(policy, wouldUpgradeTo, stored);\n\n\treturn {\n\t\tcanView,\n\t\tcanUpgrade,\n\t\tisEquivalent,\n\t\tdiscrepancies: canView ? undefined : discrepancies,\n\t\tenabledUpgrades,\n\t};\n}\n\nfunction includeEnabledUpgrades(\n\tconfiguredPolicy: StagedSchemaUpgradePolicy,\n\tenabledUpgrades: ReadonlyMap<SchemaUpgrade, StagedUpgradeStatus>,\n): StagedSchemaUpgradePolicy {\n\tif (enabledUpgrades.size === 0) {\n\t\treturn configuredPolicy;\n\t}\n\treturn {\n\t\tincludeStaged: (upgrade) =>\n\t\t\tconfiguredPolicy.includeStaged(upgrade) || enabledUpgrades.has(upgrade),\n\t\tincludeStagedOptional: (upgrade) =>\n\t\t\tconfiguredPolicy.includeStagedOptional(upgrade) || enabledUpgrades.has(upgrade),\n\t};\n}\n\n/**\n * Computes the {@link StagedUpgradeStatus} for each upgrade token from total and enabled location counts.\n * Only tokens with at least one enabled location are included in the returned map.\n */\nfunction computeUpgradeStatuses(\n\ttotalLocations: ReadonlyMap<SchemaUpgrade, number>,\n\tenabledLocations: ReadonlyMap<SchemaUpgrade, number>,\n): ReadonlyMap<SchemaUpgrade, StagedUpgradeStatus> {\n\tconst result = new Map<SchemaUpgrade, StagedUpgradeStatus>();\n\tfor (const [upgrade, total] of totalLocations) {\n\t\tconst enabled = enabledLocations.get(upgrade) ?? 0;\n\t\tif (enabled > 0 && enabled < total) {\n\t\t\tresult.set(upgrade, \"partial\");\n\t\t} else if (enabled >= total && enabled > 0) {\n\t\t\tresult.set(upgrade, \"enabled\");\n\t\t}\n\t}\n\treturn result;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"schemaCompatibilityTester.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA2BH,0EAUC;AA6FD,4DAmEC;AAnMD,kEAAsE;AAEtE,kDAK6B;AAE7B,+CAA4C;AAC5C,+DAA2F;AAC3F,4DAA6F;AAG7F,yDAI4B;AAG5B;;;GAGG;AACH,SAAgB,+BAA+B,CAC9C,UAAsB,EACtB,MAAwB;IAExB,MAAM,aAAa,GAAG,CAAC,GAAG,IAAA,mDAAgC,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IAChF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,OAAO,aAAa,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAkB;IAClD,QAAQ,KAAK,CAAC,QAAQ,EAAE,CAAC;QACxB,KAAK,cAAc,CAAC,CAAC,CAAC;YACrB,OAAO;gBACN,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,QAAQ,EACP,KAAK,CAAC,UAAU,KAAK,SAAS;oBAC7B,CAAC,CAA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,cAAc,EAAE,CAAC;QAC/C,MAAM,OAAO,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;YACpC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAChC,CAAC;aAAM,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YAC5C,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAChC,CAAC;IACF,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tMapNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tValueSchema,\n} from \"../../core/index.js\";\nimport type { SchemaUpgrade, StagedSchemaUpgradePolicy } from \"../core/index.js\";\nimport { NodeKind } from \"../core/index.js\";\nimport { allowsRepoSuperset, defaultSchemaPolicy } from \"../../feature-libraries/index.js\";\nimport { resolveStoredSchemaGenerationOptions, toUpgradeSchema } from \"../toStoredSchema.js\";\nimport type { TreeSchema } from \"../treeSchema.js\";\n\nimport {\n\tgetDiscrepanciesInAllowedContent,\n\ttype Discrepancy,\n\ttype UpgradeLocationCollector,\n} from \"./discrepancies.js\";\nimport type { SchemaCompatibilityStatusBeta, SchemaDiscrepancy } from \"./tree.js\";\n\n/**\n * Describes the discrepancies that prevent a view schema from viewing a stored schema as a\n * readonly array.\n */\nexport function getSchemaIncompatibilityDetails(\n\tviewSchema: TreeSchema,\n\tstored: TreeStoredSchema,\n): readonly SchemaDiscrepancy[] | undefined {\n\tconst discrepancies = [...getDiscrepanciesInAllowedContent(viewSchema, stored)];\n\tif (discrepancies.length === 0) {\n\t\treturn undefined;\n\t}\n\n\treturn discrepancies.map(formatSchemaDiscrepancy);\n}\n\nfunction formatSchemaDiscrepancy(value: Discrepancy): SchemaDiscrepancy {\n\tswitch (value.mismatch) {\n\t\tcase \"allowedTypes\": {\n\t\t\treturn {\n\t\t\t\tmismatch: value.mismatch,\n\t\t\t\tlocation:\n\t\t\t\t\tvalue.identifier === undefined\n\t\t\t\t\t\t? \"root\"\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tnodeType: value.identifier,\n\t\t\t\t\t\t\t\tfieldKey: value.fieldKey,\n\t\t\t\t\t\t\t},\n\t\t\t\tview: value.view.map(({ type }) => type.identifier).sort(),\n\t\t\t\t...(value.stagedView === undefined\n\t\t\t\t\t? {}\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tstagedView: value.stagedView.map(({ type }) => type.identifier).sort(),\n\t\t\t\t\t\t}),\n\t\t\t\tstored: [...value.stored].sort(),\n\t\t\t\t...(value.viewIsStagedOptional === true ? { viewIsStagedOptional: true } : {}),\n\t\t\t};\n\t\t}\n\t\tcase \"fieldKind\": {\n\t\t\treturn {\n\t\t\t\tmismatch: value.mismatch,\n\t\t\t\tlocation:\n\t\t\t\t\tvalue.identifier === undefined\n\t\t\t\t\t\t? \"root\"\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tnodeType: value.identifier,\n\t\t\t\t\t\t\t\tfieldKey: value.fieldKey,\n\t\t\t\t\t\t\t},\n\t\t\t\tview: value.view,\n\t\t\t\tstored: value.stored,\n\t\t\t\t...(value.viewIsStagedOptional === true ? { viewIsStagedOptional: true } : {}),\n\t\t\t};\n\t\t}\n\t\tcase \"valueSchema\": {\n\t\t\treturn {\n\t\t\t\tmismatch: value.mismatch,\n\t\t\t\tnodeType: value.identifier,\n\t\t\t\tview: value.view === undefined ? undefined : ValueSchema[value.view],\n\t\t\t\tstored: value.stored === undefined ? undefined : ValueSchema[value.stored],\n\t\t\t};\n\t\t}\n\t\tcase \"nodeKind\": {\n\t\t\tconst storedNodeKind =\n\t\t\t\tvalue.stored === ObjectNodeStoredSchema\n\t\t\t\t\t? \"Object\"\n\t\t\t\t\t: value.stored === MapNodeStoredSchema\n\t\t\t\t\t\t? \"Map\"\n\t\t\t\t\t\t: \"Leaf\";\n\t\t\treturn {\n\t\t\t\tmismatch: value.mismatch,\n\t\t\t\tnodeType: value.identifier,\n\t\t\t\tview: NodeKind[value.view],\n\t\t\t\tstored: storedNodeKind,\n\t\t\t};\n\t\t}\n\t\tdefault: {\n\t\t\treturn unreachableCase(value);\n\t\t}\n\t}\n}\n\n/**\n * The enablement status of a staged schema upgrade in a document's stored schema.\n *\n * @remarks\n * - `\"disabled\"` — no locations guarded by the upgrade are enabled in stored schema.\n * - `\"partial\"` — at least one location is enabled but not all of them.\n * - `\"enabled\"` — all locations guarded by the upgrade are enabled in stored schema.\n *\n * @alpha\n */\nexport type StagedUpgradeStatus = \"disabled\" | \"partial\" | \"enabled\";\n\n/**\n * Determines the compatibility of a stored document (based on its stored schema) with a viewer (based on its view schema).\n *\n * Adapters can be provided to handle differences between the two schema.\n * Adapters should only use to types in the `view` SchemaRepository.\n *\n * TODO: this API violates the parse don't validate design philosophy.\n * It should be wrapped with (or replaced by) a parse style API.\n *\n * @param viewSchema - Schema for the view\n * @param stored - The stored schema to check compatibility against\n * @param stagedSchemaUpgrades - Staged schema upgrades enabled for this view, or explicit stored-schema generation options\n *\n */\nexport function checkSchemaCompatibility(\n\tviewSchema: TreeSchema,\n\tstored: TreeStoredSchema,\n\tstagedSchemaUpgrades?: Iterable<SchemaUpgrade> | StagedSchemaUpgradePolicy,\n): Omit<SchemaCompatibilityStatusBeta, \"canInitialize\"> & {\n\tenabledUpgrades: ReadonlyMap<SchemaUpgrade, StagedUpgradeStatus>;\n} {\n\t// The public API surface assumes defaultSchemaPolicy\n\tconst policy = defaultSchemaPolicy;\n\tconst configuredPolicy = resolveStoredSchemaGenerationOptions(stagedSchemaUpgrades);\n\tconst includeAlreadyEnabledUpgrades =\n\t\tconfiguredPolicy.includeAlreadyEnabledUpgrades ?? false;\n\n\t// Collect upgrade locations during the discrepancy walk (single pass).\n\tconst totalLocations = new Map<SchemaUpgrade, number>();\n\tconst enabledLocations = new Map<SchemaUpgrade, number>();\n\tconst upgradeCollector: UpgradeLocationCollector = {\n\t\tallowedType(upgrade, isEnabled) {\n\t\t\ttotalLocations.set(upgrade, (totalLocations.get(upgrade) ?? 0) + 1);\n\t\t\tif (isEnabled) {\n\t\t\t\tenabledLocations.set(upgrade, (enabledLocations.get(upgrade) ?? 0) + 1);\n\t\t\t}\n\t\t},\n\t\toptionalField(upgrade, isEnabled) {\n\t\t\ttotalLocations.set(upgrade, (totalLocations.get(upgrade) ?? 0) + 1);\n\t\t\tif (isEnabled) {\n\t\t\t\tenabledLocations.set(upgrade, (enabledLocations.get(upgrade) ?? 0) + 1);\n\t\t\t}\n\t\t},\n\t};\n\n\t// View schema allows a subset of documents that stored schema does, and the discrepancies are allowed by policy\n\t// determined by the view schema (i.e. objects with extra optional fields in the stored schema have opted into allowing this.\n\t// In the future, this would also include things like:\n\t// - fields with more allowed types in the stored schema than in the view schema have out-of-schema \"unknown content\" adapters\n\t// Complete the full walk even after finding an incompatibility so discrepancy details and\n\t// staged-upgrade status contain all available information for debugging.\n\tconst discrepancies: SchemaDiscrepancy[] = [];\n\tfor (const discrepancy of getDiscrepanciesInAllowedContent(\n\t\tviewSchema,\n\t\tstored,\n\t\tupgradeCollector,\n\t)) {\n\t\tdiscrepancies.push(formatSchemaDiscrepancy(discrepancy));\n\t}\n\tconst canView = discrepancies.length === 0;\n\n\tconst enabledUpgrades = computeUpgradeStatuses(totalLocations, enabledLocations);\n\tconst upgradePolicy = includeAlreadyEnabledUpgrades\n\t\t? includeEnabledUpgrades(configuredPolicy, enabledUpgrades)\n\t\t: configuredPolicy;\n\tconst wouldUpgradeTo = toUpgradeSchema(viewSchema.root, upgradePolicy);\n\n\tconst canUpgrade = allowsRepoSuperset(policy, stored, wouldUpgradeTo);\n\n\t// If true, then upgrading has no effect on what can be stored in the document.\n\t// TODO: This should likely be changed to indicate up a schema upgrade would be a no-op, including stored schema metadata.\n\tconst isEquivalent =\n\t\tcanView && canUpgrade && allowsRepoSuperset(policy, wouldUpgradeTo, stored);\n\n\treturn {\n\t\tcanView,\n\t\tcanUpgrade,\n\t\tisEquivalent,\n\t\tdiscrepancies: canView ? undefined : discrepancies,\n\t\tenabledUpgrades,\n\t};\n}\n\nfunction includeEnabledUpgrades(\n\tconfiguredPolicy: StagedSchemaUpgradePolicy,\n\tenabledUpgrades: ReadonlyMap<SchemaUpgrade, StagedUpgradeStatus>,\n): StagedSchemaUpgradePolicy {\n\tif (enabledUpgrades.size === 0) {\n\t\treturn configuredPolicy;\n\t}\n\treturn {\n\t\tincludeStaged: (upgrade) =>\n\t\t\tconfiguredPolicy.includeStaged(upgrade) || enabledUpgrades.has(upgrade),\n\t\tincludeStagedOptional: (upgrade) =>\n\t\t\tconfiguredPolicy.includeStagedOptional(upgrade) || enabledUpgrades.has(upgrade),\n\t};\n}\n\n/**\n * Computes the {@link StagedUpgradeStatus} for each upgrade token from total and enabled location counts.\n * Only tokens with at least one enabled location are included in the returned map.\n */\nfunction computeUpgradeStatuses(\n\ttotalLocations: ReadonlyMap<SchemaUpgrade, number>,\n\tenabledLocations: ReadonlyMap<SchemaUpgrade, number>,\n): ReadonlyMap<SchemaUpgrade, StagedUpgradeStatus> {\n\tconst result = new Map<SchemaUpgrade, StagedUpgradeStatus>();\n\tfor (const [upgrade, total] of totalLocations) {\n\t\tconst enabled = enabledLocations.get(upgrade) ?? 0;\n\t\tif (enabled > 0 && enabled < total) {\n\t\t\tresult.set(upgrade, \"partial\");\n\t\t} else if (enabled >= total && enabled > 0) {\n\t\t\tresult.set(upgrade, \"enabled\");\n\t\t}\n\t}\n\treturn result;\n}\n"]}
|
|
@@ -548,9 +548,8 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
|
|
|
548
548
|
*
|
|
549
549
|
* When using {@link TreeViewConfigurationAlpha} with a {@link ITreeViewConfigurationAlpha.stagedUpgradePolicy},
|
|
550
550
|
* staged schema upgrades matching the configured policy are included in the target stored schema.
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
-
* creating the policy to only include staged upgrades selected explicitly by the policy.
|
|
551
|
+
* Set {@link (StagedSchemaUpgradePolicy:interface).includeAlreadyEnabledUpgrades} to `true` to
|
|
552
|
+
* also include staged upgrades that are already enabled in the document.
|
|
554
553
|
*
|
|
555
554
|
* @example Enabling a staged allowed type for documents, selected by a feature flag
|
|
556
555
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/tree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE/F,OAAO,KAAK,EACX,cAAc,EACd,cAAc,EACd,kBAAkB,EAGlB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EACX,sBAAsB,EACtB,4BAA4B,EAC5B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EACX,mBAAmB,EACnB,eAAe,EACf,oCAAoC,EACpC,aAAa,EACb,UAAU,EACV,0BAA0B,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EACX,yBAAyB,EACzB,wBAAwB,EACxB,8BA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