@fluidframework/core-interfaces 2.74.0-370705 → 2.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @fluidframework/core-interfaces
2
2
 
3
+ ## 2.80.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added layerIncompatibilityError to FluidErrorTypes, ContainerErrorTypes, DriverErrorTypes and OdspErrorTypes ([#26068](https://github.com/microsoft/FluidFramework/pull/26068)) [a8532bdd903](https://github.com/microsoft/FluidFramework/commit/a8532bdd903626524f17d2ec650d8904046e5308)
8
+
9
+ The Fluid error type `layerIncompatibilityError` is added to `FluidErrorTypes` and is now @legacy @beta. It is also added to `ContainerErrorTypes`, `DriverErrorTypes` and `OdspErrorTypes` which extend `FluidErrorTypes`.
10
+ `layerIncompatibilityError` was added as @legacy @alpha in version 2.72.0.
11
+ The corresponding interface `ILayerIncompatibilityError` for errors of type `layerIncompatibilityError` is now also @legacy @beta.
12
+
13
+ See [this issue](https://github.com/microsoft/FluidFramework/issues/25813) for more details.
14
+
15
+ ## 2.74.0
16
+
17
+ Dependency updates only.
18
+
3
19
  ## 2.73.0
4
20
 
5
21
  Dependency updates only.
@@ -29,6 +29,7 @@ export const FluidErrorTypes: {
29
29
  readonly dataCorruptionError: "dataCorruptionError";
30
30
  readonly dataProcessingError: "dataProcessingError";
31
31
  readonly usageError: "usageError";
32
+ readonly layerIncompatibilityError: "layerIncompatibilityError";
32
33
  };
33
34
 
34
35
  // @beta @legacy (undocumented)
@@ -36,12 +37,12 @@ export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTy
36
37
 
37
38
  // @alpha @legacy
38
39
  export const FluidErrorTypesAlpha: {
39
- readonly layerIncompatibilityError: "layerIncompatibilityError";
40
40
  readonly genericError: "genericError";
41
41
  readonly throttlingError: "throttlingError";
42
42
  readonly dataCorruptionError: "dataCorruptionError";
43
43
  readonly dataProcessingError: "dataProcessingError";
44
44
  readonly usageError: "usageError";
45
+ readonly layerIncompatibilityError: "layerIncompatibilityError";
45
46
  };
46
47
 
47
48
  // @alpha @legacy (undocumented)
@@ -310,12 +311,12 @@ export interface IFluidLoadable extends IProvideFluidLoadable {
310
311
  readonly handle: IFluidHandle;
311
312
  }
312
313
 
313
- // @alpha @legacy
314
+ // @beta @legacy
314
315
  export interface ILayerIncompatibilityError extends IErrorBase {
315
316
  readonly actualDifferenceInMonths: number;
316
317
  readonly compatibilityRequirementsInMonths: number;
317
318
  readonly details: string;
318
- readonly errorType: typeof FluidErrorTypesAlpha.layerIncompatibilityError;
319
+ readonly errorType: typeof FluidErrorTypes.layerIncompatibilityError;
319
320
  readonly incompatibleLayer: string;
320
321
  readonly incompatibleLayerVersion: string;
321
322
  readonly layer: string;
@@ -29,6 +29,7 @@ export const FluidErrorTypes: {
29
29
  readonly dataCorruptionError: "dataCorruptionError";
30
30
  readonly dataProcessingError: "dataProcessingError";
31
31
  readonly usageError: "usageError";
32
+ readonly layerIncompatibilityError: "layerIncompatibilityError";
32
33
  };
33
34
 
34
35
  // @beta @legacy (undocumented)
@@ -297,6 +298,18 @@ export interface IFluidLoadable extends IProvideFluidLoadable {
297
298
  readonly handle: IFluidHandle;
298
299
  }
299
300
 
301
+ // @beta @legacy
302
+ export interface ILayerIncompatibilityError extends IErrorBase {
303
+ readonly actualDifferenceInMonths: number;
304
+ readonly compatibilityRequirementsInMonths: number;
305
+ readonly details: string;
306
+ readonly errorType: typeof FluidErrorTypes.layerIncompatibilityError;
307
+ readonly incompatibleLayer: string;
308
+ readonly incompatibleLayerVersion: string;
309
+ readonly layer: string;
310
+ readonly layerVersion: string;
311
+ }
312
+
300
313
  // @beta @legacy
301
314
  export interface ILocalFluidHandle<T> extends IFluidHandlePayloadPending<T> {
302
315
  readonly events: Listenable<IFluidHandleEvents & ILocalFluidHandleEvents>;
package/dist/error.d.ts CHANGED
@@ -28,6 +28,17 @@ export declare const FluidErrorTypes: {
28
28
  * Error indicating an API is being used improperly resulting in an invalid operation.
29
29
  */
30
30
  readonly usageError: "usageError";
31
+ /**
32
+ * Error indicating that two Fluid layers are incompatible.
33
+ * @remarks
34
+ * For instance, if the Loader layer is not compatible with the Runtime layer, the container create / load
35
+ * will fail with an error of this type.
36
+ * In most cases, the layer compatibility validation happens during container load / create causing it to
37
+ * fail with this error type.
38
+ * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
39
+ * during data store loads. In such cases, the data store load will fail with this error type.
40
+ */
41
+ readonly layerIncompatibilityError: "layerIncompatibilityError";
31
42
  };
32
43
  /**
33
44
  * @legacy @beta
@@ -38,15 +49,6 @@ export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTy
38
49
  * @legacy @alpha
39
50
  */
40
51
  export declare const FluidErrorTypesAlpha: {
41
- /**
42
- * Error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
43
- * not compatible with the Runtime layer, the container create / load will fail with an error of this type.
44
- * In most cases, the layer compatibility validation happens during container load / create causing it to
45
- * fail with this error type.
46
- * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
47
- * during data store loads. In such cases, the data store load will fail with this error type.
48
- */
49
- readonly layerIncompatibilityError: "layerIncompatibilityError";
50
52
  /**
51
53
  * Some error, most likely an exception caught by runtime and propagated to container as critical error
52
54
  */
@@ -67,6 +69,17 @@ export declare const FluidErrorTypesAlpha: {
67
69
  * Error indicating an API is being used improperly resulting in an invalid operation.
68
70
  */
69
71
  readonly usageError: "usageError";
72
+ /**
73
+ * Error indicating that two Fluid layers are incompatible.
74
+ * @remarks
75
+ * For instance, if the Loader layer is not compatible with the Runtime layer, the container create / load
76
+ * will fail with an error of this type.
77
+ * In most cases, the layer compatibility validation happens during container load / create causing it to
78
+ * fail with this error type.
79
+ * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
80
+ * during data store loads. In such cases, the data store load will fail with this error type.
81
+ */
82
+ readonly layerIncompatibilityError: "layerIncompatibilityError";
70
83
  };
71
84
  /**
72
85
  * @legacy @alpha
@@ -152,13 +165,13 @@ export interface IThrottlingWarning extends IErrorBase {
152
165
  /**
153
166
  * Layer incompatibility error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
154
167
  * not compatible with the Runtime layer, the container will be disposed with this error.
155
- * @legacy @alpha
168
+ * @legacy @beta
156
169
  */
157
170
  export interface ILayerIncompatibilityError extends IErrorBase {
158
171
  /**
159
172
  * {@inheritDoc IErrorBase.errorType}
160
173
  */
161
- readonly errorType: typeof FluidErrorTypesAlpha.layerIncompatibilityError;
174
+ readonly errorType: typeof FluidErrorTypes.layerIncompatibilityError;
162
175
  /**
163
176
  * The layer that is reporting the incompatibility.
164
177
  */
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC3B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEM,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;IAEhC;;;;;;;OAOG;;IA5CH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAwBM,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC/B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC;IACjD;;;;;;;OAOG;IACH,QAAQ,CAAC,SAAS,EAAE,MAA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C;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC9C;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,UAAU,CAAC;CACtD;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACrD;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,eAAe,CAAC;IAC3D,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA2B,SAAQ,UAAU;IAC7D;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,yBAAyB,CAAC;IACrE;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,iCAAiC,EAAE,MAAM,CAAC;IACnD;;;;OAIG;IACH,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB"}
package/dist/error.js CHANGED
@@ -30,16 +30,11 @@ exports.FluidErrorTypes = {
30
30
  * Error indicating an API is being used improperly resulting in an invalid operation.
31
31
  */
32
32
  usageError: "usageError",
33
- };
34
- /**
35
- * New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.
36
- * @legacy @alpha
37
- */
38
- exports.FluidErrorTypesAlpha = {
39
- ...exports.FluidErrorTypes,
40
33
  /**
41
- * Error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
42
- * not compatible with the Runtime layer, the container create / load will fail with an error of this type.
34
+ * Error indicating that two Fluid layers are incompatible.
35
+ * @remarks
36
+ * For instance, if the Loader layer is not compatible with the Runtime layer, the container create / load
37
+ * will fail with an error of this type.
43
38
  * In most cases, the layer compatibility validation happens during container load / create causing it to
44
39
  * fail with this error type.
45
40
  * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
@@ -47,4 +42,11 @@ exports.FluidErrorTypesAlpha = {
47
42
  */
48
43
  layerIncompatibilityError: "layerIncompatibilityError",
49
44
  };
45
+ /**
46
+ * New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.
47
+ * @legacy @alpha
48
+ */
49
+ exports.FluidErrorTypesAlpha = {
50
+ ...exports.FluidErrorTypes,
51
+ };
50
52
  //# sourceMappingURL=error.js.map
package/dist/error.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,CAAC;AAOX;;;GAGG;AACU,QAAA,oBAAoB,GAAG;IACnC,GAAG,uBAAe;IAClB;;;;;;;OAOG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ITelemetryBaseProperties } from \"./logger.js\";\n\n/**\n * Error types the Fluid Framework may report.\n * @legacy @beta\n */\nexport const FluidErrorTypes = {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError: \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError: \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError: \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError: \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError: \"usageError\",\n} as const;\n\n/**\n * @legacy @beta\n */\nexport type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];\n\n/**\n * New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.\n * @legacy @alpha\n */\nexport const FluidErrorTypesAlpha = {\n\t...FluidErrorTypes,\n\t/**\n\t * Error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is\n\t * not compatible with the Runtime layer, the container create / load will fail with an error of this type.\n\t * In most cases, the layer compatibility validation happens during container load / create causing it to\n\t * fail with this error type.\n\t * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected\n\t * during data store loads. In such cases, the data store load will fail with this error type.\n\t */\n\tlayerIncompatibilityError: \"layerIncompatibilityError\",\n} as const;\n\n/**\n * @legacy @alpha\n */\nexport type FluidErrorTypesAlpha =\n\t(typeof FluidErrorTypesAlpha)[keyof typeof FluidErrorTypesAlpha];\n\n/**\n * Base interface for all errors and warnings emitted the container.\n *\n * @remarks\n *\n * We are in the process of unifying error types across layers of the Framework. For now we have only migrated\n * those from container-definitions. Once fully migrated, this will be a base interface for all errors and\n * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.\n * Runtime and others will follow soon.\n * @public\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/**\n\t * A type tag differentiating kinds of errors emitted by the container.\n\t *\n\t * @see See {@link FluidErrorTypes#genericError} for some common examples.\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}\n\t *\n\t * @remarks\n\t *\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}\n\t */\n\treadonly stack?: string;\n\n\t/**\n\t * Returns all properties of this error object that are fit for logging.\n\t * Some may be tagged to indicate they contain some kind of sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryBaseProperties;\n}\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n * @internal\n */\nexport interface IGenericError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.genericError;\n\n\t// TODO: Use `unknown` instead (API-Breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n * @internal\n */\nexport interface IUsageError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n * @legacy @beta\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n\n/**\n * Layer incompatibility error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is\n * not compatible with the Runtime layer, the container will be disposed with this error.\n * @legacy @alpha\n */\nexport interface ILayerIncompatibilityError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypesAlpha.layerIncompatibilityError;\n\t/**\n\t * The layer that is reporting the incompatibility.\n\t */\n\treadonly layer: string;\n\t/**\n\t * The layer that is incompatible with the reporting layer.\n\t */\n\treadonly incompatibleLayer: string;\n\t/**\n\t * The package version of the reporting layer.\n\t */\n\treadonly layerVersion: string;\n\t/**\n\t * The package version of the incompatible layer.\n\t */\n\treadonly incompatibleLayerVersion: string;\n\t/**\n\t * The number of months of compatibility requirements between the two layers as per the layer compatibility policy.\n\t */\n\treadonly compatibilityRequirementsInMonths: number;\n\t/**\n\t * The minimum actual difference in months between the release of the two layers.\n\t * Note that for layers with package versions older than 2.63.0, the actual difference may be higher than this value\n\t * because the difference reported is capped as per 2.63.0 where the compatibility enforcement was introduced.\n\t */\n\treadonly actualDifferenceInMonths: number;\n\t/**\n\t * Additional details about the incompatibility to be used for debugging purposes.\n\t */\n\treadonly details: string;\n}\n"]}
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;;;;;;;;OASG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC;AAOX;;;GAGG;AACU,QAAA,oBAAoB,GAAG;IACnC,GAAG,uBAAe;CACT,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ITelemetryBaseProperties } from \"./logger.js\";\n\n/**\n * Error types the Fluid Framework may report.\n * @legacy @beta\n */\nexport const FluidErrorTypes = {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError: \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError: \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError: \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError: \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError: \"usageError\",\n\n\t/**\n\t * Error indicating that two Fluid layers are incompatible.\n\t * @remarks\n\t * For instance, if the Loader layer is not compatible with the Runtime layer, the container create / load\n\t * will fail with an error of this type.\n\t * In most cases, the layer compatibility validation happens during container load / create causing it to\n\t * fail with this error type.\n\t * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected\n\t * during data store loads. In such cases, the data store load will fail with this error type.\n\t */\n\tlayerIncompatibilityError: \"layerIncompatibilityError\",\n} as const;\n\n/**\n * @legacy @beta\n */\nexport type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];\n\n/**\n * New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.\n * @legacy @alpha\n */\nexport const FluidErrorTypesAlpha = {\n\t...FluidErrorTypes,\n} as const;\n\n/**\n * @legacy @alpha\n */\nexport type FluidErrorTypesAlpha =\n\t(typeof FluidErrorTypesAlpha)[keyof typeof FluidErrorTypesAlpha];\n\n/**\n * Base interface for all errors and warnings emitted the container.\n *\n * @remarks\n *\n * We are in the process of unifying error types across layers of the Framework. For now we have only migrated\n * those from container-definitions. Once fully migrated, this will be a base interface for all errors and\n * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.\n * Runtime and others will follow soon.\n * @public\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/**\n\t * A type tag differentiating kinds of errors emitted by the container.\n\t *\n\t * @see See {@link FluidErrorTypes#genericError} for some common examples.\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}\n\t *\n\t * @remarks\n\t *\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}\n\t */\n\treadonly stack?: string;\n\n\t/**\n\t * Returns all properties of this error object that are fit for logging.\n\t * Some may be tagged to indicate they contain some kind of sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryBaseProperties;\n}\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n * @internal\n */\nexport interface IGenericError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.genericError;\n\n\t// TODO: Use `unknown` instead (API-Breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n * @internal\n */\nexport interface IUsageError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n * @legacy @beta\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n\n/**\n * Layer incompatibility error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is\n * not compatible with the Runtime layer, the container will be disposed with this error.\n * @legacy @beta\n */\nexport interface ILayerIncompatibilityError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.layerIncompatibilityError;\n\t/**\n\t * The layer that is reporting the incompatibility.\n\t */\n\treadonly layer: string;\n\t/**\n\t * The layer that is incompatible with the reporting layer.\n\t */\n\treadonly incompatibleLayer: string;\n\t/**\n\t * The package version of the reporting layer.\n\t */\n\treadonly layerVersion: string;\n\t/**\n\t * The package version of the incompatible layer.\n\t */\n\treadonly incompatibleLayerVersion: string;\n\t/**\n\t * The number of months of compatibility requirements between the two layers as per the layer compatibility policy.\n\t */\n\treadonly compatibilityRequirementsInMonths: number;\n\t/**\n\t * The minimum actual difference in months between the release of the two layers.\n\t * Note that for layers with package versions older than 2.63.0, the actual difference may be higher than this value\n\t * because the difference reported is capped as per 2.63.0 where the compatibility enforcement was introduced.\n\t */\n\treadonly actualDifferenceInMonths: number;\n\t/**\n\t * Additional details about the incompatibility to be used for debugging purposes.\n\t */\n\treadonly details: string;\n}\n"]}
@@ -56,6 +56,7 @@ export {
56
56
  IFluidHandleEvents,
57
57
  IFluidHandleInternal,
58
58
  IFluidHandlePayloadPending,
59
+ ILayerIncompatibilityError,
59
60
  ILocalFluidHandle,
60
61
  ILocalFluidHandleEvents,
61
62
  ILoggingError,
@@ -67,7 +68,6 @@ export {
67
68
  // #endregion
68
69
 
69
70
  // #region @legacyAlpha APIs
70
- FluidErrorTypesAlpha,
71
- ILayerIncompatibilityError
71
+ FluidErrorTypesAlpha
72
72
  // #endregion
73
73
  } from "./index.js";
package/dist/legacy.d.ts CHANGED
@@ -56,6 +56,7 @@ export {
56
56
  IFluidHandleEvents,
57
57
  IFluidHandleInternal,
58
58
  IFluidHandlePayloadPending,
59
+ ILayerIncompatibilityError,
59
60
  ILocalFluidHandle,
60
61
  ILocalFluidHandleEvents,
61
62
  ILoggingError,
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * GENERATED FILE - DO NOT EDIT DIRECTLY.
4
+ * To regenerate: pnpm tsx scripts/generate-flat-eslint-configs.ts --typescript
5
+ */
6
+ import type { Linter } from "eslint";
7
+ import { strict } from "../../../common/build/eslint-config-fluid/flat.mts";
8
+
9
+ const config: Linter.Config[] = [
10
+ ...strict,
11
+ {
12
+ rules: {
13
+ "@typescript-eslint/consistent-indexed-object-style": "off",
14
+ },
15
+ },
16
+ {
17
+ files: ["*.spec.ts", "src/test/**"],
18
+ rules: {
19
+ "import-x/no-internal-modules": [
20
+ "error",
21
+ {
22
+ "allow": ["@fluidframework/*/internal{,/**}"],
23
+ },
24
+ ],
25
+ },
26
+ },
27
+ {
28
+ files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
29
+ languageOptions: {
30
+ parserOptions: {
31
+ projectService: false,
32
+ project: [
33
+ "./tsconfig.json",
34
+ "./src/test/tsconfig.json",
35
+ "./src/test/tsconfig.no-exactOptionalPropertyTypes.json",
36
+ ],
37
+ },
38
+ },
39
+ },
40
+ ];
41
+
42
+ export default config;
package/lib/error.d.ts CHANGED
@@ -28,6 +28,17 @@ export declare const FluidErrorTypes: {
28
28
  * Error indicating an API is being used improperly resulting in an invalid operation.
29
29
  */
30
30
  readonly usageError: "usageError";
31
+ /**
32
+ * Error indicating that two Fluid layers are incompatible.
33
+ * @remarks
34
+ * For instance, if the Loader layer is not compatible with the Runtime layer, the container create / load
35
+ * will fail with an error of this type.
36
+ * In most cases, the layer compatibility validation happens during container load / create causing it to
37
+ * fail with this error type.
38
+ * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
39
+ * during data store loads. In such cases, the data store load will fail with this error type.
40
+ */
41
+ readonly layerIncompatibilityError: "layerIncompatibilityError";
31
42
  };
32
43
  /**
33
44
  * @legacy @beta
@@ -38,15 +49,6 @@ export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTy
38
49
  * @legacy @alpha
39
50
  */
40
51
  export declare const FluidErrorTypesAlpha: {
41
- /**
42
- * Error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
43
- * not compatible with the Runtime layer, the container create / load will fail with an error of this type.
44
- * In most cases, the layer compatibility validation happens during container load / create causing it to
45
- * fail with this error type.
46
- * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
47
- * during data store loads. In such cases, the data store load will fail with this error type.
48
- */
49
- readonly layerIncompatibilityError: "layerIncompatibilityError";
50
52
  /**
51
53
  * Some error, most likely an exception caught by runtime and propagated to container as critical error
52
54
  */
@@ -67,6 +69,17 @@ export declare const FluidErrorTypesAlpha: {
67
69
  * Error indicating an API is being used improperly resulting in an invalid operation.
68
70
  */
69
71
  readonly usageError: "usageError";
72
+ /**
73
+ * Error indicating that two Fluid layers are incompatible.
74
+ * @remarks
75
+ * For instance, if the Loader layer is not compatible with the Runtime layer, the container create / load
76
+ * will fail with an error of this type.
77
+ * In most cases, the layer compatibility validation happens during container load / create causing it to
78
+ * fail with this error type.
79
+ * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
80
+ * during data store loads. In such cases, the data store load will fail with this error type.
81
+ */
82
+ readonly layerIncompatibilityError: "layerIncompatibilityError";
70
83
  };
71
84
  /**
72
85
  * @legacy @alpha
@@ -152,13 +165,13 @@ export interface IThrottlingWarning extends IErrorBase {
152
165
  /**
153
166
  * Layer incompatibility error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
154
167
  * not compatible with the Runtime layer, the container will be disposed with this error.
155
- * @legacy @alpha
168
+ * @legacy @beta
156
169
  */
157
170
  export interface ILayerIncompatibilityError extends IErrorBase {
158
171
  /**
159
172
  * {@inheritDoc IErrorBase.errorType}
160
173
  */
161
- readonly errorType: typeof FluidErrorTypesAlpha.layerIncompatibilityError;
174
+ readonly errorType: typeof FluidErrorTypes.layerIncompatibilityError;
162
175
  /**
163
176
  * The layer that is reporting the inc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;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,iCAAiC,EAAE,MAAM,CAAC;IACnD;;;;OAIG;IACH,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB"}
package/lib/error.js CHANGED
@@ -27,16 +27,11 @@ export const FluidErrorTypes = {
27
27
  * Error indicating an API is being used improperly resulting in an invalid operation.
28
28
  */
29
29
  usageError: "usageError",
30
- };
31
- /**
32
- * New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.
33
- * @legacy @alpha
34
- */
35
- export const FluidErrorTypesAlpha = {
36
- ...FluidErrorTypes,
37
30
  /**
38
- * Error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
39
- * not compatible with the Runtime layer, the container create / load will fail with an error of this type.
31
+ * Error indicating that two Fluid layers are incompatible.
32
+ * @remarks
33
+ * For instance, if the Loader layer is not compatible with the Runtime layer, the container create / load
34
+ * will fail with an error of this type.
40
35
  * In most cases, the layer compatibility validation happens during container load / create causing it to
41
36
  * fail with this error type.
42
37
  * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
@@ -44,4 +39,11 @@ export const FluidErrorTypesAlpha = {
44
39
  */
45
40
  layerIncompatibilityError: "layerIncompatibilityError",
46
41
  };
42
+ /**
43
+ * New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.
44
+ * @legacy @alpha
45
+ */
46
+ export const FluidErrorTypesAlpha = {
47
+ ...FluidErrorTypes,
48
+ };
47
49
  //# sourceMappingURL=error.js.map
package/lib/error.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,CAAC;AAOX;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,GAAG,eAAe;IAClB;;;;;;;OAOG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ITelemetryBaseProperties } from \"./logger.js\";\n\n/**\n * Error types the Fluid Framework may report.\n * @legacy @beta\n */\nexport const FluidErrorTypes = {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError: \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError: \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError: \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError: \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError: \"usageError\",\n} as const;\n\n/**\n * @legacy @beta\n */\nexport type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];\n\n/**\n * New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.\n * @legacy @alpha\n */\nexport const FluidErrorTypesAlpha = {\n\t...FluidErrorTypes,\n\t/**\n\t * Error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is\n\t * not compatible with the Runtime layer, the container create / load will fail with an error of this type.\n\t * In most cases, the layer compatibility validation happens during container load / create causing it to\n\t * fail with this error type.\n\t * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected\n\t * during data store loads. In such cases, the data store load will fail with this error type.\n\t */\n\tlayerIncompatibilityError: \"layerIncompatibilityError\",\n} as const;\n\n/**\n * @legacy @alpha\n */\nexport type FluidErrorTypesAlpha =\n\t(typeof FluidErrorTypesAlpha)[keyof typeof FluidErrorTypesAlpha];\n\n/**\n * Base interface for all errors and warnings emitted the container.\n *\n * @remarks\n *\n * We are in the process of unifying error types across layers of the Framework. For now we have only migrated\n * those from container-definitions. Once fully migrated, this will be a base interface for all errors and\n * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.\n * Runtime and others will follow soon.\n * @public\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/**\n\t * A type tag differentiating kinds of errors emitted by the container.\n\t *\n\t * @see See {@link FluidErrorTypes#genericError} for some common examples.\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}\n\t *\n\t * @remarks\n\t *\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}\n\t */\n\treadonly stack?: string;\n\n\t/**\n\t * Returns all properties of this error object that are fit for logging.\n\t * Some may be tagged to indicate they contain some kind of sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryBaseProperties;\n}\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n * @internal\n */\nexport interface IGenericError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.genericError;\n\n\t// TODO: Use `unknown` instead (API-Breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n * @internal\n */\nexport interface IUsageError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n * @legacy @beta\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n\n/**\n * Layer incompatibility error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is\n * not compatible with the Runtime layer, the container will be disposed with this error.\n * @legacy @alpha\n */\nexport interface ILayerIncompatibilityError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypesAlpha.layerIncompatibilityError;\n\t/**\n\t * The layer that is reporting the incompatibility.\n\t */\n\treadonly layer: string;\n\t/**\n\t * The layer that is incompatible with the reporting layer.\n\t */\n\treadonly incompatibleLayer: string;\n\t/**\n\t * The package version of the reporting layer.\n\t */\n\treadonly layerVersion: string;\n\t/**\n\t * The package version of the incompatible layer.\n\t */\n\treadonly incompatibleLayerVersion: string;\n\t/**\n\t * The number of months of compatibility requirements between the two layers as per the layer compatibility policy.\n\t */\n\treadonly compatibilityRequirementsInMonths: number;\n\t/**\n\t * The minimum actual difference in months between the release of the two layers.\n\t * Note that for layers with package versions older than 2.63.0, the actual difference may be higher than this value\n\t * because the difference reported is capped as per 2.63.0 where the compatibility enforcement was introduced.\n\t */\n\treadonly actualDifferenceInMonths: number;\n\t/**\n\t * Additional details about the incompatibility to be used for debugging purposes.\n\t */\n\treadonly details: string;\n}\n"]}
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;;;;;;;;OASG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC;AAOX;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,GAAG,eAAe;CACT,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ITelemetryBaseProperties } from \"./logger.js\";\n\n/**\n * Error types the Fluid Framework may report.\n * @legacy @beta\n */\nexport const FluidErrorTypes = {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError: \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError: \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError: \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError: \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError: \"usageError\",\n\n\t/**\n\t * Error indicating that two Fluid layers are incompatible.\n\t * @remarks\n\t * For instance, if the Loader layer is not compatible with the Runtime layer, the container create / load\n\t * will fail with an error of this type.\n\t * In most cases, the layer compatibility validation happens during container load / create causing it to\n\t * fail with this error type.\n\t * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected\n\t * during data store loads. In such cases, the data store load will fail with this error type.\n\t */\n\tlayerIncompatibilityError: \"layerIncompatibilityError\",\n} as const;\n\n/**\n * @legacy @beta\n */\nexport type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];\n\n/**\n * New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.\n * @legacy @alpha\n */\nexport const FluidErrorTypesAlpha = {\n\t...FluidErrorTypes,\n} as const;\n\n/**\n * @legacy @alpha\n */\nexport type FluidErrorTypesAlpha =\n\t(typeof FluidErrorTypesAlpha)[keyof typeof FluidErrorTypesAlpha];\n\n/**\n * Base interface for all errors and warnings emitted the container.\n *\n * @remarks\n *\n * We are in the process of unifying error types across layers of the Framework. For now we have only migrated\n * those from container-definitions. Once fully migrated, this will be a base interface for all errors and\n * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.\n * Runtime and others will follow soon.\n * @public\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/**\n\t * A type tag differentiating kinds of errors emitted by the container.\n\t *\n\t * @see See {@link FluidErrorTypes#genericError} for some common examples.\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}\n\t *\n\t * @remarks\n\t *\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}\n\t */\n\treadonly stack?: string;\n\n\t/**\n\t * Returns all properties of this error object that are fit for logging.\n\t * Some may be tagged to indicate they contain some kind of sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryBaseProperties;\n}\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n * @internal\n */\nexport interface IGenericError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.genericError;\n\n\t// TODO: Use `unknown` instead (API-Breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n * @internal\n */\nexport interface IUsageError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n * @legacy @beta\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n\n/**\n * Layer incompatibility error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is\n * not compatible with the Runtime layer, the container will be disposed with this error.\n * @legacy @beta\n */\nexport interface ILayerIncompatibilityError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.layerIncompatibilityError;\n\t/**\n\t * The layer that is reporting the incompatibility.\n\t */\n\treadonly layer: string;\n\t/**\n\t * The layer that is incompatible with the reporting layer.\n\t */\n\treadonly incompatibleLayer: string;\n\t/**\n\t * The package version of the reporting layer.\n\t */\n\treadonly layerVersion: string;\n\t/**\n\t * The package version of the incompatible layer.\n\t */\n\treadonly incompatibleLayerVersion: string;\n\t/**\n\t * The number of months of compatibility requirements between the two layers as per the layer compatibility policy.\n\t */\n\treadonly compatibilityRequirementsInMonths: number;\n\t/**\n\t * The minimum actual difference in months between the release of the two layers.\n\t * Note that for layers with package versions older than 2.63.0, the actual difference may be higher than this value\n\t * because the difference reported is capped as per 2.63.0 where the compatibility enforcement was introduced.\n\t */\n\treadonly actualDifferenceInMonths: number;\n\t/**\n\t * Additional details about the incompatibility to be used for debugging purposes.\n\t */\n\treadonly details: string;\n}\n"]}
@@ -56,6 +56,7 @@ export {
56
56
  IFluidHandleEvents,
57
57
  IFluidHandleInternal,
58
58
  IFluidHandlePayloadPending,
59
+ ILayerIncompatibilityError,
59
60
  ILocalFluidHandle,
60
61
  ILocalFluidHandleEvents,
61
62
  ILoggingError,
@@ -67,7 +68,6 @@ export {
67
68
  // #endregion
68
69
 
69
70
  // #region @legacyAlpha APIs
70
- FluidErrorTypesAlpha,
71
- ILayerIncompatibilityError
71
+ FluidErrorTypesAlpha
72
72
  // #endregion
73
73
  } from "./index.js";
package/lib/legacy.d.ts CHANGED
@@ -56,6 +56,7 @@ export {
56
56
  IFluidHandleEvents,
57
57
  IFluidHandleInternal,
58
58
  IFluidHandlePayloadPending,
59
+ ILayerIncompatibilityError,
59
60
  ILocalFluidHandle,
60
61
  ILocalFluidHandleEvents,
61
62
  ILoggingError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/core-interfaces",
3
- "version": "2.74.0-370705",
3
+ "version": "2.80.0",
4
4
  "description": "Fluid object interfaces",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -81,24 +81,25 @@
81
81
  "temp-directory": "nyc/.nyc_output"
82
82
  },
83
83
  "devDependencies": {
84
- "@arethetypeswrong/cli": "^0.17.1",
84
+ "@arethetypeswrong/cli": "^0.18.2",
85
85
  "@biomejs/biome": "~1.9.3",
86
- "@fluid-tools/build-cli": "^0.60.0",
86
+ "@fluid-tools/build-cli": "^0.62.0",
87
87
  "@fluidframework/build-common": "^2.0.3",
88
- "@fluidframework/build-tools": "^0.60.0",
89
- "@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.73.0",
90
- "@fluidframework/eslint-config-fluid": "2.74.0-370705",
88
+ "@fluidframework/build-tools": "^0.62.0",
89
+ "@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.74.0",
90
+ "@fluidframework/eslint-config-fluid": "~2.80.0",
91
91
  "@microsoft/api-extractor": "7.52.11",
92
92
  "@types/mocha": "^10.0.10",
93
93
  "@types/node": "^18.19.0",
94
94
  "c8": "^10.1.3",
95
- "concurrently": "^8.2.1",
95
+ "concurrently": "^9.2.1",
96
96
  "copyfiles": "^2.4.1",
97
- "cross-env": "^7.0.3",
98
- "eslint": "~8.57.1",
97
+ "cross-env": "^10.1.0",
98
+ "eslint": "~9.39.1",
99
+ "jiti": "^2.6.1",
99
100
  "mocha": "^10.8.2",
100
101
  "mocha-multi-reporters": "^1.5.1",
101
- "rimraf": "^4.4.0",
102
+ "rimraf": "^6.1.2",
102
103
  "typescript": "~5.4.5"
103
104
  },
104
105
  "fluidBuild": {
@@ -109,7 +110,11 @@
109
110
  }
110
111
  },
111
112
  "typeValidation": {
112
- "broken": {},
113
+ "broken": {
114
+ "TypeAlias_FluidErrorTypes": {
115
+ "backCompat": false
116
+ }
117
+ },
113
118
  "entrypoint": "legacy"
114
119
  },
115
120
  "scripts": {
package/src/error.ts CHANGED
@@ -34,6 +34,18 @@ export const FluidErrorTypes = {
34
34
  * Error indicating an API is being used improperly resulting in an invalid operation.
35
35
  */
36
36
  usageError: "usageError",
37
+
38
+ /**
39
+ * Error indicating that two Fluid layers are incompatible.
40
+ * @remarks
41
+ * For instance, if the Loader layer is not compatible with the Runtime layer, the container create / load
42
+ * will fail with an error of this type.
43
+ * In most cases, the layer compatibility validation happens during container load / create causing it to
44
+ * fail with this error type.
45
+ * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
46
+ * during data store loads. In such cases, the data store load will fail with this error type.
47
+ */
48
+ layerIncompatibilityError: "layerIncompatibilityError",
37
49
  } as const;
38
50
 
39
51
  /**
@@ -47,15 +59,6 @@ export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTy
47
59
  */
48
60
  export const FluidErrorTypesAlpha = {
49
61
  ...FluidErrorTypes,
50
- /**
51
- * Error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
52
- * not compatible with the Runtime layer, the container create / load will fail with an error of this type.
53
- * In most cases, the layer compatibility validation happens during container load / create causing it to
54
- * fail with this error type.
55
- * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
56
- * during data store loads. In such cases, the data store load will fail with this error type.
57
- */
58
- layerIncompatibilityError: "layerIncompatibilityError",
59
62
  } as const;
60
63
 
61
64
  /**
@@ -155,13 +158,13 @@ export interface IThrottlingWarning extends IErrorBase {
155
158
  /**
156
159
  * Layer incompatibility error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
157
160
  * not compatible with the Runtime layer, the container will be disposed with this error.
158
- * @legacy @alpha
161
+ * @legacy @beta
159
162
  */
160
163
  export interface ILayerIncompatibilityError extends IErrorBase {
161
164
  /**
162
165
  * {@inheritDoc IErrorBase.errorType}
163
166
  */
164
- readonly errorType: typeof FluidErrorTypesAlpha.layerIncompatibilityError;
167
+ readonly errorType: typeof FluidErrorTypes.layerIncompatibilityError;
165
168
  /**
166
169
  * The layer that is reporting the incompatibility.
167
170
  */