Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@fluid-internal/client-utils

Package Overview
Dependencies
Maintainers
1
Versions
245
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluid-internal/client-utils - npm Package Compare versions

Comparing version
2.82.0
to
2.83.0
+4
-0
CHANGELOG.md
# @fluid-internal/client-utils
## 2.83.0
Dependency updates only.
## 2.82.0

@@ -4,0 +8,0 @@

+1
-1

@@ -14,4 +14,4 @@ /*!

export { createEmitter } from "./events/index.js";
export { type FluidLayer, checkLayerCompatibility, type LayerCompatCheckResult, type ILayerCompatDetails, type IProvideLayerCompatDetails, type ILayerCompatSupportRequirements, } from "./layerCompat.js";
export { type FluidLayer, checkLayerCompatibility, type LayerCompatCheckResult, type ILayerCompatDetails, type IProvideLayerCompatDetails, type ILayerCompatSupportRequirements, LayerCompatibilityPolicyWindowMonths, } from "./layerCompat.js";
export { generation } from "./layerGenerationState.js";
//# sourceMappingURL=indexBrowser.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"indexBrowser.d.ts","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,WAAW,EAAE,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BAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}

@@ -7,3 +7,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.generation = exports.checkLayerCompatibility = exports.createEmitter = exports.TypedEventEmitter = exports.Trace = exports.performanceNow = exports.EventEmitter = exports.Uint8ArrayToArrayBuffer = exports.toUtf8 = exports.fromUtf8ToBase64 = exports.fromBase64ToUtf8 = exports.hashFile = exports.gitHashFile = exports.Uint8ArrayToString = exports.stringToBuffer = exports.IsoBuffer = exports.isArrayBuffer = exports.bufferToString = void 0;
exports.generation = exports.LayerCompatibilityPolicyWindowMonths = exports.checkLayerCompatibility = exports.createEmitter = exports.TypedEventEmitter = exports.Trace = exports.performanceNow = exports.EventEmitter = exports.Uint8ArrayToArrayBuffer = exports.toUtf8 = exports.fromUtf8ToBase64 = exports.fromBase64ToUtf8 = exports.hashFile = exports.gitHashFile = exports.Uint8ArrayToString = exports.stringToBuffer = exports.IsoBuffer = exports.isArrayBuffer = exports.bufferToString = void 0;
// Entrypoint for browser-specific code in the package.

@@ -38,4 +38,5 @@ // (See 'Isomorphic Code' section in the package README.md.)

Object.defineProperty(exports, "checkLayerCompatibility", { enumerable: true, get: function () { return layerCompat_js_1.checkLayerCompatibility; } });
Object.defineProperty(exports, "LayerCompatibilityPolicyWindowMonths", { enumerable: true, get: function () { return layerCompat_js_1.LayerCompatibilityPolicyWindowMonths; } });
var layerGenerationState_js_1 = require("./layerGenerationState.js");
Object.defineProperty(exports, "generation", { enumerable: true, get: function () { return layerGenerationState_js_1.generation; } });
//# sourceMappingURL=indexBrowser.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"indexBrowser.js","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uDAAuD;AACvD,4DAA4D;AAE5D,uDAM4B;AAL3B,kHAAA,cAAc,OAAA;AACd,iHAAA,aAAa,OAAA;AACb,6GAAA,SAAS,OAAA;AACT,kHAAA,cAAc,OAAA;AACd,sHAAA,kBAAkB,OAAA;AAEnB,2DAA6D;AAApD,iHAAA,WAAW,OAAA;AAAE,8GAAA,QAAQ,OAAA;AAE9B,uEAAwF;AAA/E,4HAAA,gBAAgB,OAAA;AAAE,4HAAA,gBAAgB,OAAA;AAAE,kHAAA,MAAM,OAAA;AACnD,qDAA4D;AAAnD,0HAAA,uBAAuB,OAAA;AAChC,uDAAkD;AAAzC,gHAAA,YAAY,OAAA;AACrB,uEAA4D;AAAnD,0HAAA,cAAc,OAAA;AACvB,uCAAqD;AAA1B,iGAAA,KAAK,OAAA;AAChC,+DAIgC;AAF/B,yHAAA,iBAAiB,OAAA;AAIlB,8CAAkD;AAAzC,yGAAA,aAAa,OAAA;AAEtB,mDAO0B;AALzB,yHAAA,uBAAuB,OAAA;AAMxB,qEAAuD;AAA9C,qHAAA,UAAU,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Entrypoint for browser-specific code in the package.\n// (See 'Isomorphic Code' section in the package README.md.)\n\nexport {\n\tbufferToString,\n\tisArrayBuffer,\n\tIsoBuffer,\n\tstringToBuffer,\n\tUint8ArrayToString,\n} from \"./bufferBrowser.js\";\nexport { gitHashFile, hashFile } from \"./hashFileBrowser.js\";\n\nexport { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from \"./base64EncodingBrowser.js\";\nexport { Uint8ArrayToArrayBuffer } from \"./bufferShared.js\";\nexport { EventEmitter } from \"./eventEmitter.cjs\";\nexport { performanceNow } from \"./performanceIsomorphic.js\";\nexport { type ITraceEvent, Trace } from \"./trace.js\";\nexport {\n\ttype EventEmitterEventType,\n\tTypedEventEmitter,\n\ttype TypedEventTransform,\n} from \"./typedEventEmitter.js\";\n\nexport { createEmitter } from \"./events/index.js\";\n\nexport {\n\ttype FluidLayer,\n\tcheckLayerCompatibility,\n\ttype LayerCompatCheckResult,\n\ttype ILayerCompatDetails,\n\ttype IProvideLayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n} from \"./layerCompat.js\";\nexport { generation } from \"./layerGenerationState.js\";\n"]}
{"version":3,"file":"indexBrowser.js","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uDAAuD;AACvD,4DAA4D;AAE5D,uDAM4B;AAL3B,kHAAA,cAAc,OAAA;AACd,iHAAA,aAAa,OAAA;AACb,6GAAA,SAAS,OAAA;AACT,kHAAA,cAAc,OAAA;AACd,sHAAA,kBAAkB,OAAA;AAEnB,2DAA6D;AAApD,iHAAA,WAAW,OAAA;AAAE,8GAAA,QAAQ,OAAA;AAE9B,uEAAwF;AAA/E,4HAAA,gBAAgB,OAAA;AAAE,4HAAA,gBAAgB,OAAA;AAAE,kHAAA,MAAM,OAAA;AACnD,qDAA4D;AAAnD,0HAAA,uBAAuB,OAAA;AAChC,uDAAkD;AAAzC,gHAAA,YAAY,OAAA;AACrB,uEAA4D;AAAnD,0HAAA,cAAc,OAAA;AACvB,uCAAqD;AAA1B,iGAAA,KAAK,OAAA;AAChC,+DAIgC;AAF/B,yHAAA,iBAAiB,OAAA;AAIlB,8CAAkD;AAAzC,yGAAA,aAAa,OAAA;AAEtB,mDAQ0B;AANzB,yHAAA,uBAAuB,OAAA;AAKvB,sIAAA,oCAAoC,OAAA;AAErC,qEAAuD;AAA9C,qHAAA,UAAU,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Entrypoint for browser-specific code in the package.\n// (See 'Isomorphic Code' section in the package README.md.)\n\nexport {\n\tbufferToString,\n\tisArrayBuffer,\n\tIsoBuffer,\n\tstringToBuffer,\n\tUint8ArrayToString,\n} from \"./bufferBrowser.js\";\nexport { gitHashFile, hashFile } from \"./hashFileBrowser.js\";\n\nexport { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from \"./base64EncodingBrowser.js\";\nexport { Uint8ArrayToArrayBuffer } from \"./bufferShared.js\";\nexport { EventEmitter } from \"./eventEmitter.cjs\";\nexport { performanceNow } from \"./performanceIsomorphic.js\";\nexport { type ITraceEvent, Trace } from \"./trace.js\";\nexport {\n\ttype EventEmitterEventType,\n\tTypedEventEmitter,\n\ttype TypedEventTransform,\n} from \"./typedEventEmitter.js\";\n\nexport { createEmitter } from \"./events/index.js\";\n\nexport {\n\ttype FluidLayer,\n\tcheckLayerCompatibility,\n\ttype LayerCompatCheckResult,\n\ttype ILayerCompatDetails,\n\ttype IProvideLayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n\tLayerCompatibilityPolicyWindowMonths,\n} from \"./layerCompat.js\";\nexport { generation } from \"./layerGenerationState.js\";\n"]}

@@ -15,4 +15,4 @@ /*!

export { createEmitter } from "./events/index.js";
export { type FluidLayer, checkLayerCompatibility, type LayerCompatCheckResult, type ILayerCompatDetails, type IProvideLayerCompatDetails, type ILayerCompatSupportRequirements, } from "./layerCompat.js";
export { type FluidLayer, checkLayerCompatibility, type LayerCompatCheckResult, type ILayerCompatDetails, type IProvideLayerCompatDetails, type ILayerCompatSupportRequirements, LayerCompatibilityPolicyWindowMonths, } from "./layerCompat.js";
export { generation } from "./layerGenerationState.js";
//# sourceMappingURL=indexNode.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"indexNode.d.ts","sourceRoot":"","sources":["../src/indexNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACN,cAAc,EACd,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,M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,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EACN,KAAK,UAAU,EACf,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACpC,oCAAoC,GACpC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}

@@ -7,3 +7,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.generation = exports.checkLayerCompatibility = exports.createEmitter = exports.TypedEventEmitter = exports.Trace = exports.performanceNow = exports.EventEmitter = exports.Uint8ArrayToArrayBuffer = exports.toUtf8 = exports.fromUtf8ToBase64 = exports.fromBase64ToUtf8 = exports.hashFile = exports.gitHashFile = exports.Uint8ArrayToString = exports.stringToBuffer = exports.IsoBuffer = exports.bufferToString = void 0;
exports.generation = exports.LayerCompatibilityPolicyWindowMonths = exports.checkLayerCompatibility = exports.createEmitter = exports.TypedEventEmitter = exports.Trace = exports.performanceNow = exports.EventEmitter = exports.Uint8ArrayToArrayBuffer = exports.toUtf8 = exports.fromUtf8ToBase64 = exports.fromBase64ToUtf8 = exports.hashFile = exports.gitHashFile = exports.Uint8ArrayToString = exports.stringToBuffer = exports.IsoBuffer = exports.bufferToString = void 0;
var bufferNode_js_1 = require("./bufferNode.js");

@@ -35,4 +35,5 @@ Object.defineProperty(exports, "bufferToString", { enumerable: true, get: function () { return bufferNode_js_1.bufferToString; } });

Object.defineProperty(exports, "checkLayerCompatibility", { enumerable: true, get: function () { return layerCompat_js_1.checkLayerCompatibility; } });
Object.defineProperty(exports, "LayerCompatibilityPolicyWindowMonths", { enumerable: true, get: function () { return layerCompat_js_1.LayerCompatibilityPolicyWindowMonths; } });
var layerGenerationState_js_1 = require("./layerGenerationState.js");
Object.defineProperty(exports, "generation", { enumerable: true, get: function () { return layerGenerationState_js_1.generation; } });
//# sourceMappingURL=indexNode.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"indexNode.js","sourceRoot":"","sources":["../src/indexNode.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH,iDAKyB;AAJxB,+GAAA,cAAc,OAAA;AACd,0GAAA,SAAS,OAAA;AACT,+GAAA,cAAc,OAAA;AACd,mHAAA,kBAAkB,OAAA;AAEnB,qDAA0D;AAAjD,8GAAA,WAAW,OAAA;AAAE,2GAAA,QAAQ,OAAA;AAE9B,iEAAqF;AAA5E,yHAAA,gBAAgB,OAAA;AAAE,yHAAA,gBAAgB,OAAA;AAAE,+GAAA,MAAM,OAAA;AACnD,qDAA4D;AAAnD,0HAAA,uBAAuB,OAAA;AAChC,uDAAkD;AAAzC,gHAAA,YAAY,OAAA;AACrB,uEAA4D;AAAnD,0HAAA,cAAc,OAAA;AACvB,uCAAqD;AAA1B,iGAAA,KAAK,OAAA;AAChC,+DAIgC;AAF/B,yHAAA,iBAAiB,OAAA;AAIlB,8CAAkD;AAAzC,yGAAA,aAAa,OAAA;AAEtB,mDAO0B;AALzB,yHAAA,uBAAuB,OAAA;AAMxB,qEAAuD;AAA9C,qHAAA,UAAU,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Entrypoint for Node.js-specific code in the package.\n// (See 'Isomorphic Code' section in the package README.md.)\n\nexport { type Buffer } from \"./bufferNode.js\";\nexport {\n\tbufferToString,\n\tIsoBuffer,\n\tstringToBuffer,\n\tUint8ArrayToString,\n} from \"./bufferNode.js\";\nexport { gitHashFile, hashFile } from \"./hashFileNode.js\";\n\nexport { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from \"./base64EncodingNode.js\";\nexport { Uint8ArrayToArrayBuffer } from \"./bufferShared.js\";\nexport { EventEmitter } from \"./eventEmitter.cjs\";\nexport { performanceNow } from \"./performanceIsomorphic.js\";\nexport { type ITraceEvent, Trace } from \"./trace.js\";\nexport {\n\ttype EventEmitterEventType,\n\tTypedEventEmitter,\n\ttype TypedEventTransform,\n} from \"./typedEventEmitter.js\";\n\nexport { createEmitter } from \"./events/index.js\";\n\nexport {\n\ttype FluidLayer,\n\tcheckLayerCompatibility,\n\ttype LayerCompatCheckResult,\n\ttype ILayerCompatDetails,\n\ttype IProvideLayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n} from \"./layerCompat.js\";\nexport { generation } from \"./layerGenerationState.js\";\n"]}
{"version":3,"file":"indexNode.js","sourceRoot":"","sources":["../src/indexNode.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH,iDAKyB;AAJxB,+GAAA,cAAc,OAAA;AACd,0GAAA,SAAS,OAAA;AACT,+GAAA,cAAc,OAAA;AACd,mHAAA,kBAAkB,OAAA;AAEnB,qDAA0D;AAAjD,8GAAA,WAAW,OAAA;AAAE,2GAAA,QAAQ,OAAA;AAE9B,iEAAqF;AAA5E,yHAAA,gBAAgB,OAAA;AAAE,yHAAA,gBAAgB,OAAA;AAAE,+GAAA,MAAM,OAAA;AACnD,qDAA4D;AAAnD,0HAAA,uBAAuB,OAAA;AAChC,uDAAkD;AAAzC,gHAAA,YAAY,OAAA;AACrB,uEAA4D;AAAnD,0HAAA,cAAc,OAAA;AACvB,uCAAqD;AAA1B,iGAAA,KAAK,OAAA;AAChC,+DAIgC;AAF/B,yHAAA,iBAAiB,OAAA;AAIlB,8CAAkD;AAAzC,yGAAA,aAAa,OAAA;AAEtB,mDAQ0B;AANzB,yHAAA,uBAAuB,OAAA;AAKvB,sIAAA,oCAAoC,OAAA;AAErC,qEAAuD;AAA9C,qHAAA,UAAU,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Entrypoint for Node.js-specific code in the package.\n// (See 'Isomorphic Code' section in the package README.md.)\n\nexport { type Buffer } from \"./bufferNode.js\";\nexport {\n\tbufferToString,\n\tIsoBuffer,\n\tstringToBuffer,\n\tUint8ArrayToString,\n} from \"./bufferNode.js\";\nexport { gitHashFile, hashFile } from \"./hashFileNode.js\";\n\nexport { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from \"./base64EncodingNode.js\";\nexport { Uint8ArrayToArrayBuffer } from \"./bufferShared.js\";\nexport { EventEmitter } from \"./eventEmitter.cjs\";\nexport { performanceNow } from \"./performanceIsomorphic.js\";\nexport { type ITraceEvent, Trace } from \"./trace.js\";\nexport {\n\ttype EventEmitterEventType,\n\tTypedEventEmitter,\n\ttype TypedEventTransform,\n} from \"./typedEventEmitter.js\";\n\nexport { createEmitter } from \"./events/index.js\";\n\nexport {\n\ttype FluidLayer,\n\tcheckLayerCompatibility,\n\ttype LayerCompatCheckResult,\n\ttype ILayerCompatDetails,\n\ttype IProvideLayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n\tLayerCompatibilityPolicyWindowMonths,\n} from \"./layerCompat.js\";\nexport { generation } from \"./layerGenerationState.js\";\n"]}

@@ -11,2 +11,40 @@ /*!

/**
* The policy for compatibility windows that a layer uses to validate compatibility with another layer.
* The other layer must be within this window relative to the layer to be compatible.
* Note that the policy is defined in terms of months, but the actual compatibility check is done using generations.
* Generations are updated every 1+ months depending on the release cadence so they are mostly 1-to-1 with months,
* but they are always higher than months since releases are not exactly every month.
*
* IMPORTANT: When changing these policy values, update the documentation in "Layer Compatibility Policy" section of
* LayerCompatibility.md at the root of the repository.
*
* @internal
*/
export declare const LayerCompatibilityPolicyWindowMonths: {
/**
* Driver is compatible with Loader versions up to 12 months (or generations) older.
*/
readonly DriverLoader: 12;
/**
* Loader is compatible with Driver versions up to 3 months (or generations) older.
*/
readonly LoaderDriver: 3;
/**
* Runtime is compatible with Loader versions up to 12 months (or generations) older.
*/
readonly RuntimeLoader: 12;
/**
* Loader is compatible with Runtime versions up to 3 months (or generations) older.
*/
readonly LoaderRuntime: 3;
/**
* Runtime is compatible with DataStore versions up to 3 months (or generations) older.
*/
readonly RuntimeDataStore: 3;
/**
* DataStore is compatible with Runtime versions up to 3 months (or generations) older.
*/
readonly DataStoreRuntime: 3;
};
/**
* Result of a layer compatibility check - whether a layer is compatible with another layer.

@@ -13,0 +51,0 @@ * @internal

@@ -1,1 +0,1 @@

{"version":3,"file":"layerCompat.d.ts","sourceRoot":"","sources":["../src/layerCompat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAC/B;IAAE,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAA;CAAE,GAC/B;IACA,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC;IAC7B;;OAEG;IACH,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CAC3D,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CAClD;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,OAAO,CAAC,0BAA0B,CAAC;IAC/E;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,mBAIvC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,g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AM,CAAC;CAC5B;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,mBAIvC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACtC,+BAA+B,EAAE,+BAA+B,EAChE,mBAAmB,EAAE,mBAAmB,GAAG,SAAS,GAClD,sBAAsB,CA4BxB"}

@@ -7,6 +7,44 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.checkLayerCompatibility = exports.defaultLayerCompatDetails = exports.ILayerCompatDetails = void 0;
exports.checkLayerCompatibility = exports.defaultLayerCompatDetails = exports.ILayerCompatDetails = exports.LayerCompatibilityPolicyWindowMonths = void 0;
/**
* The policy for compatibility windows that a layer uses to validate compatibility with another layer.
* The other layer must be within this window relative to the layer to be compatible.
* Note that the policy is defined in terms of months, but the actual compatibility check is done using generations.
* Generations are updated every 1+ months depending on the release cadence so they are mostly 1-to-1 with months,
* but they are always higher than months since releases are not exactly every month.
*
* IMPORTANT: When changing these policy values, update the documentation in "Layer Compatibility Policy" section of
* LayerCompatibility.md at the root of the repository.
*
* @internal
*/
exports.LayerCompatibilityPolicyWindowMonths = {
/**
* Driver is compatible with Loader versions up to 12 months (or generations) older.
*/
DriverLoader: 12,
/**
* Loader is compatible with Driver versions up to 3 months (or generations) older.
*/
LoaderDriver: 3,
/**
* Runtime is compatible with Loader versions up to 12 months (or generations) older.
*/
RuntimeLoader: 12,
/**
* Loader is compatible with Runtime versions up to 3 months (or generations) older.
*/
LoaderRuntime: 3,
/**
* Runtime is compatible with DataStore versions up to 3 months (or generations) older.
*/
RuntimeDataStore: 3,
/**
* DataStore is compatible with Runtime versions up to 3 months (or generations) older.
*/
DataStoreRuntime: 3,
};
/**
* @internal
*/
exports.ILayerCompatDetails = "ILayerCompatDetails";

@@ -13,0 +51,0 @@ /**

@@ -1,1 +0,1 @@

{"version":3,"file":"layerCompat.js","sourceRoot":"","sources":["../src/layerCompat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA2BH;;GAEG;AACU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC;AAsC3F;;;;GAIG;AACU,QAAA,yBAAyB,GAAwB;IAC7D,iBAAiB,EAAE,IAAI,GAAG,EAAE;IAC5B,UAAU,EAAE,CAAC,EAAE,4EAA4E;IAC3F,UAAU,EAAE,SAAS;CACrB,CAAC;AAiBF;;;;;;;;GAQG;AACH,SAAgB,uBAAuB,CACtC,+BAAgE,EAChE,mBAAoD;IAEpD,MAAM,wBAAwB,GAAG,mBAAmB,IAAI,iCAAyB,CAAC;IAClF,IAAI,sBAAsB,GAAG,IAAI,CAAC;IAClC,MAAM,mBAAmB,GAAa,EAAE,CAAC;IAEzC,2FAA2F;IAC3F,6BAA6B;IAC7B,IACC,wBAAwB,CAAC,UAAU;QACnC,+BAA+B,CAAC,sBAAsB,EACrD,CAAC;QACF,sBAAsB,GAAG,KAAK,CAAC;IAChC,CAAC;IAED,gFAAgF;IAChF,KAAK,MAAM,OAAO,IAAI,+BAA+B,CAAC,gBAAgB,EAAE,CAAC;QACxE,IAAI,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9D,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnC,CAAC;IACF,CAAC;IAED,OAAO,sBAAsB,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC;QAChE,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE;QACxB,CAAC,CAAC;YACA,YAAY,EAAE,KAAK;YACnB,sBAAsB;YACtB,mBAAmB,EAAE,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS;SACrF,CAAC;AACL,CAAC;AA/BD,0DA+BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The different Fluid layers in a client.\n * @internal\n */\nexport type FluidLayer = \"loader\" | \"driver\" | \"runtime\" | \"dataStore\";\n\n/**\n * Result of a layer compatibility check - whether a layer is compatible with another layer.\n * @internal\n */\nexport type LayerCompatCheckResult =\n\t| { readonly isCompatible: true }\n\t| {\n\t\t\treadonly isCompatible: false;\n\t\t\t/**\n\t\t\t * Whether the generation of the layer is compatible with the other layer.\n\t\t\t */\n\t\t\treadonly isGenerationCompatible: boolean;\n\t\t\t/**\n\t\t\t * The features that are required by the layer but are not supported by the other layer. This will only\n\t\t\t * be set if there are unsupported features.\n\t\t\t */\n\t\t\treadonly unsupportedFeatures: readonly string[] | undefined;\n\t };\n\n/**\n * @internal\n */\nexport const ILayerCompatDetails: keyof IProvideLayerCompatDetails = \"ILayerCompatDetails\";\n\n/**\n * @internal\n */\nexport interface IProvideLayerCompatDetails {\n\treadonly ILayerCompatDetails: ILayerCompatDetails;\n}\n\n/**\n * This interface is used to communicate the compatibility details of a layer to another layer.\n * @internal\n */\nexport interface ILayerCompatDetails extends Partial<IProvideLayerCompatDetails> {\n\t/**\n\t * A list of features supported by the layer at a particular layer boundary. This is used to check if these\n\t * set of features satisfy the requirements of another layer.\n\t */\n\treadonly supportedFeatures: ReadonlySet<string>;\n\t/**\n\t * The generation of the layer. The other layer at the layer boundary uses this to check if this satisfies\n\t * the minimum generation it requires to be compatible.\n\t *\n\t * @remarks Generation is updated on a regular cadence, say, monthly. This will allow us to determine how\n\t * far apart two layers are in terms of time and whether they are compatible.\n\t * For example, say generation is updated every month and the compatibility window between layer1 and layer2 is\n\t * 6 months. Now, if layer1 is at generation 1 and layer2 is at generation 5, then they are 4 months apart and are\n\t * compatible. But if layer1 is at generation 1 and layer2 is at generation 8, then they are 7 months apart and\n\t * are not compatible.\n\t */\n\treadonly generation: number;\n\t/**\n\t * The package version of the layer. When an incompatibility is detected, this is used to provide more context\n\t * on what the versions of the incompatible layers are.\n\t */\n\treadonly pkgVersion: string;\n}\n\n/**\n * This is the default compat details for a layer when it doesn't provide any compat details. This is used for\n * backwards compatibility to allow older layers to work before compatibility enforcement was introduced.\n * @internal\n */\nexport const defaultLayerCompatDetails: ILayerCompatDetails = {\n\tsupportedFeatures: new Set(),\n\tgeneration: 0, // 0 is reserved for layers before compatibility enforcement was introduced.\n\tpkgVersion: \"unknown\",\n};\n\n/**\n * The requirements that a layer needs another layer to support for them to be compatible.\n * @internal\n */\nexport interface ILayerCompatSupportRequirements {\n\t/**\n\t * The minimum supported generation the other layer needs to be at.\n\t */\n\treadonly minSupportedGeneration: number;\n\t/**\n\t * The features that the other layer needs to support.\n\t */\n\treadonly requiredFeatures: readonly string[];\n}\n\n/**\n * Checks compatibility of a layer (layer1) with another layer (layer2).\n * @param compatSupportRequirementsLayer1 - The requirements from layer1 that layer2 needs to meet.\n * @param compatDetailsLayer2 - The compatibility details of the layer2. If this is undefined, then the\n * default compatibility details are used for backwards compatibility.\n * @returns The result of the compatibility check indicating whether layer2 is compatible with layer1.\n *\n * @internal\n */\nexport function checkLayerCompatibility(\n\tcompatSupportRequirementsLayer1: ILayerCompatSupportRequirements,\n\tcompatDetailsLayer2: ILayerCompatDetails | undefined,\n): LayerCompatCheckResult {\n\tconst compatDetailsLayer2ToUse = compatDetailsLayer2 ?? defaultLayerCompatDetails;\n\tlet isGenerationCompatible = true;\n\tconst unsupportedFeatures: string[] = [];\n\n\t// If layer2's generation is less than the required minimum supported generation of layer1,\n\t// then it is not compatible.\n\tif (\n\t\tcompatDetailsLayer2ToUse.generation <\n\t\tcompatSupportRequirementsLayer1.minSupportedGeneration\n\t) {\n\t\tisGenerationCompatible = false;\n\t}\n\n\t// All features required by layer1 must be supported by layer2 to be compatible.\n\tfor (const feature of compatSupportRequirementsLayer1.requiredFeatures) {\n\t\tif (!compatDetailsLayer2ToUse.supportedFeatures.has(feature)) {\n\t\t\tunsupportedFeatures.push(feature);\n\t\t}\n\t}\n\n\treturn isGenerationCompatible && unsupportedFeatures.length === 0\n\t\t? { isCompatible: true }\n\t\t: {\n\t\t\t\tisCompatible: false,\n\t\t\t\tisGenerationCompatible,\n\t\t\t\tunsupportedFeatures: unsupportedFeatures.length > 0 ? unsupportedFeatures : undefined,\n\t\t\t};\n}\n"]}
{"version":3,"file":"layerCompat.js","sourceRoot":"","sources":["../src/layerCompat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH;;;;;;;;;;;GAWG;AACU,QAAA,oCAAoC,GAAG;IACnD;;OAEG;IACH,YAAY,EAAE,EAAE;IAChB;;OAEG;IACH,YAAY,EAAE,CAAC;IACf;;OAEG;IACH,aAAa,EAAE,EAAE;IACjB;;OAEG;IACH,aAAa,EAAE,CAAC;IAChB;;OAEG;IACH,gBAAgB,EAAE,CAAC;IACnB;;OAEG;IACH,gBAAgB,EAAE,CAAC;CACV,CAAC;AAqBX;;GAEG;AACU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC;AAsC3F;;;;GAIG;AACU,QAAA,yBAAyB,GAAwB;IAC7D,iBAAiB,EAAE,IAAI,GAAG,EAAE;IAC5B,UAAU,EAAE,CAAC,EAAE,4EAA4E;IAC3F,UAAU,EAAE,SAAS;CACrB,CAAC;AAiBF;;;;;;;;GAQG;AACH,SAAgB,uBAAuB,CACtC,+BAAgE,EAChE,mBAAoD;IAEpD,MAAM,wBAAwB,GAAG,mBAAmB,IAAI,iCAAyB,CAAC;IAClF,IAAI,sBAAsB,GAAG,IAAI,CAAC;IAClC,MAAM,mBAAmB,GAAa,EAAE,CAAC;IAEzC,2FAA2F;IAC3F,6BAA6B;IAC7B,IACC,wBAAwB,CAAC,UAAU;QACnC,+BAA+B,CAAC,sBAAsB,EACrD,CAAC;QACF,sBAAsB,GAAG,KAAK,CAAC;IAChC,CAAC;IAED,gFAAgF;IAChF,KAAK,MAAM,OAAO,IAAI,+BAA+B,CAAC,gBAAgB,EAAE,CAAC;QACxE,IAAI,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9D,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnC,CAAC;IACF,CAAC;IAED,OAAO,sBAAsB,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC;QAChE,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE;QACxB,CAAC,CAAC;YACA,YAAY,EAAE,KAAK;YACnB,sBAAsB;YACtB,mBAAmB,EAAE,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS;SACrF,CAAC;AACL,CAAC;AA/BD,0DA+BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The different Fluid layers in a client.\n * @internal\n */\nexport type FluidLayer = \"loader\" | \"driver\" | \"runtime\" | \"dataStore\";\n\n/**\n * The policy for compatibility windows that a layer uses to validate compatibility with another layer.\n * The other layer must be within this window relative to the layer to be compatible.\n * Note that the policy is defined in terms of months, but the actual compatibility check is done using generations.\n * Generations are updated every 1+ months depending on the release cadence so they are mostly 1-to-1 with months,\n * but they are always higher than months since releases are not exactly every month.\n *\n * IMPORTANT: When changing these policy values, update the documentation in \"Layer Compatibility Policy\" section of\n * LayerCompatibility.md at the root of the repository.\n *\n * @internal\n */\nexport const LayerCompatibilityPolicyWindowMonths = {\n\t/**\n\t * Driver is compatible with Loader versions up to 12 months (or generations) older.\n\t */\n\tDriverLoader: 12,\n\t/**\n\t * Loader is compatible with Driver versions up to 3 months (or generations) older.\n\t */\n\tLoaderDriver: 3,\n\t/**\n\t * Runtime is compatible with Loader versions up to 12 months (or generations) older.\n\t */\n\tRuntimeLoader: 12,\n\t/**\n\t * Loader is compatible with Runtime versions up to 3 months (or generations) older.\n\t */\n\tLoaderRuntime: 3,\n\t/**\n\t * Runtime is compatible with DataStore versions up to 3 months (or generations) older.\n\t */\n\tRuntimeDataStore: 3,\n\t/**\n\t * DataStore is compatible with Runtime versions up to 3 months (or generations) older.\n\t */\n\tDataStoreRuntime: 3,\n} as const;\n\n/**\n * Result of a layer compatibility check - whether a layer is compatible with another layer.\n * @internal\n */\nexport type LayerCompatCheckResult =\n\t| { readonly isCompatible: true }\n\t| {\n\t\t\treadonly isCompatible: false;\n\t\t\t/**\n\t\t\t * Whether the generation of the layer is compatible with the other layer.\n\t\t\t */\n\t\t\treadonly isGenerationCompatible: boolean;\n\t\t\t/**\n\t\t\t * The features that are required by the layer but are not supported by the other layer. This will only\n\t\t\t * be set if there are unsupported features.\n\t\t\t */\n\t\t\treadonly unsupportedFeatures: readonly string[] | undefined;\n\t };\n\n/**\n * @internal\n */\nexport const ILayerCompatDetails: keyof IProvideLayerCompatDetails = \"ILayerCompatDetails\";\n\n/**\n * @internal\n */\nexport interface IProvideLayerCompatDetails {\n\treadonly ILayerCompatDetails: ILayerCompatDetails;\n}\n\n/**\n * This interface is used to communicate the compatibility details of a layer to another layer.\n * @internal\n */\nexport interface ILayerCompatDetails extends Partial<IProvideLayerCompatDetails> {\n\t/**\n\t * A list of features supported by the layer at a particular layer boundary. This is used to check if these\n\t * set of features satisfy the requirements of another layer.\n\t */\n\treadonly supportedFeatures: ReadonlySet<string>;\n\t/**\n\t * The generation of the layer. The other layer at the layer boundary uses this to check if this satisfies\n\t * the minimum generation it requires to be compatible.\n\t *\n\t * @remarks Generation is updated on a regular cadence, say, monthly. This will allow us to determine how\n\t * far apart two layers are in terms of time and whether they are compatible.\n\t * For example, say generation is updated every month and the compatibility window between layer1 and layer2 is\n\t * 6 months. Now, if layer1 is at generation 1 and layer2 is at generation 5, then they are 4 months apart and are\n\t * compatible. But if layer1 is at generation 1 and layer2 is at generation 8, then they are 7 months apart and\n\t * are not compatible.\n\t */\n\treadonly generation: number;\n\t/**\n\t * The package version of the layer. When an incompatibility is detected, this is used to provide more context\n\t * on what the versions of the incompatible layers are.\n\t */\n\treadonly pkgVersion: string;\n}\n\n/**\n * This is the default compat details for a layer when it doesn't provide any compat details. This is used for\n * backwards compatibility to allow older layers to work before compatibility enforcement was introduced.\n * @internal\n */\nexport const defaultLayerCompatDetails: ILayerCompatDetails = {\n\tsupportedFeatures: new Set(),\n\tgeneration: 0, // 0 is reserved for layers before compatibility enforcement was introduced.\n\tpkgVersion: \"unknown\",\n};\n\n/**\n * The requirements that a layer needs another layer to support for them to be compatible.\n * @internal\n */\nexport interface ILayerCompatSupportRequirements {\n\t/**\n\t * The minimum supported generation the other layer needs to be at.\n\t */\n\treadonly minSupportedGeneration: number;\n\t/**\n\t * The features that the other layer needs to support.\n\t */\n\treadonly requiredFeatures: readonly string[];\n}\n\n/**\n * Checks compatibility of a layer (layer1) with another layer (layer2).\n * @param compatSupportRequirementsLayer1 - The requirements from layer1 that layer2 needs to meet.\n * @param compatDetailsLayer2 - The compatibility details of the layer2. If this is undefined, then the\n * default compatibility details are used for backwards compatibility.\n * @returns The result of the compatibility check indicating whether layer2 is compatible with layer1.\n *\n * @internal\n */\nexport function checkLayerCompatibility(\n\tcompatSupportRequirementsLayer1: ILayerCompatSupportRequirements,\n\tcompatDetailsLayer2: ILayerCompatDetails | undefined,\n): LayerCompatCheckResult {\n\tconst compatDetailsLayer2ToUse = compatDetailsLayer2 ?? defaultLayerCompatDetails;\n\tlet isGenerationCompatible = true;\n\tconst unsupportedFeatures: string[] = [];\n\n\t// If layer2's generation is less than the required minimum supported generation of layer1,\n\t// then it is not compatible.\n\tif (\n\t\tcompatDetailsLayer2ToUse.generation <\n\t\tcompatSupportRequirementsLayer1.minSupportedGeneration\n\t) {\n\t\tisGenerationCompatible = false;\n\t}\n\n\t// All features required by layer1 must be supported by layer2 to be compatible.\n\tfor (const feature of compatSupportRequirementsLayer1.requiredFeatures) {\n\t\tif (!compatDetailsLayer2ToUse.supportedFeatures.has(feature)) {\n\t\t\tunsupportedFeatures.push(feature);\n\t\t}\n\t}\n\n\treturn isGenerationCompatible && unsupportedFeatures.length === 0\n\t\t? { isCompatible: true }\n\t\t: {\n\t\t\t\tisCompatible: false,\n\t\t\t\tisGenerationCompatible,\n\t\t\t\tunsupportedFeatures: unsupportedFeatures.length > 0 ? unsupportedFeatures : undefined,\n\t\t\t};\n}\n"]}

@@ -14,4 +14,4 @@ /*!

export { createEmitter } from "./events/index.js";
export { type FluidLayer, checkLayerCompatibility, type LayerCompatCheckResult, type ILayerCompatDetails, type IProvideLayerCompatDetails, type ILayerCompatSupportRequirements, } from "./layerCompat.js";
export { type FluidLayer, checkLayerCompatibility, type LayerCompatCheckResult, type ILayerCompatDetails, type IProvideLayerCompatDetails, type ILayerCompatSupportRequirements, LayerCompatibilityPolicyWindowMonths, } from "./layerCompat.js";
export { generation } from "./layerGenerationState.js";
//# sourceMappingURL=indexBrowser.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"indexBrowser.d.ts","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EACN,KAAK,qBAAqB,EAC1B,iBAAiB,EACjB,KAAK,mBAAmB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EACN,KAAK,UAAU,EACf,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,GACpC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}
{"version":3,"file":"indexBrowser.d.ts","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EACN,KAAK,qBAAqB,EAC1B,iBAAiB,EACjB,KAAK,mBAAmB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EACN,KAAK,UAAU,EACf,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACpC,oCAAoC,GACpC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}

@@ -16,4 +16,4 @@ /*!

export { createEmitter } from "./events/index.js";
export { checkLayerCompatibility, } from "./layerCompat.js";
export { checkLayerCompatibility, LayerCompatibilityPolicyWindowMonths, } from "./layerCompat.js";
export { generation } from "./layerGenerationState.js";
//# sourceMappingURL=indexBrowser.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"indexBrowser.js","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,uDAAuD;AACvD,4DAA4D;AAE5D,OAAO,EACN,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAoB,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAEN,iBAAiB,GAEjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAEN,uBAAuB,GAKvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Entrypoint for browser-specific code in the package.\n// (See 'Isomorphic Code' section in the package README.md.)\n\nexport {\n\tbufferToString,\n\tisArrayBuffer,\n\tIsoBuffer,\n\tstringToBuffer,\n\tUint8ArrayToString,\n} from \"./bufferBrowser.js\";\nexport { gitHashFile, hashFile } from \"./hashFileBrowser.js\";\n\nexport { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from \"./base64EncodingBrowser.js\";\nexport { Uint8ArrayToArrayBuffer } from \"./bufferShared.js\";\nexport { EventEmitter } from \"./eventEmitter.cjs\";\nexport { performanceNow } from \"./performanceIsomorphic.js\";\nexport { type ITraceEvent, Trace } from \"./trace.js\";\nexport {\n\ttype EventEmitterEventType,\n\tTypedEventEmitter,\n\ttype TypedEventTransform,\n} from \"./typedEventEmitter.js\";\n\nexport { createEmitter } from \"./events/index.js\";\n\nexport {\n\ttype FluidLayer,\n\tcheckLayerCompatibility,\n\ttype LayerCompatCheckResult,\n\ttype ILayerCompatDetails,\n\ttype IProvideLayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n} from \"./layerCompat.js\";\nexport { generation } from \"./layerGenerationState.js\";\n"]}
{"version":3,"file":"indexBrowser.js","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,uDAAuD;AACvD,4DAA4D;AAE5D,OAAO,EACN,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAoB,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAEN,iBAAiB,GAEjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAEN,uBAAuB,EAKvB,oCAAoC,GACpC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Entrypoint for browser-specific code in the package.\n// (See 'Isomorphic Code' section in the package README.md.)\n\nexport {\n\tbufferToString,\n\tisArrayBuffer,\n\tIsoBuffer,\n\tstringToBuffer,\n\tUint8ArrayToString,\n} from \"./bufferBrowser.js\";\nexport { gitHashFile, hashFile } from \"./hashFileBrowser.js\";\n\nexport { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from \"./base64EncodingBrowser.js\";\nexport { Uint8ArrayToArrayBuffer } from \"./bufferShared.js\";\nexport { EventEmitter } from \"./eventEmitter.cjs\";\nexport { performanceNow } from \"./performanceIsomorphic.js\";\nexport { type ITraceEvent, Trace } from \"./trace.js\";\nexport {\n\ttype EventEmitterEventType,\n\tTypedEventEmitter,\n\ttype TypedEventTransform,\n} from \"./typedEventEmitter.js\";\n\nexport { createEmitter } from \"./events/index.js\";\n\nexport {\n\ttype FluidLayer,\n\tcheckLayerCompatibility,\n\ttype LayerCompatCheckResult,\n\ttype ILayerCompatDetails,\n\ttype IProvideLayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n\tLayerCompatibilityPolicyWindowMonths,\n} from \"./layerCompat.js\";\nexport { generation } from \"./layerGenerationState.js\";\n"]}

@@ -15,4 +15,4 @@ /*!

export { createEmitter } from "./events/index.js";
export { type FluidLayer, checkLayerCompatibility, type LayerCompatCheckResult, type ILayerCompatDetails, type IProvideLayerCompatDetails, type ILayerCompatSupportRequirements, } from "./layerCompat.js";
export { type FluidLayer, checkLayerCompatibility, type LayerCompatCheckResult, type ILayerCompatDetails, type IProvideLayerCompatDetails, type ILayerCompatSupportRequirements, LayerCompatibilityPolicyWindowMonths, } from "./layerCompat.js";
export { generation } from "./layerGenerationState.js";
//# sourceMappingURL=indexNode.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"indexNode.d.ts","sourceRoot":"","sources":["../src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AAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EACN,KAAK,qBAAqB,EAC1B,iBAAiB,EACjB,KAAK,mBAAmB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EACN,KAAK,UAAU,EACf,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACpC,oCAAoC,GACpC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}

@@ -14,4 +14,4 @@ /*!

export { createEmitter } from "./events/index.js";
export { checkLayerCompatibility, } from "./layerCompat.js";
export { checkLayerCompatibility, LayerCompatibilityPolicyWindowMonths, } from "./layerCompat.js";
export { generation } from "./layerGenerationState.js";
//# sourceMappingURL=indexNode.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"indexNode.js","sourceRoot":"","sources":["../src/indexNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,cAAc,EACd,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAoB,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAEN,iBAAiB,GAEjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAEN,uBAAuB,GAKvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Entrypoint for Node.js-specific code in the package.\n// (See 'Isomorphic Code' section in the package README.md.)\n\nexport { type Buffer } from \"./bufferNode.js\";\nexport {\n\tbufferToString,\n\tIsoBuffer,\n\tstringToBuffer,\n\tUint8ArrayToString,\n} from \"./bufferNode.js\";\nexport { gitHashFile, hashFile } from \"./hashFileNode.js\";\n\nexport { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from \"./base64EncodingNode.js\";\nexport { Uint8ArrayToArrayBuffer } from \"./bufferShared.js\";\nexport { EventEmitter } from \"./eventEmitter.cjs\";\nexport { performanceNow } from \"./performanceIsomorphic.js\";\nexport { type ITraceEvent, Trace } from \"./trace.js\";\nexport {\n\ttype EventEmitterEventType,\n\tTypedEventEmitter,\n\ttype TypedEventTransform,\n} from \"./typedEventEmitter.js\";\n\nexport { createEmitter } from \"./events/index.js\";\n\nexport {\n\ttype FluidLayer,\n\tcheckLayerCompatibility,\n\ttype LayerCompatCheckResult,\n\ttype ILayerCompatDetails,\n\ttype IProvideLayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n} from \"./layerCompat.js\";\nexport { generation } from \"./layerGenerationState.js\";\n"]}
{"version":3,"file":"indexNode.js","sourceRoot":"","sources":["../src/indexNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,cAAc,EACd,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAoB,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAEN,iBAAiB,GAEjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAEN,uBAAuB,EAKvB,oCAAoC,GACpC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Entrypoint for Node.js-specific code in the package.\n// (See 'Isomorphic Code' section in the package README.md.)\n\nexport { type Buffer } from \"./bufferNode.js\";\nexport {\n\tbufferToString,\n\tIsoBuffer,\n\tstringToBuffer,\n\tUint8ArrayToString,\n} from \"./bufferNode.js\";\nexport { gitHashFile, hashFile } from \"./hashFileNode.js\";\n\nexport { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from \"./base64EncodingNode.js\";\nexport { Uint8ArrayToArrayBuffer } from \"./bufferShared.js\";\nexport { EventEmitter } from \"./eventEmitter.cjs\";\nexport { performanceNow } from \"./performanceIsomorphic.js\";\nexport { type ITraceEvent, Trace } from \"./trace.js\";\nexport {\n\ttype EventEmitterEventType,\n\tTypedEventEmitter,\n\ttype TypedEventTransform,\n} from \"./typedEventEmitter.js\";\n\nexport { createEmitter } from \"./events/index.js\";\n\nexport {\n\ttype FluidLayer,\n\tcheckLayerCompatibility,\n\ttype LayerCompatCheckResult,\n\ttype ILayerCompatDetails,\n\ttype IProvideLayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n\tLayerCompatibilityPolicyWindowMonths,\n} from \"./layerCompat.js\";\nexport { generation } from \"./layerGenerationState.js\";\n"]}

@@ -11,2 +11,40 @@ /*!

/**
* The policy for compatibility windows that a layer uses to validate compatibility with another layer.
* The other layer must be within this window relative to the layer to be compatible.
* Note that the policy is defined in terms of months, but the actual compatibility check is done using generations.
* Generations are updated every 1+ months depending on the release cadence so they are mostly 1-to-1 with months,
* but they are always higher than months since releases are not exactly every month.
*
* IMPORTANT: When changing these policy values, update the documentation in "Layer Compatibility Policy" section of
* LayerCompatibility.md at the root of the repository.
*
* @internal
*/
export declare const LayerCompatibilityPolicyWindowMonths: {
/**
* Driver is compatible with Loader versions up to 12 months (or generations) older.
*/
readonly DriverLoader: 12;
/**
* Loader is compatible with Driver versions up to 3 months (or generations) older.
*/
readonly LoaderDriver: 3;
/**
* Runtime is compatible with Loader versions up to 12 months (or generations) older.
*/
readonly RuntimeLoader: 12;
/**
* Loader is compatible with Runtime versions up to 3 months (or generations) older.
*/
readonly LoaderRuntime: 3;
/**
* Runtime is compatible with DataStore versions up to 3 months (or generations) older.
*/
readonly RuntimeDataStore: 3;
/**
* DataStore is compatible with Runtime versions up to 3 months (or generations) older.
*/
readonly DataStoreRuntime: 3;
};
/**
* Result of a layer compatibility check - whether a layer is compatible with another layer.

@@ -13,0 +51,0 @@ * @internal

@@ -1,1 +0,1 @@

{"version":3,"file":"layerCompat.d.ts","sourceRoot":"","sources":["../src/layerCompat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAC/B;IAAE,QAAQ,CAAC,YAAY,EAAE,IAA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BxB"}

@@ -6,4 +6,42 @@ /*!

/**
* The policy for compatibility windows that a layer uses to validate compatibility with another layer.
* The other layer must be within this window relative to the layer to be compatible.
* Note that the policy is defined in terms of months, but the actual compatibility check is done using generations.
* Generations are updated every 1+ months depending on the release cadence so they are mostly 1-to-1 with months,
* but they are always higher than months since releases are not exactly every month.
*
* IMPORTANT: When changing these policy values, update the documentation in "Layer Compatibility Policy" section of
* LayerCompatibility.md at the root of the repository.
*
* @internal
*/
export const LayerCompatibilityPolicyWindowMonths = {
/**
* Driver is compatible with Loader versions up to 12 months (or generations) older.
*/
DriverLoader: 12,
/**
* Loader is compatible with Driver versions up to 3 months (or generations) older.
*/
LoaderDriver: 3,
/**
* Runtime is compatible with Loader versions up to 12 months (or generations) older.
*/
RuntimeLoader: 12,
/**
* Loader is compatible with Runtime versions up to 3 months (or generations) older.
*/
LoaderRuntime: 3,
/**
* Runtime is compatible with DataStore versions up to 3 months (or generations) older.
*/
RuntimeDataStore: 3,
/**
* DataStore is compatible with Runtime versions up to 3 months (or generations) older.
*/
DataStoreRuntime: 3,
};
/**
* @internal
*/
export const ILayerCompatDetails = "ILayerCompatDetails";

@@ -10,0 +48,0 @@ /**

@@ -1,1 +0,1 @@

{"version":3,"file":"layerCompat.js","sourceRoot":"","sources":["../src/layerCompat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2BH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAqC,qBAAqB,CAAC;AAsC3F;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAwB;IAC7D,iBAAiB,EAAE,IAAI,GAAG,EAAE;IAC5B,UAAU,EAAE,CAAC,EAAE,4EAA4E;IAC3F,UAAU,EAAE,SAAS;CACrB,CAAC;AAiBF;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB,CACtC,+BAAgE,EAChE,mBAAoD;IAEpD,MAAM,wBAAwB,GAAG,mBAAmB,IAAI,yBAAyB,CAAC;IAClF,IAAI,sBAAsB,GAAG,IAAI,CAAC;IAClC,MAAM,mBAAmB,GAAa,EAAE,CAAC;IAEzC,2FAA2F;IAC3F,6BAA6B;IAC7B,IACC,wBAAwB,CAAC,UAAU;QACnC,+BAA+B,CAAC,sBAAsB,EACrD,CAAC;QACF,sBAAsB,GAAG,KAAK,CAAC;IAChC,CAAC;IAED,gFAAgF;IAChF,KAAK,MAAM,OAAO,IAAI,+BAA+B,CAAC,gBAAgB,EAAE,CAAC;QACxE,IAAI,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9D,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnC,CAAC;IACF,CAAC;IAED,OAAO,sBAAsB,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC;QAChE,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE;QACxB,CAAC,CAAC;YACA,YAAY,EAAE,KAAK;YACnB,sBAAsB;YACtB,mBAAmB,EAAE,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS;SACrF,CAAC;AACL,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The different Fluid layers in a client.\n * @internal\n */\nexport type FluidLayer = \"loader\" | \"driver\" | \"runtime\" | \"dataStore\";\n\n/**\n * Result of a layer compatibility check - whether a layer is compatible with another layer.\n * @internal\n */\nexport type LayerCompatCheckResult =\n\t| { readonly isCompatible: true }\n\t| {\n\t\t\treadonly isCompatible: false;\n\t\t\t/**\n\t\t\t * Whether the generation of the layer is compatible with the other layer.\n\t\t\t */\n\t\t\treadonly isGenerationCompatible: boolean;\n\t\t\t/**\n\t\t\t * The features that are required by the layer but are not supported by the other layer. This will only\n\t\t\t * be set if there are unsupported features.\n\t\t\t */\n\t\t\treadonly unsupportedFeatures: readonly string[] | undefined;\n\t };\n\n/**\n * @internal\n */\nexport const ILayerCompatDetails: keyof IProvideLayerCompatDetails = \"ILayerCompatDetails\";\n\n/**\n * @internal\n */\nexport interface IProvideLayerCompatDetails {\n\treadonly ILayerCompatDetails: ILayerCompatDetails;\n}\n\n/**\n * This interface is used to communicate the compatibility details of a layer to another layer.\n * @internal\n */\nexport interface ILayerCompatDetails extends Partial<IProvideLayerCompatDetails> {\n\t/**\n\t * A list of features supported by the layer at a particular layer boundary. This is used to check if these\n\t * set of features satisfy the requirements of another layer.\n\t */\n\treadonly supportedFeatures: ReadonlySet<string>;\n\t/**\n\t * The generation of the layer. The other layer at the layer boundary uses this to check if this satisfies\n\t * the minimum generation it requires to be compatible.\n\t *\n\t * @remarks Generation is updated on a regular cadence, say, monthly. This will allow us to determine how\n\t * far apart two layers are in terms of time and whether they are compatible.\n\t * For example, say generation is updated every month and the compatibility window between layer1 and layer2 is\n\t * 6 months. Now, if layer1 is at generation 1 and layer2 is at generation 5, then they are 4 months apart and are\n\t * compatible. But if layer1 is at generation 1 and layer2 is at generation 8, then they are 7 months apart and\n\t * are not compatible.\n\t */\n\treadonly generation: number;\n\t/**\n\t * The package version of the layer. When an incompatibility is detected, this is used to provide more context\n\t * on what the versions of the incompatible layers are.\n\t */\n\treadonly pkgVersion: string;\n}\n\n/**\n * This is the default compat details for a layer when it doesn't provide any compat details. This is used for\n * backwards compatibility to allow older layers to work before compatibility enforcement was introduced.\n * @internal\n */\nexport const defaultLayerCompatDetails: ILayerCompatDetails = {\n\tsupportedFeatures: new Set(),\n\tgeneration: 0, // 0 is reserved for layers before compatibility enforcement was introduced.\n\tpkgVersion: \"unknown\",\n};\n\n/**\n * The requirements that a layer needs another layer to support for them to be compatible.\n * @internal\n */\nexport interface ILayerCompatSupportRequirements {\n\t/**\n\t * The minimum supported generation the other layer needs to be at.\n\t */\n\treadonly minSupportedGeneration: number;\n\t/**\n\t * The features that the other layer needs to support.\n\t */\n\treadonly requiredFeatures: readonly string[];\n}\n\n/**\n * Checks compatibility of a layer (layer1) with another layer (layer2).\n * @param compatSupportRequirementsLayer1 - The requirements from layer1 that layer2 needs to meet.\n * @param compatDetailsLayer2 - The compatibility details of the layer2. If this is undefined, then the\n * default compatibility details are used for backwards compatibility.\n * @returns The result of the compatibility check indicating whether layer2 is compatible with layer1.\n *\n * @internal\n */\nexport function checkLayerCompatibility(\n\tcompatSupportRequirementsLayer1: ILayerCompatSupportRequirements,\n\tcompatDetailsLayer2: ILayerCompatDetails | undefined,\n): LayerCompatCheckResult {\n\tconst compatDetailsLayer2ToUse = compatDetailsLayer2 ?? defaultLayerCompatDetails;\n\tlet isGenerationCompatible = true;\n\tconst unsupportedFeatures: string[] = [];\n\n\t// If layer2's generation is less than the required minimum supported generation of layer1,\n\t// then it is not compatible.\n\tif (\n\t\tcompatDetailsLayer2ToUse.generation <\n\t\tcompatSupportRequirementsLayer1.minSupportedGeneration\n\t) {\n\t\tisGenerationCompatible = false;\n\t}\n\n\t// All features required by layer1 must be supported by layer2 to be compatible.\n\tfor (const feature of compatSupportRequirementsLayer1.requiredFeatures) {\n\t\tif (!compatDetailsLayer2ToUse.supportedFeatures.has(feature)) {\n\t\t\tunsupportedFeatures.push(feature);\n\t\t}\n\t}\n\n\treturn isGenerationCompatible && unsupportedFeatures.length === 0\n\t\t? { isCompatible: true }\n\t\t: {\n\t\t\t\tisCompatible: false,\n\t\t\t\tisGenerationCompatible,\n\t\t\t\tunsupportedFeatures: unsupportedFeatures.length > 0 ? unsupportedFeatures : undefined,\n\t\t\t};\n}\n"]}
{"version":3,"file":"layerCompat.js","sourceRoot":"","sources":["../src/layerCompat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG;IACnD;;OAEG;IACH,YAAY,EAAE,EAAE;IAChB;;OAEG;IACH,YAAY,EAAE,CAAC;IACf;;OAEG;IACH,aAAa,EAAE,EAAE;IACjB;;OAEG;IACH,aAAa,EAAE,CAAC;I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) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The different Fluid layers in a client.\n * @internal\n */\nexport type FluidLayer = \"loader\" | \"driver\" | \"runtime\" | \"dataStore\";\n\n/**\n * The policy for compatibility windows that a layer uses to validate compatibility with another layer.\n * The other layer must be within this window relative to the layer to be compatible.\n * Note that the policy is defined in terms of months, but the actual compatibility check is done using generations.\n * Generations are updated every 1+ months depending on the release cadence so they are mostly 1-to-1 with months,\n * but they are always higher than months since releases are not exactly every month.\n *\n * IMPORTANT: When changing these policy values, update the documentation in \"Layer Compatibility Policy\" section of\n * LayerCompatibility.md at the root of the repository.\n *\n * @internal\n */\nexport const LayerCompatibilityPolicyWindowMonths = {\n\t/**\n\t * Driver is compatible with Loader versions up to 12 months (or generations) older.\n\t */\n\tDriverLoader: 12,\n\t/**\n\t * Loader is compatible with Driver versions up to 3 months (or generations) older.\n\t */\n\tLoaderDriver: 3,\n\t/**\n\t * Runtime is compatible with Loader versions up to 12 months (or generations) older.\n\t */\n\tRuntimeLoader: 12,\n\t/**\n\t * Loader is compatible with Runtime versions up to 3 months (or generations) older.\n\t */\n\tLoaderRuntime: 3,\n\t/**\n\t * Runtime is compatible with DataStore versions up to 3 months (or generations) older.\n\t */\n\tRuntimeDataStore: 3,\n\t/**\n\t * DataStore is compatible with Runtime versions up to 3 months (or generations) older.\n\t */\n\tDataStoreRuntime: 3,\n} as const;\n\n/**\n * Result of a layer compatibility check - whether a layer is compatible with another layer.\n * @internal\n */\nexport type LayerCompatCheckResult =\n\t| { readonly isCompatible: true }\n\t| {\n\t\t\treadonly isCompatible: false;\n\t\t\t/**\n\t\t\t * Whether the generation of the layer is compatible with the other layer.\n\t\t\t */\n\t\t\treadonly isGenerationCompatible: boolean;\n\t\t\t/**\n\t\t\t * The features that are required by the layer but are not supported by the other layer. This will only\n\t\t\t * be set if there are unsupported features.\n\t\t\t */\n\t\t\treadonly unsupportedFeatures: readonly string[] | undefined;\n\t };\n\n/**\n * @internal\n */\nexport const ILayerCompatDetails: keyof IProvideLayerCompatDetails = \"ILayerCompatDetails\";\n\n/**\n * @internal\n */\nexport interface IProvideLayerCompatDetails {\n\treadonly ILayerCompatDetails: ILayerCompatDetails;\n}\n\n/**\n * This interface is used to communicate the compatibility details of a layer to another layer.\n * @internal\n */\nexport interface ILayerCompatDetails extends Partial<IProvideLayerCompatDetails> {\n\t/**\n\t * A list of features supported by the layer at a particular layer boundary. This is used to check if these\n\t * set of features satisfy the requirements of another layer.\n\t */\n\treadonly supportedFeatures: ReadonlySet<string>;\n\t/**\n\t * The generation of the layer. The other layer at the layer boundary uses this to check if this satisfies\n\t * the minimum generation it requires to be compatible.\n\t *\n\t * @remarks Generation is updated on a regular cadence, say, monthly. This will allow us to determine how\n\t * far apart two layers are in terms of time and whether they are compatible.\n\t * For example, say generation is updated every month and the compatibility window between layer1 and layer2 is\n\t * 6 months. Now, if layer1 is at generation 1 and layer2 is at generation 5, then they are 4 months apart and are\n\t * compatible. But if layer1 is at generation 1 and layer2 is at generation 8, then they are 7 months apart and\n\t * are not compatible.\n\t */\n\treadonly generation: number;\n\t/**\n\t * The package version of the layer. When an incompatibility is detected, this is used to provide more context\n\t * on what the versions of the incompatible layers are.\n\t */\n\treadonly pkgVersion: string;\n}\n\n/**\n * This is the default compat details for a layer when it doesn't provide any compat details. This is used for\n * backwards compatibility to allow older layers to work before compatibility enforcement was introduced.\n * @internal\n */\nexport const defaultLayerCompatDetails: ILayerCompatDetails = {\n\tsupportedFeatures: new Set(),\n\tgeneration: 0, // 0 is reserved for layers before compatibility enforcement was introduced.\n\tpkgVersion: \"unknown\",\n};\n\n/**\n * The requirements that a layer needs another layer to support for them to be compatible.\n * @internal\n */\nexport interface ILayerCompatSupportRequirements {\n\t/**\n\t * The minimum supported generation the other layer needs to be at.\n\t */\n\treadonly minSupportedGeneration: number;\n\t/**\n\t * The features that the other layer needs to support.\n\t */\n\treadonly requiredFeatures: readonly string[];\n}\n\n/**\n * Checks compatibility of a layer (layer1) with another layer (layer2).\n * @param compatSupportRequirementsLayer1 - The requirements from layer1 that layer2 needs to meet.\n * @param compatDetailsLayer2 - The compatibility details of the layer2. If this is undefined, then the\n * default compatibility details are used for backwards compatibility.\n * @returns The result of the compatibility check indicating whether layer2 is compatible with layer1.\n *\n * @internal\n */\nexport function checkLayerCompatibility(\n\tcompatSupportRequirementsLayer1: ILayerCompatSupportRequirements,\n\tcompatDetailsLayer2: ILayerCompatDetails | undefined,\n): LayerCompatCheckResult {\n\tconst compatDetailsLayer2ToUse = compatDetailsLayer2 ?? defaultLayerCompatDetails;\n\tlet isGenerationCompatible = true;\n\tconst unsupportedFeatures: string[] = [];\n\n\t// If layer2's generation is less than the required minimum supported generation of layer1,\n\t// then it is not compatible.\n\tif (\n\t\tcompatDetailsLayer2ToUse.generation <\n\t\tcompatSupportRequirementsLayer1.minSupportedGeneration\n\t) {\n\t\tisGenerationCompatible = false;\n\t}\n\n\t// All features required by layer1 must be supported by layer2 to be compatible.\n\tfor (const feature of compatSupportRequirementsLayer1.requiredFeatures) {\n\t\tif (!compatDetailsLayer2ToUse.supportedFeatures.has(feature)) {\n\t\t\tunsupportedFeatures.push(feature);\n\t\t}\n\t}\n\n\treturn isGenerationCompatible && unsupportedFeatures.length === 0\n\t\t? { isCompatible: true }\n\t\t: {\n\t\t\t\tisCompatible: false,\n\t\t\t\tisGenerationCompatible,\n\t\t\t\tunsupportedFeatures: unsupportedFeatures.length > 0 ? unsupportedFeatures : undefined,\n\t\t\t};\n}\n"]}
{
"name": "@fluid-internal/client-utils",
"version": "2.82.0",
"version": "2.83.0",
"description": "Not intended for use outside the Fluid Framework.",

@@ -80,4 +80,4 @@ "homepage": "https://fluidframework.com",

"dependencies": {
"@fluidframework/core-interfaces": "~2.82.0",
"@fluidframework/core-utils": "~2.82.0",
"@fluidframework/core-interfaces": "~2.83.0",
"@fluidframework/core-utils": "~2.83.0",
"@types/events_pkg": "npm:@types/events@^3.0.0",

@@ -92,12 +92,12 @@ "base64-js": "^1.5.1",

"@biomejs/biome": "~1.9.3",
"@fluid-internal/client-utils-previous": "npm:@fluid-internal/client-utils@2.81.0",
"@fluid-internal/mocha-test-setup": "~2.82.0",
"@fluid-internal/client-utils-previous": "npm:@fluid-internal/client-utils@2.82.0",
"@fluid-internal/mocha-test-setup": "~2.83.0",
"@fluid-tools/build-cli": "^0.63.0",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.63.0",
"@fluidframework/eslint-config-fluid": "~2.82.0",
"@fluidframework/eslint-config-fluid": "~2.83.0",
"@microsoft/api-extractor": "7.52.11",
"@types/base64-js": "^1.3.2",
"@types/jest": "29.5.3",
"@types/jest-environment-puppeteer": "~2.82.0",
"@types/jest-environment-puppeteer": "~2.83.0",
"@types/mocha": "^10.0.10",

@@ -104,0 +104,0 @@ "@types/node": "~20.19.30",

@@ -38,3 +38,4 @@ /*!

type ILayerCompatSupportRequirements,
LayerCompatibilityPolicyWindowMonths,
} from "./layerCompat.js";
export { generation } from "./layerGenerationState.js";

@@ -38,3 +38,4 @@ /*!

type ILayerCompatSupportRequirements,
LayerCompatibilityPolicyWindowMonths,
} from "./layerCompat.js";
export { generation } from "./layerGenerationState.js";

@@ -13,2 +13,41 @@ /*!

/**
* The policy for compatibility windows that a layer uses to validate compatibility with another layer.
* The other layer must be within this window relative to the layer to be compatible.
* Note that the policy is defined in terms of months, but the actual compatibility check is done using generations.
* Generations are updated every 1+ months depending on the release cadence so they are mostly 1-to-1 with months,
* but they are always higher than months since releases are not exactly every month.
*
* IMPORTANT: When changing these policy values, update the documentation in "Layer Compatibility Policy" section of
* LayerCompatibility.md at the root of the repository.
*
* @internal
*/
export const LayerCompatibilityPolicyWindowMonths = {
/**
* Driver is compatible with Loader versions up to 12 months (or generations) older.
*/
DriverLoader: 12,
/**
* Loader is compatible with Driver versions up to 3 months (or generations) older.
*/
LoaderDriver: 3,
/**
* Runtime is compatible with Loader versions up to 12 months (or generations) older.
*/
RuntimeLoader: 12,
/**
* Loader is compatible with Runtime versions up to 3 months (or generations) older.
*/
LoaderRuntime: 3,
/**
* Runtime is compatible with DataStore versions up to 3 months (or generations) older.
*/
RuntimeDataStore: 3,
/**
* DataStore is compatible with Runtime versions up to 3 months (or generations) older.
*/
DataStoreRuntime: 3,
} as const;
/**
* Result of a layer compatibility check - whether a layer is compatible with another layer.

@@ -15,0 +54,0 @@ * @internal