@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.
Files changed (129) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/api-report/tree.alpha.api.md +44 -1
  3. package/api-report/tree.beta.api.md +38 -0
  4. package/api-report/tree.legacy.beta.api.md +38 -0
  5. package/dist/entrypoints/alpha.d.ts +1 -1
  6. package/dist/entrypoints/alpha.d.ts.map +1 -1
  7. package/dist/entrypoints/alpha.js.map +1 -1
  8. package/dist/entrypoints/beta.d.ts +1 -1
  9. package/dist/entrypoints/beta.d.ts.map +1 -1
  10. package/dist/entrypoints/beta.js.map +1 -1
  11. package/dist/entrypoints/legacy.d.ts +1 -1
  12. package/dist/entrypoints/legacy.d.ts.map +1 -1
  13. package/dist/entrypoints/legacy.js.map +1 -1
  14. package/dist/feature-libraries/index.d.ts +1 -1
  15. package/dist/feature-libraries/index.js.map +1 -1
  16. package/dist/feature-libraries/schemaChecker.d.ts +9 -19
  17. package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
  18. package/dist/feature-libraries/schemaChecker.js +130 -46
  19. package/dist/feature-libraries/schemaChecker.js.map +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/packageVersion.d.ts +1 -1
  24. package/dist/packageVersion.js +1 -1
  25. package/dist/packageVersion.js.map +1 -1
  26. package/dist/shared-tree/schematizingTreeView.d.ts +13 -3
  27. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  28. package/dist/shared-tree/schematizingTreeView.js +48 -11
  29. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  30. package/dist/simple-tree/api/configuration.d.ts +4 -4
  31. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  32. package/dist/simple-tree/api/configuration.js.map +1 -1
  33. package/dist/simple-tree/api/discrepancies.d.ts +36 -3
  34. package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
  35. package/dist/simple-tree/api/discrepancies.js +40 -14
  36. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  37. package/dist/simple-tree/api/index.d.ts +3 -2
  38. package/dist/simple-tree/api/index.d.ts.map +1 -1
  39. package/dist/simple-tree/api/index.js +3 -2
  40. package/dist/simple-tree/api/index.js.map +1 -1
  41. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +22 -3
  42. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  43. package/dist/simple-tree/api/schemaCompatibilityTester.js +140 -10
  44. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  45. package/dist/simple-tree/api/tree.d.ts +172 -7
  46. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  47. package/dist/simple-tree/api/tree.js.map +1 -1
  48. package/dist/simple-tree/core/toStored.d.ts +7 -0
  49. package/dist/simple-tree/core/toStored.d.ts.map +1 -1
  50. package/dist/simple-tree/core/toStored.js.map +1 -1
  51. package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  52. package/dist/simple-tree/core/treeNodeValid.js +2 -2
  53. package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
  54. package/dist/simple-tree/index.d.ts +1 -1
  55. package/dist/simple-tree/index.d.ts.map +1 -1
  56. package/dist/simple-tree/index.js +4 -3
  57. package/dist/simple-tree/index.js.map +1 -1
  58. package/docs/main/glossary.md +163 -0
  59. package/lib/entrypoints/alpha.d.ts +1 -1
  60. package/lib/entrypoints/alpha.d.ts.map +1 -1
  61. package/lib/entrypoints/alpha.js.map +1 -1
  62. package/lib/entrypoints/beta.d.ts +1 -1
  63. package/lib/entrypoints/beta.d.ts.map +1 -1
  64. package/lib/entrypoints/beta.js.map +1 -1
  65. package/lib/entrypoints/legacy.d.ts +1 -1
  66. package/lib/entrypoints/legacy.d.ts.map +1 -1
  67. package/lib/entrypoints/legacy.js.map +1 -1
  68. package/lib/feature-libraries/index.d.ts +1 -1
  69. package/lib/feature-libraries/index.js.map +1 -1
  70. package/lib/feature-libraries/schemaChecker.d.ts +9 -19
  71. package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
  72. package/lib/feature-libraries/schemaChecker.js +133 -49
  73. package/lib/feature-libraries/schemaChecker.js.map +1 -1
  74. package/lib/index.d.ts +1 -1
  75. package/lib/index.d.ts.map +1 -1
  76. package/lib/index.js.map +1 -1
  77. package/lib/packageVersion.d.ts +1 -1
  78. package/lib/packageVersion.js +1 -1
  79. package/lib/packageVersion.js.map +1 -1
  80. package/lib/shared-tree/schematizingTreeView.d.ts +13 -3
  81. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  82. package/lib/shared-tree/schematizingTreeView.js +49 -12
  83. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  84. package/lib/simple-tree/api/configuration.d.ts +4 -4
  85. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  86. package/lib/simple-tree/api/configuration.js.map +1 -1
  87. package/lib/simple-tree/api/discrepancies.d.ts +36 -3
  88. package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
  89. package/lib/simple-tree/api/discrepancies.js +40 -14
  90. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  91. package/lib/simple-tree/api/index.d.ts +3 -2
  92. package/lib/simple-tree/api/index.d.ts.map +1 -1
  93. package/lib/simple-tree/api/index.js +1 -1
  94. package/lib/simple-tree/api/index.js.map +1 -1
  95. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +22 -3
  96. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  97. package/lib/simple-tree/api/schemaCompatibilityTester.js +136 -7
  98. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  99. package/lib/simple-tree/api/tree.d.ts +172 -7
  100. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  101. package/lib/simple-tree/api/tree.js.map +1 -1
  102. package/lib/simple-tree/core/toStored.d.ts +7 -0
  103. package/lib/simple-tree/core/toStored.d.ts.map +1 -1
  104. package/lib/simple-tree/core/toStored.js.map +1 -1
  105. package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  106. package/lib/simple-tree/core/treeNodeValid.js +3 -3
  107. package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
  108. package/lib/simple-tree/index.d.ts +1 -1
  109. package/lib/simple-tree/index.d.ts.map +1 -1
  110. package/lib/simple-tree/index.js +1 -1
  111. package/lib/simple-tree/index.js.map +1 -1
  112. package/package.json +22 -22
  113. package/src/entrypoints/alpha.ts +3 -0
  114. package/src/entrypoints/beta.ts +2 -0
  115. package/src/entrypoints/legacy.ts +2 -0
  116. package/src/feature-libraries/index.ts +1 -1
  117. package/src/feature-libraries/schemaChecker.ts +198 -82
  118. package/src/index.ts +3 -0
  119. package/src/packageVersion.ts +1 -1
  120. package/src/shared-tree/schematizingTreeView.ts +75 -21
  121. package/src/simple-tree/api/configuration.ts +4 -4
  122. package/src/simple-tree/api/discrepancies.ts +100 -5
  123. package/src/simple-tree/api/index.ts +7 -1
  124. package/src/simple-tree/api/schemaCompatibilityTester.ts +186 -11
  125. package/src/simple-tree/api/tree.ts +184 -8
  126. package/src/simple-tree/core/toStored.ts +8 -0
  127. package/src/simple-tree/core/treeNodeValid.ts +3 -1
  128. package/src/simple-tree/index.ts +4 -0
  129. package/docs/main/runtime-schema-upgrade.md +0 -208
@@ -2,10 +2,26 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import type { TreeStoredSchema } from "../../core/index.js";
5
+ import { type TreeStoredSchema } from "../../core/index.js";
6
6
  import type { SchemaUpgrade, StagedSchemaUpgradePolicy } from "../core/index.js";
7
7
  import type { TreeSchema } from "../treeSchema.js";
8
- import type { SchemaCompatibilityStatus } from "./tree.js";
8
+ import type { SchemaCompatibilityStatusBeta, SchemaDiscrepancy } from "./tree.js";
9
+ /**
10
+ * Describes the discrepancies that prevent a view schema from viewing a stored schema as a
11
+ * readonly array.
12
+ */
13
+ export declare function getSchemaIncompatibilityDetails(viewSchema: TreeSchema, stored: TreeStoredSchema): readonly SchemaDiscrepancy[] | undefined;
14
+ /**
15
+ * The enablement status of a staged schema upgrade in a document's stored schema.
16
+ *
17
+ * @remarks
18
+ * - `"disabled"` — no locations guarded by the upgrade are enabled in stored schema.
19
+ * - `"partial"` — at least one location is enabled but not all of them.
20
+ * - `"enabled"` — all locations guarded by the upgrade are enabled in stored schema.
21
+ *
22
+ * @alpha
23
+ */
24
+ export type StagedUpgradeStatus = "disabled" | "partial" | "enabled";
9
25
  /**
10
26
  * Determines the compatibility of a stored document (based on its stored schema) with a viewer (based on its view schema).
11
27
  *
@@ -18,6 +34,9 @@ import type { SchemaCompatibilityStatus } from "./tree.js";
18
34
  * @param viewSchema - Schema for the view
19
35
  * @param stored - The stored schema to check compatibility against
20
36
  * @param stagedSchemaUpgrades - Staged schema upgrades enabled for this view, or explicit stored-schema generation options
37
+ *
21
38
  */
22
- export declare function checkSchemaCompatibility(viewSchema: TreeSchema, stored: TreeStoredSchema, stagedSchemaUpgrades?: Iterable<SchemaUpgrade> | StagedSchemaUpgradePolicy): Omit<SchemaCompatibilityStatus, "canInitialize">;
39
+ export declare function checkSchemaCompatibility(viewSchema: TreeSchema, stored: TreeStoredSchema, stagedSchemaUpgrades?: Iterable<SchemaUpgrade> | StagedSchemaUpgradePolicy): Omit<SchemaCompatibilityStatusBeta, "canInitialize"> & {
40
+ enabledUpgrades: ReadonlyMap<SchemaUpgrade, StagedUpgradeStatus>;
41
+ };
23
42
  //# sourceMappingURL=schemaCompatibilityTester.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemaCompatibilityTester.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,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B,CAAC,CAAC;CACjE,CA6DA"}
@@ -2,9 +2,84 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import { unreachableCase } from "@fluidframework/core-utils/internal";
6
+ import { MapNodeStoredSchema, ObjectNodeStoredSchema, ValueSchema, } from "../../core/index.js";
7
+ import { NodeKind } from "../core/index.js";
5
8
  import { allowsRepoSuperset, defaultSchemaPolicy } from "../../feature-libraries/index.js";
6
- import { toUpgradeSchema } from "../toStoredSchema.js";
7
- import { getDiscrepanciesInAllowedContent } from "./discrepancies.js";
9
+ import { resolveStoredSchemaGenerationOptions, toUpgradeSchema } from "../toStoredSchema.js";
10
+ import { getDiscrepanciesInAllowedContent, } from "./discrepancies.js";
11
+ /**
12
+ * Describes the discrepancies that prevent a view schema from viewing a stored schema as a
13
+ * readonly array.
14
+ */
15
+ export function getSchemaIncompatibilityDetails(viewSchema, stored) {
16
+ const discrepancies = [...getDiscrepanciesInAllowedContent(viewSchema, stored)];
17
+ if (discrepancies.length === 0) {
18
+ return undefined;
19
+ }
20
+ return discrepancies.map(formatSchemaDiscrepancy);
21
+ }
22
+ function formatSchemaDiscrepancy(value) {
23
+ switch (value.mismatch) {
24
+ case "allowedTypes": {
25
+ return {
26
+ mismatch: value.mismatch,
27
+ location: value.identifier === undefined
28
+ ? "root"
29
+ : {
30
+ nodeType: value.identifier,
31
+ fieldKey: value.fieldKey,
32
+ },
33
+ view: value.view.map(({ type }) => type.identifier).sort(),
34
+ ...(value.stagedView === undefined
35
+ ? {}
36
+ : {
37
+ stagedView: value.stagedView.map(({ type }) => type.identifier).sort(),
38
+ }),
39
+ stored: [...value.stored].sort(),
40
+ ...(value.viewIsStagedOptional === true ? { viewIsStagedOptional: true } : {}),
41
+ };
42
+ }
43
+ case "fieldKind": {
44
+ return {
45
+ mismatch: value.mismatch,
46
+ location: value.identifier === undefined
47
+ ? "root"
48
+ : {
49
+ nodeType: value.identifier,
50
+ fieldKey: value.fieldKey,
51
+ },
52
+ view: value.view,
53
+ stored: value.stored,
54
+ ...(value.viewIsStagedOptional === true ? { viewIsStagedOptional: true } : {}),
55
+ };
56
+ }
57
+ case "valueSchema": {
58
+ return {
59
+ mismatch: value.mismatch,
60
+ nodeType: value.identifier,
61
+ view: value.view === undefined ? undefined : ValueSchema[value.view],
62
+ stored: value.stored === undefined ? undefined : ValueSchema[value.stored],
63
+ };
64
+ }
65
+ case "nodeKind": {
66
+ const storedNodeKind = value.stored === ObjectNodeStoredSchema
67
+ ? "Object"
68
+ : value.stored === MapNodeStoredSchema
69
+ ? "Map"
70
+ : "Leaf";
71
+ return {
72
+ mismatch: value.mismatch,
73
+ nodeType: value.identifier,
74
+ view: NodeKind[value.view],
75
+ stored: storedNodeKind,
76
+ };
77
+ }
78
+ default: {
79
+ return unreachableCase(value);
80
+ }
81
+ }
82
+ }
8
83
  /**
9
84
  * Determines the compatibility of a stored document (based on its stored schema) with a viewer (based on its view schema).
10
85
  *
@@ -17,20 +92,46 @@ import { getDiscrepanciesInAllowedContent } from "./discrepancies.js";
17
92
  * @param viewSchema - Schema for the view
18
93
  * @param stored - The stored schema to check compatibility against
19
94
  * @param stagedSchemaUpgrades - Staged schema upgrades enabled for this view, or explicit stored-schema generation options
95
+ *
20
96
  */
21
97
  export function checkSchemaCompatibility(viewSchema, stored, stagedSchemaUpgrades) {
22
98
  // The public API surface assumes defaultSchemaPolicy
23
99
  const policy = defaultSchemaPolicy;
100
+ const configuredPolicy = resolveStoredSchemaGenerationOptions(stagedSchemaUpgrades);
101
+ const includeAlreadyEnabledUpgrades = configuredPolicy.includeAlreadyEnabledUpgrades ?? false;
102
+ // Collect upgrade locations during the discrepancy walk (single pass).
103
+ const totalLocations = new Map();
104
+ const enabledLocations = new Map();
105
+ const upgradeCollector = {
106
+ allowedType(upgrade, isEnabled) {
107
+ totalLocations.set(upgrade, (totalLocations.get(upgrade) ?? 0) + 1);
108
+ if (isEnabled) {
109
+ enabledLocations.set(upgrade, (enabledLocations.get(upgrade) ?? 0) + 1);
110
+ }
111
+ },
112
+ optionalField(upgrade, isEnabled) {
113
+ totalLocations.set(upgrade, (totalLocations.get(upgrade) ?? 0) + 1);
114
+ if (isEnabled) {
115
+ enabledLocations.set(upgrade, (enabledLocations.get(upgrade) ?? 0) + 1);
116
+ }
117
+ },
118
+ };
24
119
  // View schema allows a subset of documents that stored schema does, and the discrepancies are allowed by policy
25
120
  // determined by the view schema (i.e. objects with extra optional fields in the stored schema have opted into allowing this.
26
121
  // In the future, this would also include things like:
27
122
  // - fields with more allowed types in the stored schema than in the view schema have out-of-schema "unknown content" adapters
28
- let canView = true;
29
- for (const _discrepancy of getDiscrepanciesInAllowedContent(viewSchema, stored)) {
30
- canView = false;
31
- break;
123
+ // Complete the full walk even after finding an incompatibility so discrepancy details and
124
+ // staged-upgrade status contain all available information for debugging.
125
+ const discrepancies = [];
126
+ for (const discrepancy of getDiscrepanciesInAllowedContent(viewSchema, stored, upgradeCollector)) {
127
+ discrepancies.push(formatSchemaDiscrepancy(discrepancy));
32
128
  }
33
- const wouldUpgradeTo = toUpgradeSchema(viewSchema.root, stagedSchemaUpgrades);
129
+ const canView = discrepancies.length === 0;
130
+ const enabledUpgrades = computeUpgradeStatuses(totalLocations, enabledLocations);
131
+ const upgradePolicy = includeAlreadyEnabledUpgrades
132
+ ? includeEnabledUpgrades(configuredPolicy, enabledUpgrades)
133
+ : configuredPolicy;
134
+ const wouldUpgradeTo = toUpgradeSchema(viewSchema.root, upgradePolicy);
34
135
  const canUpgrade = allowsRepoSuperset(policy, stored, wouldUpgradeTo);
35
136
  // If true, then upgrading has no effect on what can be stored in the document.
36
137
  // TODO: This should likely be changed to indicate up a schema upgrade would be a no-op, including stored schema metadata.
@@ -39,6 +140,34 @@ export function checkSchemaCompatibility(viewSchema, stored, stagedSchemaUpgrade
39
140
  canView,
40
141
  canUpgrade,
41
142
  isEquivalent,
143
+ discrepancies: canView ? undefined : discrepancies,
144
+ enabledUpgrades,
42
145
  };
43
146
  }
147
+ function includeEnabledUpgrades(configuredPolicy, enabledUpgrades) {
148
+ if (enabledUpgrades.size === 0) {
149
+ return configuredPolicy;
150
+ }
151
+ return {
152
+ includeStaged: (upgrade) => configuredPolicy.includeStaged(upgrade) || enabledUpgrades.has(upgrade),
153
+ includeStagedOptional: (upgrade) => configuredPolicy.includeStagedOptional(upgrade) || enabledUpgrades.has(upgrade),
154
+ };
155
+ }
156
+ /**
157
+ * Computes the {@link StagedUpgradeStatus} for each upgrade token from total and enabled location counts.
158
+ * Only tokens with at least one enabled location are included in the returned map.
159
+ */
160
+ function computeUpgradeStatuses(totalLocations, enabledLocations) {
161
+ const result = new Map();
162
+ for (const [upgrade, total] of totalLocations) {
163
+ const enabled = enabledLocations.get(upgrade) ?? 0;
164
+ if (enabled > 0 && enabled < total) {
165
+ result.set(upgrade, "partial");
166
+ }
167
+ else if (enabled >= total && enabled > 0) {
168
+ result.set(upgrade, "enabled");
169
+ }
170
+ }
171
+ return result;
172
+ }
44
173
  //# sourceMappingURL=schemaCompatibilityTester.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemaCompatibilityTester.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,wBAAwB,CACvC,UAAsB,EACtB,MAAwB,EACxB,oBAA0E;IAE1E,qDAAqD;IACrD,MAAM,MAAM,GAAG,mBAAmB,CAAC;IAEnC,gHAAgH;IAChH,6HAA6H;IAC7H,sDAAsD;IACtD,8HAA8H;IAC9H,IAAI,OAAO,GAAG,IAAI,CAAC;IAEnB,KAAK,MAAM,YAAY,IAAI,gCAAgC,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,CAAC;QACjF,OAAO,GAAG,KAAK,CAAC;QAChB,MAAM;IACP,CAAC;IAED,MAAM,cAAc,GAAG,eAAe,CAAC,UAAU,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;IAE9E,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAEtE,+EAA+E;IAC/E,0HAA0H;IAC1H,MAAM,YAAY,GACjB,OAAO,IAAI,UAAU,IAAI,kBAAkB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;IAE7E,OAAO;QACN,OAAO;QACP,UAAU;QACV,YAAY;KACZ,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TreeStoredSchema } from \"../../core/index.js\";\nimport type { SchemaUpgrade, StagedSchemaUpgradePolicy } from \"../core/index.js\";\nimport { allowsRepoSuperset, defaultSchemaPolicy } from \"../../feature-libraries/index.js\";\nimport { toUpgradeSchema } from \"../toStoredSchema.js\";\nimport type { TreeSchema } from \"../treeSchema.js\";\n\nimport { getDiscrepanciesInAllowedContent } from \"./discrepancies.js\";\nimport type { SchemaCompatibilityStatus } from \"./tree.js\";\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 */\nexport function checkSchemaCompatibility(\n\tviewSchema: TreeSchema,\n\tstored: TreeStoredSchema,\n\tstagedSchemaUpgrades?: Iterable<SchemaUpgrade> | StagedSchemaUpgradePolicy,\n): Omit<SchemaCompatibilityStatus, \"canInitialize\"> {\n\t// The public API surface assumes defaultSchemaPolicy\n\tconst policy = defaultSchemaPolicy;\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\tlet canView = true;\n\n\tfor (const _discrepancy of getDiscrepanciesInAllowedContent(viewSchema, stored)) {\n\t\tcanView = false;\n\t\tbreak;\n\t}\n\n\tconst wouldUpgradeTo = toUpgradeSchema(viewSchema.root, stagedSchemaUpgrades);\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};\n}\n"]}
1
+ {"version":3,"file":"schemaCompatibilityTester.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EACN,mBAAmB,EACnB,sBAAsB,EAEtB,WAAW,GACX,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC3F,OAAO,EAAE,oCAAoC,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG7F,OAAO,EACN,gCAAgC,GAGhC,MAAM,oBAAoB,CAAC;AAG5B;;;GAGG;AACH,MAAM,UAAU,+BAA+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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 =\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"]}
@@ -5,10 +5,12 @@
5
5
  import type { IFluidLoadable, IDisposable, Listenable } from "@fluidframework/core-interfaces";
6
6
  import type { ChangeMetadata, CommitMetadata, CustomMetadataTree, RevertibleAlphaFactory, RevertibleFactory, RevertToOptionsAlpha } from "../../core/index.js";
7
7
  import type { JsonCompatibleReadOnly, JsonCompatibleReadOnlyObject } from "../../util/index.js";
8
+ import type { SchemaUpgrade } from "../core/index.js";
8
9
  import type { ImplicitFieldSchema, InsertableField, InsertableTreeFieldFromImplicitField, ReadableField, ReadSchema, TreeFieldFromImplicitField } from "../fieldSchema.js";
9
10
  import type { SimpleTreeSchema } from "../simpleSchema.js";
10
11
  import type { UnsafeUnknownSchema } from "../unsafeUnknownSchema.js";
11
12
  import type { TreeViewConfiguration } from "./configuration.js";
13
+ import type { StagedUpgradeStatus } from "./schemaCompatibilityTester.js";
12
14
  import type { RunTransactionParamsAlpha, RunTransactionParamsBeta, TransactionCallbackStatusAlpha, TransactionCallbackStatusBeta, TransactionVoidResult, TransactionValueResult, VoidTransactionCallbackStatusAlpha, VoidTransactionCallbackStatusBeta, WithValue } from "./transactionTypes.js";
13
15
  import type { VerboseTree } from "./verboseTree.js";
14
16
  /**
@@ -485,9 +487,8 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
485
487
  *
486
488
  * When using {@link TreeViewConfigurationAlpha} with a {@link ITreeViewConfigurationAlpha.stagedUpgradePolicy},
487
489
  * staged schema upgrades matching the configured policy are included in the target stored schema.
488
- * Once a staged schema upgrade has been enabled in a document's stored schema, loading that document
489
- * with a view that does not include equivalent staged members in its construction-time policy will cause
490
- * `upgradeSchema` to throw a `UsageError` because the requested target would narrow the stored schema.
490
+ * Set {@link (StagedSchemaUpgradePolicy:interface).includeAlreadyEnabledUpgrades} to `true` to
491
+ * also include staged upgrades that are already enabled in the document.
491
492
  *
492
493
  * @example Enabling a staged allowed type for documents, selected by a feature flag
493
494
  *
@@ -555,11 +556,163 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
555
556
  */
556
557
  readonly schema: TSchema;
557
558
  }
559
+ /**
560
+ * A discrepancy between a view schema and a document's stored schema.
561
+ *
562
+ * @remarks
563
+ * The `mismatch` property discriminates the different discrepancy shapes.
564
+ *
565
+ * @sealed @beta
566
+ */
567
+ export type SchemaDiscrepancy = {
568
+ /**
569
+ * Indicates that a field allows different node types in the view and stored schemas.
570
+ */
571
+ readonly mismatch: "allowedTypes";
572
+ /**
573
+ * The field with the discrepancy.
574
+ *
575
+ * `"root"` identifies the root field. Otherwise, `nodeType` identifies the containing
576
+ * node schema and `fieldKey` identifies its field. `fieldKey` is undefined for a map
577
+ * node's implicit field.
578
+ */
579
+ readonly location: "root" | {
580
+ readonly nodeType: string;
581
+ readonly fieldKey: string | undefined;
582
+ };
583
+ /**
584
+ * Non-staged node type identifiers allowed by the view schema but not the stored schema.
585
+ */
586
+ readonly view: readonly string[];
587
+ /**
588
+ * Staged node type identifiers allowed by the view schema but not the stored schema.
589
+ *
590
+ * @remarks These types provide rollout context but do not cause the discrepancy.
591
+ */
592
+ readonly stagedView?: readonly string[];
593
+ /**
594
+ * Node type identifiers allowed by the stored schema but not the view schema.
595
+ */
596
+ readonly stored: readonly string[];
597
+ /**
598
+ * Whether the view field is a staged optional field.
599
+ *
600
+ * @remarks Omitted when false.
601
+ */
602
+ readonly viewIsStagedOptional?: true;
603
+ } | {
604
+ /**
605
+ * Indicates that a field has different field kinds in the view and stored schemas.
606
+ */
607
+ readonly mismatch: "fieldKind";
608
+ /**
609
+ * The field with the discrepancy.
610
+ *
611
+ * `"root"` identifies the root field. Otherwise, `nodeType` identifies the containing
612
+ * node schema and `fieldKey` identifies its field. `fieldKey` is undefined for a map
613
+ * node's implicit field.
614
+ */
615
+ readonly location: "root" | {
616
+ readonly nodeType: string;
617
+ readonly fieldKey: string | undefined;
618
+ };
619
+ /**
620
+ * The field kind required by the view schema.
621
+ */
622
+ readonly view: string;
623
+ /**
624
+ * The field kind recorded in the stored schema.
625
+ */
626
+ readonly stored: string;
627
+ /**
628
+ * Whether the view field is a staged optional field.
629
+ *
630
+ * @remarks Omitted when false.
631
+ */
632
+ readonly viewIsStagedOptional?: true;
633
+ } | {
634
+ /**
635
+ * Indicates that a leaf node accepts different value types in the view and stored schemas.
636
+ */
637
+ readonly mismatch: "valueSchema";
638
+ /**
639
+ * The identifier of the leaf node schema with the discrepancy.
640
+ */
641
+ readonly nodeType: string;
642
+ /**
643
+ * The value schema required by the view, or undefined when it does not constrain values.
644
+ */
645
+ readonly view: string | undefined;
646
+ /**
647
+ * The value schema recorded in the stored schema, or undefined when it does not constrain values.
648
+ */
649
+ readonly stored: string | undefined;
650
+ } | {
651
+ /**
652
+ * Indicates that a node is represented by different node kinds in the view and stored schemas.
653
+ */
654
+ readonly mismatch: "nodeKind";
655
+ /**
656
+ * The identifier of the node schema with the discrepancy.
657
+ */
658
+ readonly nodeType: string;
659
+ /**
660
+ * The node kind required by the view schema.
661
+ */
662
+ readonly view: string;
663
+ /**
664
+ * The node kind recorded in the stored schema.
665
+ */
666
+ readonly stored: string;
667
+ };
668
+ /**
669
+ * {@link SchemaCompatibilityStatus} with additional beta APIs.
670
+ *
671
+ * @sealed @beta
672
+ */
673
+ export interface SchemaCompatibilityStatusBeta extends SchemaCompatibilityStatus {
674
+ /**
675
+ * Details about the schema discrepancies that prevent this view from accessing the tree.
676
+ *
677
+ * @remarks
678
+ * This property is undefined when {@link SchemaCompatibilityStatus.canView} is true and present
679
+ * when `canView` is false.
680
+ * It can include application-defined schema identifiers and field keys.
681
+ *
682
+ * @example Interpreting an allowed-types discrepancy
683
+ *
684
+ * If a document's stored schema allows `string` for `Todo.title`, but the view schema expects
685
+ * `number`, the discrepancy identifies the field and the type permitted by each schema:
686
+ *
687
+ * ```typescript
688
+ * const sf = new SchemaFactory("com.example");
689
+ * class Todo extends sf.object("Todo", {
690
+ * title: sf.number,
691
+ * }) {}
692
+ *
693
+ * const view = asBeta(tree.viewWith(new TreeViewConfiguration({ schema: Todo })));
694
+ * if (!view.compatibility.canView) {
695
+ * // [{
696
+ * // mismatch: "allowedTypes",
697
+ * // location: { nodeType: "com.example.Todo", fieldKey: "title" },
698
+ * // view: ["com.fluidframework.leaf.number"],
699
+ * // stored: ["com.fluidframework.leaf.string"],
700
+ * // }]
701
+ * console.error(view.compatibility.discrepancies);
702
+ * }
703
+ * ```
704
+ */
705
+ readonly discrepancies: readonly SchemaDiscrepancy[] | undefined;
706
+ }
558
707
  /**
559
708
  * {@link TreeView} with additional beta APIs.
560
709
  * @sealed @beta
561
710
  */
562
711
  export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, UntypedTreeView {
712
+ /**
713
+ * {@inheritDoc TreeView.compatibility}
714
+ */
715
+ readonly compatibility: SchemaCompatibilityStatusBeta;
563
716
  fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
564
717
  /**
565
718
  * Run a synchronous transaction which groups sequential edits to the tree into a single atomic edit if possible.
@@ -617,15 +770,27 @@ export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | Unsa
617
770
  * Only valid to call when this view's {@link SchemaCompatibilityStatus.canInitialize} is true.
618
771
  *
619
772
  * Enables staged schema upgrades declared by {@link ITreeViewConfigurationAlpha.stagedUpgradePolicy} when generating the initial stored schema.
620
- * Once a staged schema upgrade has been enabled in a document's stored schema, loading that document
621
- * with a view that does not include equivalent staged members in its construction-time policy will cause
622
- * a subsequent `upgradeSchema` call to throw a `UsageError` because the stored schema already contains
623
- * the upgraded members and the new target would narrow it.
624
773
  *
625
774
  * Applications should typically call this function before attaching a `SharedTree`.
626
775
  * @param content - The content to initialize the tree with.
627
776
  */
628
777
  initialize(content: InsertableField<TSchema>): void;
778
+ /**
779
+ * Checks whether a staged schema upgrade has been applied to the document's stored schema.
780
+ *
781
+ * @param upgrade - The upgrade token to check.
782
+ *
783
+ * @returns The {@link StagedUpgradeStatus} of the upgrade.
784
+ *
785
+ * @remarks
786
+ * Use this to determine whether a document has already been upgraded, for example when deciding
787
+ * whether to include an upgrade token in the view configuration after a feature flag rollback.
788
+ *
789
+ * Results are derived from this view's schema and the current stored schema.
790
+ * The full schema is checked even when the view is incompatible with the stored schema, so the
791
+ * result includes all locations declared by the view schema.
792
+ */
793
+ isStagedUpgradeEnabled(upgrade: SchemaUpgrade): StagedUpgradeStatus;
629
794
  readonly events: Listenable<TreeViewEvents & TreeBranchEvents>;
630
795
  fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewAlpha<TSchema>;
631
796
  }
@@ -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;AAG7B,OAAO,KAAK,EACX,mBAAmB,EACnB,eAAe,EACf,oCAAoC,EACpC,aAAa,EACb,UAAU,EACV,0BAA0B,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAA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