@fluidframework/runtime-utils
Advanced tools
+4
-0
| # @fluidframework/runtime-utils | ||
| ## 2.102.0 | ||
| Dependency updates only. | ||
| ## 2.101.0 | ||
@@ -4,0 +8,0 @@ |
@@ -8,2 +8,3 @@ /*! | ||
| import type { ContainerRuntimeBaseAlpha, IContainerRuntimeBase } from "@fluidframework/runtime-definitions/internal"; | ||
| import { type ITelemetryPropertiesExt } from "@fluidframework/telemetry-utils/internal"; | ||
| /** | ||
@@ -41,2 +42,12 @@ * Converts an error object into an {@link @fluidframework/core-interfaces#IResponse}. | ||
| /** | ||
| * Returns the canonical set of code-artifact-tagged telemetry properties identifying a data store. | ||
| * Use this anywhere a data store identity needs to appear in telemetry, so all such logs use | ||
| * consistent property names. | ||
| * @internal | ||
| */ | ||
| export declare function dataStoreLoadTelemetryProps(props: { | ||
| id: string; | ||
| packagePath: readonly string[]; | ||
| }): ITelemetryPropertiesExt; | ||
| /** | ||
| * Converts types to their alpha counterparts to expose alpha functionality. | ||
@@ -43,0 +54,0 @@ * @legacy @alpha |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"dataStoreHelpers.d.ts","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,KAAK,EACX,sBAAsB,EACtB,2BAA2B,EAC3B,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EACX,yBAAyB,EACzB,qBAAqB,EACrB,MAAM,8CAA8C,CAAC;AAwBtD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CA4B7D;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,GAAG,KAAK,CAkBjF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,YAAa,QAAQ,KAAG,S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BAA2B,CAAC,KAAK,EAAE;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,GAAG,uBAAuB,CAO1B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,yBAAyB,CAAC;AACzF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,2BAA2B,CAAC"} |
@@ -7,3 +7,3 @@ "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.asLegacyAlpha = exports.createResponseError = exports.create404Response = exports.responseToException = exports.exceptionToResponse = void 0; | ||
| exports.asLegacyAlpha = exports.dataStoreLoadTelemetryProps = exports.createResponseError = exports.create404Response = exports.responseToException = exports.exceptionToResponse = void 0; | ||
| const internal_1 = require("@fluidframework/core-utils/internal"); | ||
@@ -114,2 +114,17 @@ const internal_2 = require("@fluidframework/telemetry-utils/internal"); | ||
| /** | ||
| * Returns the canonical set of code-artifact-tagged telemetry properties identifying a data store. | ||
| * Use this anywhere a data store identity needs to appear in telemetry, so all such logs use | ||
| * consistent property names. | ||
| * @internal | ||
| */ | ||
| function dataStoreLoadTelemetryProps(props) { | ||
| const { id, packagePath } = props; | ||
| const fullPackageName = packagePath.length > 0 ? packagePath.join("/") : undefined; | ||
| return (0, internal_2.tagCodeArtifacts)({ | ||
| fullPackageName, | ||
| fluidDataStoreId: id, | ||
| }); | ||
| } | ||
| exports.dataStoreLoadTelemetryProps = dataStoreLoadTelemetryProps; | ||
| /** | ||
| * Converts types to their alpha counterparts to expose alpha functionality. | ||
@@ -116,0 +131,0 @@ * @legacy @alpha |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"dataStoreHelpers.js","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA6D;AAS7D,uEAAkF;AAUlF;;;GAGG;AACH,SAAS,mBAAmB,CA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,OAAO;QACP,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ,CAAC,MAAM;QACrB,IAAI,KAAK;YACR,OAAO,YAAY,CAAC,KAAK,CAAC;QAC3B,CAAC;QACD,yBAAyB,EAAE,QAAQ,CAAC,OAAO;KAC3C,CAAC;IAEF,OAAO,WAAW,CAAC;AACpB,CAAC;AAlBD,kDAkBC;AAED;;;;;;GAMG;AACI,MAAM,iBAAiB,GAAG,CAAC,OAAiB,EAAa,EAAE,CACjE,mBAAmB,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;AADnC,QAAA,iBAAiB,qBACkB;AAEhD;;;;;;;;GAQG;AACH,SAAgB,mBAAmB,CAClC,MAAc,EACd,KAAa,EACb,OAAiB,EACjB,OAAiC;IAEjC,IAAA,iBAAM,EAAC,MAAM,KAAK,GAAG,EAAE,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACrF,wEAAwE;IACxE,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9C,uLAAuL;IACvL,MAAM,YAAY,GAAG,IAAA,iCAAsB,GAAE,CAAC;IAE9C,OAAO;QACN,QAAQ,EAAE,YAAY;QACtB,MAAM;QACN,KAAK,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,UAAU,EAAE;QACnE,IAAI,KAAK;YACR,OAAO,YAAY,CAAC,KAAK,CAAC;QAC3B,CAAC;QACD,OAAO;KACP,CAAC;AACH,CAAC;AAtBD,kDAsBC;AAYD;;;GAGG;AACH,SAAgB,aAAa,CAC5B,OAAuD;IAEvD,OAAO,OAAO,CAAC;AAChB,CAAC;AAJD,sCAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type {\n\tIFluidDataStoreRuntime,\n\tIFluidDataStoreRuntimeAlpha,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport type {\n\tContainerRuntimeBaseAlpha,\n\tIContainerRuntimeBase,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { generateErrorWithStack } from \"@fluidframework/telemetry-utils/internal\";\n\ninterface IResponseException extends Error {\n\terrorFromRequestFluidObject: true;\n\tmessage: string;\n\tcode: number;\n\tstack?: string;\n\tunderlyingResponseHeaders?: Record<string, unknown>;\n}\n\n/**\n * Type guard for determining if an error is an {@link IResponseException}.\n * @internal\n */\nfunction isResponseException(err: unknown): err is IResponseException {\n\treturn (\n\t\terr !== null &&\n\t\ttypeof err === \"object\" &&\n\t\t\"errorFromRequestFluidObject\" in err &&\n\t\t(err as { errorFromRequestFluidObject: unknown }).errorFromRequestFluidObject === true\n\t);\n}\n\n/**\n * Converts an error object into an {@link @fluidframework/core-interfaces#IResponse}.\n * @internal\n */\nexport function exceptionToResponse(error: unknown): IResponse {\n\tconst status = 500;\n\tif (isResponseException(error)) {\n\t\treturn {\n\t\t\tmimeType: \"text/plain\",\n\t\t\tstatus: error.code,\n\t\t\tvalue: error.message,\n\t\t\tget stack() {\n\t\t\t\treturn error.stack;\n\t\t\t},\n\t\t\theaders: error.underlyingResponseHeaders,\n\t\t};\n\t}\n\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack =\n\t\ttypeof error === \"object\" && error !== null && \"stack\" in error\n\t\t\t? (error as { stack: string })\n\t\t\t: generateErrorWithStack();\n\n\treturn {\n\t\tmimeType: \"text/plain\",\n\t\tstatus,\n\t\tvalue: `${error}`,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t};\n}\n\n/**\n * Converts an {@link @fluidframework/core-interfaces#IResponse} back into an Error object that can be thrown.\n * @param response - The {@link @fluidframework/core-interfaces#IResponse} to convert.\n * @param request - The original {@link @fluidframework/core-interfaces#IRequest}.\n * @returns An Error object with additional properties from the response\n * @internal\n */\nexport function responseToException(response: IResponse, request: IRequest): Error {\n\t// As of 2025-08-20 the code seems to assume `response.value` is always a string.\n\t// This type assertion just encodes that assumption as we move to stricter linting rules, but it might need to be revisited.\n\tconst message = response.value as string;\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack = \"stack\" in response ? response : generateErrorWithStack();\n\tconst responseErr: Error & IResponseException = {\n\t\terrorFromRequestFluidObject: true,\n\t\tmessage,\n\t\tname: \"Error\",\n\t\tcode: response.status,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t\tunderlyingResponseHeaders: response.headers,\n\t};\n\n\treturn responseErr;\n}\n\n/**\n * Creates a 404 \"not found\" response for the given request\n * @param request - The request that resulted in the 404 response\n * @returns An {@link @fluidframework/core-interfaces#IResponse} with 404 status code.\n * @legacy\n * @beta\n */\nexport const create404Response = (request: IRequest): IResponse =>\n\tcreateResponseError(404, \"not found\", request);\n\n/**\n * Creates an error response with the specified status code and message\n * @param status - HTTP status code for the error (must not be 200)\n * @param value - Error message or description\n * @param request - The request that resulted in this error\n * @param headers - Optional headers to include in the response\n * @returns An {@link @fluidframework/core-interfaces#IResponse} representing the error\n * @internal\n */\nexport function createResponseError(\n\tstatus: number,\n\tvalue: string,\n\trequest: IRequest,\n\theaders?: Record<string, unknown>,\n): IResponse {\n\tassert(status !== 200, 0x19b /* \"Cannot not create response error on 200 status\" */);\n\t// Omit query string which could contain personal data unfit for logging\n\tconst urlNoQuery = request.url?.split(\"?\")[0];\n\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack = generateErrorWithStack();\n\n\treturn {\n\t\tmimeType: \"text/plain\",\n\t\tstatus,\n\t\tvalue: urlNoQuery === undefined ? value : `${value}: ${urlNoQuery}`,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t\theaders,\n\t};\n}\n\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(runtime: IContainerRuntimeBase): ContainerRuntimeBaseAlpha;\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(runtime: IFluidDataStoreRuntime): IFluidDataStoreRuntimeAlpha;\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(\n\truntime: IFluidDataStoreRuntime | IContainerRuntimeBase,\n): unknown {\n\treturn runtime;\n}\n"]} | ||
| {"version":3,"file":"dataStoreHelpers.js","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA6D;AAS7D,uEAIkD;AAUlD;;;GAGG;AACH,SAAS,mBAAmB,CAAC,GAAY;IACxC,OAAO,CACN,GAAG,KAAK,IAAI;QACZ,OAAO,GAAG,KAAK,QAAQ;QACvB,6BAA6B,IAAI,GAAG;QACnC,GAAgD,CAAC,2BAA2B,KAAK,IAAI,CACtF,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,KAAc;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC;IACnB,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO;YACN,QAAQ,EAAE,YAAY;YACtB,MAAM,EAAE,KAAK,CAAC,IAAI;YAClB,KAAK,EAAE,KAAK,CAAC,OAAO;YACpB,IAAI,KAAK;gBACR,OAAO,KAAK,CAAC,KAAK,CAAC;YACpB,CAAC;YACD,OAAO,EAAE,KAAK,CAAC,yBAAyB;SACxC,CAAC;IACH,CAAC;IAED,uLAAuL;IACvL,MAAM,YAAY,GACjB,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,IAA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,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9C,uLAAuL;IACvL,MAAM,YAAY,GAAG,IAAA,iCAAsB,GAAE,CAAC;IAE9C,OAAO;QACN,QAAQ,EAAE,YAAY;QACtB,MAAM;QACN,KAAK,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,UAAU,EAAE;QACnE,IAAI,KAAK;YACR,OAAO,YAAY,CAAC,KAAK,CAAC;QAC3B,CAAC;QACD,OAAO;KACP,CAAC;AACH,CAAC;AAtBD,kDAsBC;AAED;;;;;GAKG;AACH,SAAgB,2BAA2B,CAAC,KAG3C;IACA,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,eAAe,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnF,OAAO,IAAA,2BAAgB,EAAC;QACvB,eAAe;QACf,gBAAgB,EAAE,EAAE;KACpB,CAAC,CAAC;AACJ,CAAC;AAVD,kEAUC;AAYD;;;GAGG;AACH,SAAgB,aAAa,CAC5B,OAAuD;IAEvD,OAAO,OAAO,CAAC;AAChB,CAAC;AAJD,sCAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type {\n\tIFluidDataStoreRuntime,\n\tIFluidDataStoreRuntimeAlpha,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport type {\n\tContainerRuntimeBaseAlpha,\n\tIContainerRuntimeBase,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tgenerateErrorWithStack,\n\ttagCodeArtifacts,\n\ttype ITelemetryPropertiesExt,\n} from \"@fluidframework/telemetry-utils/internal\";\n\ninterface IResponseException extends Error {\n\terrorFromRequestFluidObject: true;\n\tmessage: string;\n\tcode: number;\n\tstack?: string;\n\tunderlyingResponseHeaders?: Record<string, unknown>;\n}\n\n/**\n * Type guard for determining if an error is an {@link IResponseException}.\n * @internal\n */\nfunction isResponseException(err: unknown): err is IResponseException {\n\treturn (\n\t\terr !== null &&\n\t\ttypeof err === \"object\" &&\n\t\t\"errorFromRequestFluidObject\" in err &&\n\t\t(err as { errorFromRequestFluidObject: unknown }).errorFromRequestFluidObject === true\n\t);\n}\n\n/**\n * Converts an error object into an {@link @fluidframework/core-interfaces#IResponse}.\n * @internal\n */\nexport function exceptionToResponse(error: unknown): IResponse {\n\tconst status = 500;\n\tif (isResponseException(error)) {\n\t\treturn {\n\t\t\tmimeType: \"text/plain\",\n\t\t\tstatus: error.code,\n\t\t\tvalue: error.message,\n\t\t\tget stack() {\n\t\t\t\treturn error.stack;\n\t\t\t},\n\t\t\theaders: error.underlyingResponseHeaders,\n\t\t};\n\t}\n\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack =\n\t\ttypeof error === \"object\" && error !== null && \"stack\" in error\n\t\t\t? (error as { stack: string })\n\t\t\t: generateErrorWithStack();\n\n\treturn {\n\t\tmimeType: \"text/plain\",\n\t\tstatus,\n\t\tvalue: `${error}`,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t};\n}\n\n/**\n * Converts an {@link @fluidframework/core-interfaces#IResponse} back into an Error object that can be thrown.\n * @param response - The {@link @fluidframework/core-interfaces#IResponse} to convert.\n * @param request - The original {@link @fluidframework/core-interfaces#IRequest}.\n * @returns An Error object with additional properties from the response\n * @internal\n */\nexport function responseToException(response: IResponse, request: IRequest): Error {\n\t// As of 2025-08-20 the code seems to assume `response.value` is always a string.\n\t// This type assertion just encodes that assumption as we move to stricter linting rules, but it might need to be revisited.\n\tconst message = response.value as string;\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack = \"stack\" in response ? response : generateErrorWithStack();\n\tconst responseErr: Error & IResponseException = {\n\t\terrorFromRequestFluidObject: true,\n\t\tmessage,\n\t\tname: \"Error\",\n\t\tcode: response.status,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t\tunderlyingResponseHeaders: response.headers,\n\t};\n\n\treturn responseErr;\n}\n\n/**\n * Creates a 404 \"not found\" response for the given request\n * @param request - The request that resulted in the 404 response\n * @returns An {@link @fluidframework/core-interfaces#IResponse} with 404 status code.\n * @legacy\n * @beta\n */\nexport const create404Response = (request: IRequest): IResponse =>\n\tcreateResponseError(404, \"not found\", request);\n\n/**\n * Creates an error response with the specified status code and message\n * @param status - HTTP status code for the error (must not be 200)\n * @param value - Error message or description\n * @param request - The request that resulted in this error\n * @param headers - Optional headers to include in the response\n * @returns An {@link @fluidframework/core-interfaces#IResponse} representing the error\n * @internal\n */\nexport function createResponseError(\n\tstatus: number,\n\tvalue: string,\n\trequest: IRequest,\n\theaders?: Record<string, unknown>,\n): IResponse {\n\tassert(status !== 200, 0x19b /* \"Cannot not create response error on 200 status\" */);\n\t// Omit query string which could contain personal data unfit for logging\n\tconst urlNoQuery = request.url?.split(\"?\")[0];\n\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack = generateErrorWithStack();\n\n\treturn {\n\t\tmimeType: \"text/plain\",\n\t\tstatus,\n\t\tvalue: urlNoQuery === undefined ? value : `${value}: ${urlNoQuery}`,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t\theaders,\n\t};\n}\n\n/**\n * Returns the canonical set of code-artifact-tagged telemetry properties identifying a data store.\n * Use this anywhere a data store identity needs to appear in telemetry, so all such logs use\n * consistent property names.\n * @internal\n */\nexport function dataStoreLoadTelemetryProps(props: {\n\tid: string;\n\tpackagePath: readonly string[];\n}): ITelemetryPropertiesExt {\n\tconst { id, packagePath } = props;\n\tconst fullPackageName = packagePath.length > 0 ? packagePath.join(\"/\") : undefined;\n\treturn tagCodeArtifacts({\n\t\tfullPackageName,\n\t\tfluidDataStoreId: id,\n\t});\n}\n\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(runtime: IContainerRuntimeBase): ContainerRuntimeBaseAlpha;\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(runtime: IFluidDataStoreRuntime): IFluidDataStoreRuntimeAlpha;\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(\n\truntime: IFluidDataStoreRuntime | IContainerRuntimeBase,\n): unknown {\n\treturn runtime;\n}\n"]} |
+1
-1
@@ -6,3 +6,3 @@ /*! | ||
| export { generateHandleContextPath } from "./dataStoreHandleContextUtils.js"; | ||
| export { create404Response, createResponseError, exceptionToResponse, responseToException, asLegacyAlpha, } from "./dataStoreHelpers.js"; | ||
| export { create404Response, createResponseError, exceptionToResponse, responseToException, asLegacyAlpha, dataStoreLoadTelemetryProps, } from "./dataStoreHelpers.js"; | ||
| export { compareFluidHandles, encodeHandleForSerialization, FluidHandleBase, isFluidHandle, isFluidHandleInternalPayloadPending, isFluidHandlePayloadPending, isLocalFluidHandle, isSerializedHandle, lookupTemporaryBlobStorageId, toFluidHandleErased, toFluidHandleInternal, } from "./handles.js"; | ||
@@ -9,0 +9,0 @@ export type { ISerializedHandle } from "./handles.js"; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa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,wBAAwB,GACxB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,2BAA2B,EAC3B,eAAe,GACf,MAAM,wBAAwB,CAAC"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,2BAA2B,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,mBAAmB,EACnB,4BAA4B,EAC5B,eAAe,EACf,aAAa,EACb,mCAAmC,EACnC,2BAA2B,EAC3B,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACN,mCAAmC,EACnC,mBAAmB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,cAAc,EACd,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACb,WAAW,EACX,UAAU,EACV,0BAA0B,EAC1B,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACN,cAAc,EACd,WAAW,EACX,uBAAuB,GACvB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,wCAAwC,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EACN,oBAAoB,EACpB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,gCAAgC,EAChC,0BAA0B,EAC1B,0BAA0B,EAC1B,+BAA+B,EAC/B,gCAAgC,EAChC,0BAA0B,EAC1B,+BAA+B,EAC/B,yBAAyB,EACzB,uCAAuC,EACvC,qBAAqB,EACrB,wBAAwB,GACxB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,2BAA2B,EAC3B,eAAe,GACf,MAAM,wBAAwB,CAAC"} |
+3
-2
@@ -7,4 +7,4 @@ "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.isValidMinVersionForCollab = exports.getConfigsForMinVersionForCollab = exports.getConfigForMinVersionForCollab = exports.validateConfigMapOverrides = exports.defaultMinVersionForCollab = exports.configValueToMinVersionForCollab = exports.toDeltaManagerInternal = exports.toDeltaManagerErased = exports.isSnapshotFetchRequiredForLoadingGroupId = exports.encodeCompactIdToString = exports.seqFromTree = exports.RuntimeHeaders = exports.unpackChildNodesUsedRoutes = exports.utf8ByteLength = exports.TelemetryContext = exports.SummaryTreeBuilder = exports.processAttachMessageGCData = exports.mergeStats = exports.getBlobSize = exports.GCDataBuilder = exports.convertToSummaryTreeWithStats = exports.convertToSummaryTree = exports.convertSummaryTreeToITree = exports.convertSnapshotTreeToSummaryTree = exports.calculateStats = exports.addSummarizeResultToSummary = exports.addBlobToSummary = exports.RuntimeFactoryHelper = exports.RequestParser = exports.RemoteFluidObjectHandle = exports.listBlobsAtTreePath = exports.getNormalizedObjectStoragePathParts = exports.ObjectStoragePartition = exports.toFluidHandleInternal = exports.toFluidHandleErased = exports.lookupTemporaryBlobStorageId = exports.isSerializedHandle = exports.isLocalFluidHandle = exports.isFluidHandlePayloadPending = exports.isFluidHandleInternalPayloadPending = exports.isFluidHandle = exports.FluidHandleBase = exports.encodeHandleForSerialization = exports.compareFluidHandles = exports.asLegacyAlpha = exports.responseToException = exports.exceptionToResponse = exports.createResponseError = exports.create404Response = exports.generateHandleContextPath = void 0; | ||
| exports.selectVersionRoundedDown = exports.cleanedPackageVersion = exports.getConfigForMinVersionForCollabIterable = exports.lowestMinVersionForCollab = exports.validateMinimumVersionForCollab = void 0; | ||
| exports.getConfigsForMinVersionForCollab = exports.getConfigForMinVersionForCollab = exports.validateConfigMapOverrides = exports.defaultMinVersionForCollab = exports.configValueToMinVersionForCollab = exports.toDeltaManagerInternal = exports.toDeltaManagerErased = exports.isSnapshotFetchRequiredForLoadingGroupId = exports.encodeCompactIdToString = exports.seqFromTree = exports.RuntimeHeaders = exports.unpackChildNodesUsedRoutes = exports.utf8ByteLength = exports.TelemetryContext = exports.SummaryTreeBuilder = exports.processAttachMessageGCData = exports.mergeStats = exports.getBlobSize = exports.GCDataBuilder = exports.convertToSummaryTreeWithStats = exports.convertToSummaryTree = exports.convertSummaryTreeToITree = exports.convertSnapshotTreeToSummaryTree = exports.calculateStats = exports.addSummarizeResultToSummary = exports.addBlobToSummary = exports.RuntimeFactoryHelper = exports.RequestParser = exports.RemoteFluidObjectHandle = exports.listBlobsAtTreePath = exports.getNormalizedObjectStoragePathParts = exports.ObjectStoragePartition = exports.toFluidHandleInternal = exports.toFluidHandleErased = exports.lookupTemporaryBlobStorageId = exports.isSerializedHandle = exports.isLocalFluidHandle = exports.isFluidHandlePayloadPending = exports.isFluidHandleInternalPayloadPending = exports.isFluidHandle = exports.FluidHandleBase = exports.encodeHandleForSerialization = exports.compareFluidHandles = exports.dataStoreLoadTelemetryProps = exports.asLegacyAlpha = exports.responseToException = exports.exceptionToResponse = exports.createResponseError = exports.create404Response = exports.generateHandleContextPath = void 0; | ||
| exports.selectVersionRoundedDown = exports.cleanedPackageVersion = exports.getConfigForMinVersionForCollabIterable = exports.lowestMinVersionForCollab = exports.validateMinimumVersionForCollab = exports.isValidMinVersionForCollab = void 0; | ||
| var dataStoreHandleContextUtils_js_1 = require("./dataStoreHandleContextUtils.js"); | ||
@@ -18,2 +18,3 @@ Object.defineProperty(exports, "generateHandleContextPath", { enumerable: true, get: function () { return dataStoreHandleContextUtils_js_1.generateHandleContextPath; } }); | ||
| Object.defineProperty(exports, "asLegacyAlpha", { enumerable: true, get: function () { return dataStoreHelpers_js_1.asLegacyAlpha; } }); | ||
| Object.defineProperty(exports, "dataStoreLoadTelemetryProps", { enumerable: true, get: function () { return dataStoreHelpers_js_1.dataStoreLoadTelemetryProps; } }); | ||
| var handles_js_1 = require("./handles.js"); | ||
@@ -20,0 +21,0 @@ Object.defineProperty(exports, "compareFluidHandles", { enumerable: true, get: function () { return handles_js_1.compareFluidHandles; } }); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,mFAA6E;AAApE,2IAAA,yBAAyB,OAAA;AAClC,6DAM+B;AAL9B,wHAAA,iBAAiB,OAAA;AACjB,0HAAA,mBAAmB,OAAA;AACnB,0HAAA,mBAAmB,OAAA;AACnB,0HAAA,mBAAmB,OAAA;AACnB,oHAAA,aAAa,OAAA;AAEd,2CAYsB;AAXrB,iHAAA,mBAAmB,OAAA;AACnB,0HAAA,4BAA4B,OAAA;AAC5B,6GAAA,eAAe,OAAA;AACf,2GAAA,aAAa,OAAA;AACb,iIAAA,mCAAmC,OAAA;AACnC,yHAAA,2BAA2B,OAAA;AAC3B,gHAAA,kBAAkB,OAAA;AAClB,gHAAA,kBAAkB,OAAA;AAClB,0HAAA,4BAA4B,OAAA;AAC5B,iHAAA,mBAAmB,OAAA;AACnB,mHAAA,qBAAqB,OAAA;AAGtB,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAC/B,iEAGiC;AAFhC,4IAAA,mCAAmC,OAAA;AACnC,4HAAA,mBAAmB,OAAA;AAEpB,2EAAuE;AAA9D,qIAAA,uBAAuB,OAAA;AAChC,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAC7B,qDAe2B;AAd1B,mHAAA,gBAAgB,OAAA;AAChB,8HAAA,2BAA2B,OAAA;AAC3B,iHAAA,cAAc,OAAA;AACd,mIAAA,gCAAgC,OAAA;AAChC,4HAAA,yBAAyB,OAAA;AACzB,uHAAA,oBAAoB,OAAA;AACpB,gIAAA,6BAA6B,OAAA;AAC7B,gHAAA,aAAa,OAAA;AACb,8GAAA,WAAW,OAAA;AACX,6GAAA,UAAU,OAAA;AACV,6HAAA,0BAA0B,OAAA;AAC1B,qHAAA,kBAAkB,OAAA;AAClB,mHAAA,gBAAgB,OAAA;AAChB,iHAAA,cAAc,OAAA;AAEf,6DAAmE;AAA1D,iIAAA,0BAA0B,OAAA;AACnC,uCAIoB;AAHnB,0GAAA,cAAc,OAAA;AACd,uGAAA,WAAW,OAAA;AACX,mHAAA,uBAAuB,OAAA;AAGxB,uDAA8E;AAArE,4IAAA,wCAAwC,OAAA;AACjD,qDAG2B;AAF1B,uHAAA,oBAAoB,OAAA;AACpB,yHAAA,sBAAsB,OAAA;AAEvB,+DAYgC;AAX/B,wIAAA,gCAAgC,OAAA;AAChC,kIAAA,0BAA0B,OAAA;AAC1B,kIAAA,0BAA0B,OAAA;AAC1B,uIAAA,+BAA+B,OAAA;AAC/B,wIAAA,gCAAgC,OAAA;AAChC,kIAAA,0BAA0B,OAAA;AAC1B,uIAAA,+BAA+B,OAAA;AAC/B,iIAAA,yBAAyB,OAAA;AACzB,+IAAA,uCAAuC,OAAA;AACvC,6HAAA,qBAAqB,OAAA;AACrB,gIAAA,wBAAwB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { generateHandleContextPath } from \"./dataStoreHandleContextUtils.js\";\nexport {\n\tcreate404Response,\n\tcreateResponseError,\n\texceptionToResponse,\n\tresponseToException,\n\tasLegacyAlpha,\n} from \"./dataStoreHelpers.js\";\nexport {\n\tcompareFluidHandles,\n\tencodeHandleForSerialization,\n\tFluidHandleBase,\n\tisFluidHandle,\n\tisFluidHandleInternalPayloadPending,\n\tisFluidHandlePayloadPending,\n\tisLocalFluidHandle,\n\tisSerializedHandle,\n\tlookupTemporaryBlobStorageId,\n\ttoFluidHandleErased,\n\ttoFluidHandleInternal,\n} from \"./handles.js\";\nexport type { ISerializedHandle } from \"./handles.js\";\nexport { ObjectStoragePartition } from \"./objectstoragepartition.js\";\nexport {\n\tgetNormalizedObjectStoragePathParts,\n\tlistBlobsAtTreePath,\n} from \"./objectstorageutils.js\";\nexport { RemoteFluidObjectHandle } from \"./remoteFluidObjectHandle.js\";\nexport { RequestParser } from \"./requestParser.js\";\nexport { RuntimeFactoryHelper } from \"./runtimeFactoryHelper.js\";\nexport {\n\taddBlobToSummary,\n\taddSummarizeResultToSummary,\n\tcalculateStats,\n\tconvertSnapshotTreeToSummaryTree,\n\tconvertSummaryTreeToITree,\n\tconvertToSummaryTree,\n\tconvertToSummaryTreeWithStats,\n\tGCDataBuilder,\n\tgetBlobSize,\n\tmergeStats,\n\tprocessAttachMessageGCData,\n\tSummaryTreeBuilder,\n\tTelemetryContext,\n\tutf8ByteLength,\n} from \"./summaryUtils.js\";\nexport { unpackChildNodesUsedRoutes } from \"./unpackUsedRoutes.js\";\nexport {\n\tRuntimeHeaders,\n\tseqFromTree,\n\tencodeCompactIdToString,\n} from \"./utils.js\";\nexport type { ReadAndParseBlob } from \"./utils.js\";\nexport { isSnapshotFetchRequiredForLoadingGroupId } from \"./snapshotUtils.js\";\nexport {\n\ttoDeltaManagerErased,\n\ttoDeltaManagerInternal,\n} from \"./deltaManager.js\";\nexport {\n\tconfigValueToMinVersionForCollab,\n\tdefaultMinVersionForCollab,\n\tvalidateConfigMapOverrides,\n\tgetConfigForMinVersionForCollab,\n\tgetConfigsForMinVersionForCollab,\n\tisValidMinVersionForCollab,\n\tvalidateMinimumVersionForCollab,\n\tlowestMinVersionForCollab,\n\tgetConfigForMinVersionForCollabIterable,\n\tcleanedPackageVersion,\n\tselectVersionRoundedDown,\n} from \"./compatibilityBase.js\";\nexport type {\n\tConfigMap,\n\tConfigMapEntry,\n\tConfigValidationMap,\n\tMinimumMinorSemanticVersion,\n\tSemanticVersion,\n} from \"./compatibilityBase.js\";\n"]} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,mFAA6E;AAApE,2IAAA,yBAAyB,OAAA;AAClC,6DAO+B;AAN9B,wHAAA,iBAAiB,OAAA;AACjB,0HAAA,mBAAmB,OAAA;AACnB,0HAAA,mBAAmB,OAAA;AACnB,0HAAA,mBAAmB,OAAA;AACnB,oHAAA,aAAa,OAAA;AACb,kIAAA,2BAA2B,OAAA;AAE5B,2CAYsB;AAXrB,iHAAA,mBAAmB,OAAA;AACnB,0HAAA,4BAA4B,OAAA;AAC5B,6GAAA,eAAe,OAAA;AACf,2GAAA,aAAa,OAAA;AACb,iIAAA,mCAAmC,OAAA;AACnC,yHAAA,2BAA2B,OAAA;AAC3B,gHAAA,kBAAkB,OAAA;AAClB,gHAAA,kBAAkB,OAAA;AAClB,0HAAA,4BAA4B,OAAA;AAC5B,iHAAA,mBAAmB,OAAA;AACnB,mHAAA,qBAAqB,OAAA;AAGtB,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAC/B,iEAGiC;AAFhC,4IAAA,mCAAmC,OAAA;AACnC,4HAAA,mBAAmB,OAAA;AAEpB,2EAAuE;AAA9D,qIAAA,uBAAuB,OAAA;AAChC,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAC7B,qDAe2B;AAd1B,mHAAA,gBAAgB,OAAA;AAChB,8HAAA,2BAA2B,OAAA;AAC3B,iHAAA,cAAc,OAAA;AACd,mIAAA,gCAAgC,OAAA;AAChC,4HAAA,yBAAyB,OAAA;AACzB,uHAAA,oBAAoB,OAAA;AACpB,gIAAA,6BAA6B,OAAA;AAC7B,gHAAA,aAAa,OAAA;AACb,8GAAA,WAAW,OAAA;AACX,6GAAA,UAAU,OAAA;AACV,6HAAA,0BAA0B,OAAA;AAC1B,qHAAA,kBAAkB,OAAA;AAClB,mHAAA,gBAAgB,OAAA;AAChB,iHAAA,cAAc,OAAA;AAEf,6DAAmE;AAA1D,iIAAA,0BAA0B,OAAA;AACnC,uCAIoB;AAHnB,0GAAA,cAAc,OAAA;AACd,uGAAA,WAAW,OAAA;AACX,mHAAA,uBAAuB,OAAA;AAGxB,uDAA8E;AAArE,4IAAA,wCAAwC,OAAA;AACjD,qDAG2B;AAF1B,uHAAA,oBAAoB,OAAA;AACpB,yHAAA,sBAAsB,OAAA;AAEvB,+DAYgC;AAX/B,wIAAA,gCAAgC,OAAA;AAChC,kIAAA,0BAA0B,OAAA;AAC1B,kIAAA,0BAA0B,OAAA;AAC1B,uIAAA,+BAA+B,OAAA;AAC/B,wIAAA,gCAAgC,OAAA;AAChC,kIAAA,0BAA0B,OAAA;AAC1B,uIAAA,+BAA+B,OAAA;AAC/B,iIAAA,yBAAyB,OAAA;AACzB,+IAAA,uCAAuC,OAAA;AACvC,6HAAA,qBAAqB,OAAA;AACrB,gIAAA,wBAAwB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { generateHandleContextPath } from \"./dataStoreHandleContextUtils.js\";\nexport {\n\tcreate404Response,\n\tcreateResponseError,\n\texceptionToResponse,\n\tresponseToException,\n\tasLegacyAlpha,\n\tdataStoreLoadTelemetryProps,\n} from \"./dataStoreHelpers.js\";\nexport {\n\tcompareFluidHandles,\n\tencodeHandleForSerialization,\n\tFluidHandleBase,\n\tisFluidHandle,\n\tisFluidHandleInternalPayloadPending,\n\tisFluidHandlePayloadPending,\n\tisLocalFluidHandle,\n\tisSerializedHandle,\n\tlookupTemporaryBlobStorageId,\n\ttoFluidHandleErased,\n\ttoFluidHandleInternal,\n} from \"./handles.js\";\nexport type { ISerializedHandle } from \"./handles.js\";\nexport { ObjectStoragePartition } from \"./objectstoragepartition.js\";\nexport {\n\tgetNormalizedObjectStoragePathParts,\n\tlistBlobsAtTreePath,\n} from \"./objectstorageutils.js\";\nexport { RemoteFluidObjectHandle } from \"./remoteFluidObjectHandle.js\";\nexport { RequestParser } from \"./requestParser.js\";\nexport { RuntimeFactoryHelper } from \"./runtimeFactoryHelper.js\";\nexport {\n\taddBlobToSummary,\n\taddSummarizeResultToSummary,\n\tcalculateStats,\n\tconvertSnapshotTreeToSummaryTree,\n\tconvertSummaryTreeToITree,\n\tconvertToSummaryTree,\n\tconvertToSummaryTreeWithStats,\n\tGCDataBuilder,\n\tgetBlobSize,\n\tmergeStats,\n\tprocessAttachMessageGCData,\n\tSummaryTreeBuilder,\n\tTelemetryContext,\n\tutf8ByteLength,\n} from \"./summaryUtils.js\";\nexport { unpackChildNodesUsedRoutes } from \"./unpackUsedRoutes.js\";\nexport {\n\tRuntimeHeaders,\n\tseqFromTree,\n\tencodeCompactIdToString,\n} from \"./utils.js\";\nexport type { ReadAndParseBlob } from \"./utils.js\";\nexport { isSnapshotFetchRequiredForLoadingGroupId } from \"./snapshotUtils.js\";\nexport {\n\ttoDeltaManagerErased,\n\ttoDeltaManagerInternal,\n} from \"./deltaManager.js\";\nexport {\n\tconfigValueToMinVersionForCollab,\n\tdefaultMinVersionForCollab,\n\tvalidateConfigMapOverrides,\n\tgetConfigForMinVersionForCollab,\n\tgetConfigsForMinVersionForCollab,\n\tisValidMinVersionForCollab,\n\tvalidateMinimumVersionForCollab,\n\tlowestMinVersionForCollab,\n\tgetConfigForMinVersionForCollabIterable,\n\tcleanedPackageVersion,\n\tselectVersionRoundedDown,\n} from \"./compatibilityBase.js\";\nexport type {\n\tConfigMap,\n\tConfigMapEntry,\n\tConfigValidationMap,\n\tMinimumMinorSemanticVersion,\n\tSemanticVersion,\n} from \"./compatibilityBase.js\";\n"]} |
@@ -8,3 +8,3 @@ /*! | ||
| export declare const pkgName = "@fluidframework/runtime-utils"; | ||
| export declare const pkgVersion = "2.101.1"; | ||
| export declare const pkgVersion = "2.102.0"; | ||
| //# sourceMappingURL=packageVersion.d.ts.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
| exports.pkgName = "@fluidframework/runtime-utils"; | ||
| exports.pkgVersion = "2.101.1"; | ||
| exports.pkgVersion = "2.102.0"; | ||
| //# sourceMappingURL=packageVersion.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,+BAA+B,CAAC;AAC1C,QAAA,UAAU,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/runtime-utils\";\nexport const pkgVersion = \"2.101.1\";\n"]} | ||
| {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,+BAA+B,CAAC;AAC1C,QAAA,UAAU,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/runtime-utils\";\nexport const pkgVersion = \"2.102.0\";\n"]} |
@@ -8,2 +8,3 @@ /*! | ||
| import type { ContainerRuntimeBaseAlpha, IContainerRuntimeBase } from "@fluidframework/runtime-definitions/internal"; | ||
| import { type ITelemetryPropertiesExt } from "@fluidframework/telemetry-utils/internal"; | ||
| /** | ||
@@ -41,2 +42,12 @@ * Converts an error object into an {@link @fluidframework/core-interfaces#IResponse}. | ||
| /** | ||
| * Returns the canonical set of code-artifact-tagged telemetry properties identifying a data store. | ||
| * Use this anywhere a data store identity needs to appear in telemetry, so all such logs use | ||
| * consistent property names. | ||
| * @internal | ||
| */ | ||
| export declare function dataStoreLoadTelemetryProps(props: { | ||
| id: string; | ||
| packagePath: readonly string[]; | ||
| }): ITelemetryPropertiesExt; | ||
| /** | ||
| * Converts types to their alpha counterparts to expose alpha functionality. | ||
@@ -43,0 +54,0 @@ * @legacy @alpha |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"dataStoreHelpers.d.ts","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,KAAK,EACX,sBAAsB,EACtB,2BAA2B,EAC3B,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EACX,yBAAyB,EACzB,qBAAqB,EACrB,MAAM,8CAA8C,CAAC;AAwBtD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CA4B7D;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,GAAG,KAAK,CAkBjF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,YAAa,QAAQ,KAAG,SACP,CAAC;AAEhD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,QAAQ,EACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,C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AqB,GAAG,yBAAyB,CAAC;AACzF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,2BAA2B,CAAC"} |
@@ -6,3 +6,3 @@ /*! | ||
| import { assert } from "@fluidframework/core-utils/internal"; | ||
| import { generateErrorWithStack } from "@fluidframework/telemetry-utils/internal"; | ||
| import { generateErrorWithStack, tagCodeArtifacts, } from "@fluidframework/telemetry-utils/internal"; | ||
| /** | ||
@@ -107,2 +107,16 @@ * Type guard for determining if an error is an {@link IResponseException}. | ||
| /** | ||
| * Returns the canonical set of code-artifact-tagged telemetry properties identifying a data store. | ||
| * Use this anywhere a data store identity needs to appear in telemetry, so all such logs use | ||
| * consistent property names. | ||
| * @internal | ||
| */ | ||
| export function dataStoreLoadTelemetryProps(props) { | ||
| const { id, packagePath } = props; | ||
| const fullPackageName = packagePath.length > 0 ? packagePath.join("/") : undefined; | ||
| return tagCodeArtifacts({ | ||
| fullPackageName, | ||
| fluidDataStoreId: id, | ||
| }); | ||
| } | ||
| /** | ||
| * Converts types to their alpha counterparts to expose alpha functionality. | ||
@@ -109,0 +123,0 @@ * @legacy @alpha |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"dataStoreHelpers.js","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAS7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAUlF;;;GAGG;AACH,SAAS,mBAAmB,CAAC,GAAY;IACxC,OAAO,CACN,GAAG,KAAK,IAAI;QACZ,OAAO,GAAG,KAAK,QAAQ;QACvB,6BAA6B,IAAI,GAAG;QACnC,GAAgD,CAAC,2BAA2B,KAAK,IAAI,CACtF,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAc;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC;IACnB,IAAI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OAAiB,EAAa,EAAE,CACjE,mBAAmB,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAClC,MAAc,EACd,KAAa,EACb,OAAiB,EACjB,OAAiC;IAEjC,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACrF,wEAAwE;IACxE,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9C,uLAAuL;IACvL,MAAM,YAAY,GAAG,sBAAsB,EAAE,CAAC;IAE9C,OAAO;QACN,QAAQ,EAAE,YAAY;QACtB,MAAM;QACN,KAAK,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,UAAU,EAAE;QACnE,IAAI,KAAK;YACR,OAAO,YAAY,CAAC,KAAK,CAAC;QAC3B,CAAC;QACD,OAAO;KACP,CAAC;AACH,CAAC;AAYD;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC5B,OAAuD;IAEvD,OAAO,OAAO,CAAC;AAChB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type {\n\tIFluidDataStoreRuntime,\n\tIFluidDataStoreRuntimeAlpha,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport type {\n\tContainerRuntimeBaseAlpha,\n\tIContainerRuntimeBase,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { generateErrorWithStack } from \"@fluidframework/telemetry-utils/internal\";\n\ninterface IResponseException extends Error {\n\terrorFromRequestFluidObject: true;\n\tmessage: string;\n\tcode: number;\n\tstack?: string;\n\tunderlyingResponseHeaders?: Record<string, unknown>;\n}\n\n/**\n * Type guard for determining if an error is an {@link IResponseException}.\n * @internal\n */\nfunction isResponseException(err: unknown): err is IResponseException {\n\treturn (\n\t\terr !== null &&\n\t\ttypeof err === \"object\" &&\n\t\t\"errorFromRequestFluidObject\" in err &&\n\t\t(err as { errorFromRequestFluidObject: unknown }).errorFromRequestFluidObject === true\n\t);\n}\n\n/**\n * Converts an error object into an {@link @fluidframework/core-interfaces#IResponse}.\n * @internal\n */\nexport function exceptionToResponse(error: unknown): IResponse {\n\tconst status = 500;\n\tif (isResponseException(error)) {\n\t\treturn {\n\t\t\tmimeType: \"text/plain\",\n\t\t\tstatus: error.code,\n\t\t\tvalue: error.message,\n\t\t\tget stack() {\n\t\t\t\treturn error.stack;\n\t\t\t},\n\t\t\theaders: error.underlyingResponseHeaders,\n\t\t};\n\t}\n\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack =\n\t\ttypeof error === \"object\" && error !== null && \"stack\" in error\n\t\t\t? (error as { stack: string })\n\t\t\t: generateErrorWithStack();\n\n\treturn {\n\t\tmimeType: \"text/plain\",\n\t\tstatus,\n\t\tvalue: `${error}`,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t};\n}\n\n/**\n * Converts an {@link @fluidframework/core-interfaces#IResponse} back into an Error object that can be thrown.\n * @param response - The {@link @fluidframework/core-interfaces#IResponse} to convert.\n * @param request - The original {@link @fluidframework/core-interfaces#IRequest}.\n * @returns An Error object with additional properties from the response\n * @internal\n */\nexport function responseToException(response: IResponse, request: IRequest): Error {\n\t// As of 2025-08-20 the code seems to assume `response.value` is always a string.\n\t// This type assertion just encodes that assumption as we move to stricter linting rules, but it might need to be revisited.\n\tconst message = response.value as string;\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack = \"stack\" in response ? response : generateErrorWithStack();\n\tconst responseErr: Error & IResponseException = {\n\t\terrorFromRequestFluidObject: true,\n\t\tmessage,\n\t\tname: \"Error\",\n\t\tcode: response.status,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t\tunderlyingResponseHeaders: response.headers,\n\t};\n\n\treturn responseErr;\n}\n\n/**\n * Creates a 404 \"not found\" response for the given request\n * @param request - The request that resulted in the 404 response\n * @returns An {@link @fluidframework/core-interfaces#IResponse} with 404 status code.\n * @legacy\n * @beta\n */\nexport const create404Response = (request: IRequest): IResponse =>\n\tcreateResponseError(404, \"not found\", request);\n\n/**\n * Creates an error response with the specified status code and message\n * @param status - HTTP status code for the error (must not be 200)\n * @param value - Error message or description\n * @param request - The request that resulted in this error\n * @param headers - Optional headers to include in the response\n * @returns An {@link @fluidframework/core-interfaces#IResponse} representing the error\n * @internal\n */\nexport function createResponseError(\n\tstatus: number,\n\tvalue: string,\n\trequest: IRequest,\n\theaders?: Record<string, unknown>,\n): IResponse {\n\tassert(status !== 200, 0x19b /* \"Cannot not create response error on 200 status\" */);\n\t// Omit query string which could contain personal data unfit for logging\n\tconst urlNoQuery = request.url?.split(\"?\")[0];\n\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack = generateErrorWithStack();\n\n\treturn {\n\t\tmimeType: \"text/plain\",\n\t\tstatus,\n\t\tvalue: urlNoQuery === undefined ? value : `${value}: ${urlNoQuery}`,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t\theaders,\n\t};\n}\n\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(runtime: IContainerRuntimeBase): ContainerRuntimeBaseAlpha;\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(runtime: IFluidDataStoreRuntime): IFluidDataStoreRuntimeAlpha;\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(\n\truntime: IFluidDataStoreRuntime | IContainerRuntimeBase,\n): unknown {\n\treturn runtime;\n}\n"]} | ||
| {"version":3,"file":"dataStoreHelpers.js","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAS7D,OAAO,EACN,sBAAsB,EACtB,gBAAgB,GAEhB,MAAM,0CAA0C,CAAC;AAUlD;;;GAGG;AACH,SAAS,mBAAmB,CAAC,GAAY;IACxC,OAAO,CACN,GAAG,KAAK,IAAI;QACZ,OAAO,GAAG,KAAK,QAAQ;QACvB,6BAA6B,IAAI,GAAG;QACnC,GAAgD,CAAC,2BAA2B,KAAK,IAAI,CACtF,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAc;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC;IACnB,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO;YACN,QAAQ,EAAE,YAAY;YACtB,MAAM,EAAE,KAAK,CAAC,IAAI;YAClB,KAAK,EAAE,KAAK,CAAC,OAAO;YACpB,IAAI,KAAK;gBACR,OAAO,KAAK,CAAC,KAAK,CAAC;YACpB,CAAC;YACD,OAAO,EAAE,KAAK,CAAC,yBAAyB;SACxC,CAAC;IACH,CAAC;IAED,uLAAuL;IACvL,MAAM,YAAY,GACjB,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK;QAC9D,CAAC,CAAE,KAA2B;QAC9B,CAAC,CAAC,sBAAsB,EAAE,CAAC;IAE7B,OAAO;QACN,QAAQ,EAAE,YAAY;QACtB,MAAM;QACN,KAAK,EAAE,GAAG,KAAK,EAAE;QACjB,IAAI,KAAK;YACR,OAAO,YAAY,CAAC,KAAK,CAAC;QAC3B,CAAC;KACD,CAAC;AACH,CAAC;AAED;;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AC;QAC3B,CAAC;QACD,OAAO;KACP,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,KAG3C;IACA,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,eAAe,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnF,OAAO,gBAAgB,CAAC;QACvB,eAAe;QACf,gBAAgB,EAAE,EAAE;KACpB,CAAC,CAAC;AACJ,CAAC;AAYD;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC5B,OAAuD;IAEvD,OAAO,OAAO,CAAC;AAChB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type {\n\tIFluidDataStoreRuntime,\n\tIFluidDataStoreRuntimeAlpha,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport type {\n\tContainerRuntimeBaseAlpha,\n\tIContainerRuntimeBase,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tgenerateErrorWithStack,\n\ttagCodeArtifacts,\n\ttype ITelemetryPropertiesExt,\n} from \"@fluidframework/telemetry-utils/internal\";\n\ninterface IResponseException extends Error {\n\terrorFromRequestFluidObject: true;\n\tmessage: string;\n\tcode: number;\n\tstack?: string;\n\tunderlyingResponseHeaders?: Record<string, unknown>;\n}\n\n/**\n * Type guard for determining if an error is an {@link IResponseException}.\n * @internal\n */\nfunction isResponseException(err: unknown): err is IResponseException {\n\treturn (\n\t\terr !== null &&\n\t\ttypeof err === \"object\" &&\n\t\t\"errorFromRequestFluidObject\" in err &&\n\t\t(err as { errorFromRequestFluidObject: unknown }).errorFromRequestFluidObject === true\n\t);\n}\n\n/**\n * Converts an error object into an {@link @fluidframework/core-interfaces#IResponse}.\n * @internal\n */\nexport function exceptionToResponse(error: unknown): IResponse {\n\tconst status = 500;\n\tif (isResponseException(error)) {\n\t\treturn {\n\t\t\tmimeType: \"text/plain\",\n\t\t\tstatus: error.code,\n\t\t\tvalue: error.message,\n\t\t\tget stack() {\n\t\t\t\treturn error.stack;\n\t\t\t},\n\t\t\theaders: error.underlyingResponseHeaders,\n\t\t};\n\t}\n\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack =\n\t\ttypeof error === \"object\" && error !== null && \"stack\" in error\n\t\t\t? (error as { stack: string })\n\t\t\t: generateErrorWithStack();\n\n\treturn {\n\t\tmimeType: \"text/plain\",\n\t\tstatus,\n\t\tvalue: `${error}`,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t};\n}\n\n/**\n * Converts an {@link @fluidframework/core-interfaces#IResponse} back into an Error object that can be thrown.\n * @param response - The {@link @fluidframework/core-interfaces#IResponse} to convert.\n * @param request - The original {@link @fluidframework/core-interfaces#IRequest}.\n * @returns An Error object with additional properties from the response\n * @internal\n */\nexport function responseToException(response: IResponse, request: IRequest): Error {\n\t// As of 2025-08-20 the code seems to assume `response.value` is always a string.\n\t// This type assertion just encodes that assumption as we move to stricter linting rules, but it might need to be revisited.\n\tconst message = response.value as string;\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack = \"stack\" in response ? response : generateErrorWithStack();\n\tconst responseErr: Error & IResponseException = {\n\t\terrorFromRequestFluidObject: true,\n\t\tmessage,\n\t\tname: \"Error\",\n\t\tcode: response.status,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t\tunderlyingResponseHeaders: response.headers,\n\t};\n\n\treturn responseErr;\n}\n\n/**\n * Creates a 404 \"not found\" response for the given request\n * @param request - The request that resulted in the 404 response\n * @returns An {@link @fluidframework/core-interfaces#IResponse} with 404 status code.\n * @legacy\n * @beta\n */\nexport const create404Response = (request: IRequest): IResponse =>\n\tcreateResponseError(404, \"not found\", request);\n\n/**\n * Creates an error response with the specified status code and message\n * @param status - HTTP status code for the error (must not be 200)\n * @param value - Error message or description\n * @param request - The request that resulted in this error\n * @param headers - Optional headers to include in the response\n * @returns An {@link @fluidframework/core-interfaces#IResponse} representing the error\n * @internal\n */\nexport function createResponseError(\n\tstatus: number,\n\tvalue: string,\n\trequest: IRequest,\n\theaders?: Record<string, unknown>,\n): IResponse {\n\tassert(status !== 200, 0x19b /* \"Cannot not create response error on 200 status\" */);\n\t// Omit query string which could contain personal data unfit for logging\n\tconst urlNoQuery = request.url?.split(\"?\")[0];\n\n\t// Both error generation, and accessing the stack value are expensive operations, so we only create an error if necessary, and then defer accessing the stack value until it is needed.\n\tconst errWithStack = generateErrorWithStack();\n\n\treturn {\n\t\tmimeType: \"text/plain\",\n\t\tstatus,\n\t\tvalue: urlNoQuery === undefined ? value : `${value}: ${urlNoQuery}`,\n\t\tget stack() {\n\t\t\treturn errWithStack.stack;\n\t\t},\n\t\theaders,\n\t};\n}\n\n/**\n * Returns the canonical set of code-artifact-tagged telemetry properties identifying a data store.\n * Use this anywhere a data store identity needs to appear in telemetry, so all such logs use\n * consistent property names.\n * @internal\n */\nexport function dataStoreLoadTelemetryProps(props: {\n\tid: string;\n\tpackagePath: readonly string[];\n}): ITelemetryPropertiesExt {\n\tconst { id, packagePath } = props;\n\tconst fullPackageName = packagePath.length > 0 ? packagePath.join(\"/\") : undefined;\n\treturn tagCodeArtifacts({\n\t\tfullPackageName,\n\t\tfluidDataStoreId: id,\n\t});\n}\n\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(runtime: IContainerRuntimeBase): ContainerRuntimeBaseAlpha;\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(runtime: IFluidDataStoreRuntime): IFluidDataStoreRuntimeAlpha;\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n */\nexport function asLegacyAlpha(\n\truntime: IFluidDataStoreRuntime | IContainerRuntimeBase,\n): unknown {\n\treturn runtime;\n}\n"]} |
+1
-1
@@ -6,3 +6,3 @@ /*! | ||
| export { generateHandleContextPath } from "./dataStoreHandleContextUtils.js"; | ||
| export { create404Response, createResponseError, exceptionToResponse, responseToException, asLegacyAlpha, } from "./dataStoreHelpers.js"; | ||
| export { create404Response, createResponseError, exceptionToResponse, responseToException, asLegacyAlpha, dataStoreLoadTelemetryProps, } from "./dataStoreHelpers.js"; | ||
| export { compareFluidHandles, encodeHandleForSerialization, FluidHandleBase, isFluidHandle, isFluidHandleInternalPayloadPending, isFluidHandlePayloadPending, isLocalFluidHandle, isSerializedHandle, lookupTemporaryBlobStorageId, toFluidHandleErased, toFluidHandleInternal, } from "./handles.js"; | ||
@@ -9,0 +9,0 @@ export type { ISerializedHandle } from "./handles.js"; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,mBAAmB,EACnB,4BAA4B,EAC5B,eAAe,EACf,aAAa,EACb,mCAAmC,EACnC,2BAA2B,EAC3B,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACN,mCAAmC,EACnC,m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qBAAqB,EACrB,wBAAwB,GACxB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,2BAA2B,EAC3B,eAAe,GACf,MAAM,wBAAwB,CAAC"} |
+1
-1
@@ -6,3 +6,3 @@ /*! | ||
| export { generateHandleContextPath } from "./dataStoreHandleContextUtils.js"; | ||
| export { create404Response, createResponseError, exceptionToResponse, responseToException, asLegacyAlpha, } from "./dataStoreHelpers.js"; | ||
| export { create404Response, createResponseError, exceptionToResponse, responseToException, asLegacyAlpha, dataStoreLoadTelemetryProps, } from "./dataStoreHelpers.js"; | ||
| export { compareFluidHandles, encodeHandleForSerialization, FluidHandleBase, isFluidHandle, isFluidHandleInternalPayloadPending, isFluidHandlePayloadPending, isLocalFluidHandle, isSerializedHandle, lookupTemporaryBlobStorageId, toFluidHandleErased, toFluidHandleInternal, } from "./handles.js"; | ||
@@ -9,0 +9,0 @@ export { ObjectStoragePartition } from "./objectstoragepartition.js"; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,mBAAmB,EACnB,4BAA4B,EAC5B,eAAe,EACf,aAAa,EACb,mCAAmC,EACnC,2BAA2B,EAC3B,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACN,mCAAmC,EACnC,mBAAmB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,cAAc,EACd,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACb,WAAW,EACX,UAAU,EACV,0BAA0B,EAC1B,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACN,cAAc,EACd,WAAW,EACX,uBAAuB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,wCAAwC,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EACN,oBAAoB,EACpB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,gCAAgC,EAChC,0BAA0B,EAC1B,0BAA0B,EAC1B,+BAA+B,EAC/B,gCAAgC,EAChC,0BAA0B,EAC1B,+BAA+B,EAC/B,yBAAyB,EACzB,uCAAuC,EACvC,qBAAqB,EACrB,wBAAwB,GACxB,MAAM,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { generateHandleContextPath } from \"./dataStoreHandleContextUtils.js\";\nexport {\n\tcreate404Response,\n\tcreateResponseError,\n\texceptionToResponse,\n\tresponseToException,\n\tasLegacyAlpha,\n} from \"./dataStoreHelpers.js\";\nexport {\n\tcompareFluidHandles,\n\tencodeHandleForSerialization,\n\tFluidHandleBase,\n\tisFluidHandle,\n\tisFluidHandleInternalPayloadPending,\n\tisFluidHandlePayloadPending,\n\tisLocalFluidHandle,\n\tisSerializedHandle,\n\tlookupTemporaryBlobStorageId,\n\ttoFluidHandleErased,\n\ttoFluidHandleInternal,\n} from \"./handles.js\";\nexport type { ISerializedHandle } from \"./handles.js\";\nexport { ObjectStoragePartition } from \"./objectstoragepartition.js\";\nexport {\n\tgetNormalizedObjectStoragePathParts,\n\tlistBlobsAtTreePath,\n} from \"./objectstorageutils.js\";\nexport { RemoteFluidObjectHandle } from \"./remoteFluidObjectHandle.js\";\nexport { RequestParser } from \"./requestParser.js\";\nexport { RuntimeFactoryHelper } from \"./runtimeFactoryHelper.js\";\nexport {\n\taddBlobToSummary,\n\taddSummarizeResultToSummary,\n\tcalculateStats,\n\tconvertSnapshotTreeToSummaryTree,\n\tconvertSummaryTreeToITree,\n\tconvertToSummaryTree,\n\tconvertToSummaryTreeWithStats,\n\tGCDataBuilder,\n\tgetBlobSize,\n\tmergeStats,\n\tprocessAttachMessageGCData,\n\tSummaryTreeBuilder,\n\tTelemetryContext,\n\tutf8ByteLength,\n} from \"./summaryUtils.js\";\nexport { unpackChildNodesUsedRoutes } from \"./unpackUsedRoutes.js\";\nexport {\n\tRuntimeHeaders,\n\tseqFromTree,\n\tencodeCompactIdToString,\n} from \"./utils.js\";\nexport type { ReadAndParseBlob } from \"./utils.js\";\nexport { isSnapshotFetchRequiredForLoadingGroupId } from \"./snapshotUtils.js\";\nexport {\n\ttoDeltaManagerErased,\n\ttoDeltaManagerInternal,\n} from \"./deltaManager.js\";\nexport {\n\tconfigValueToMinVersionForCollab,\n\tdefaultMinVersionForCollab,\n\tvalidateConfigMapOverrides,\n\tgetConfigForMinVersionForCollab,\n\tgetConfigsForMinVersionForCollab,\n\tisValidMinVersionForCollab,\n\tvalidateMinimumVersionForCollab,\n\tlowestMinVersionForCollab,\n\tgetConfigForMinVersionForCollabIterable,\n\tcleanedPackageVersion,\n\tselectVersionRoundedDown,\n} from \"./compatibilityBase.js\";\nexport type {\n\tConfigMap,\n\tConfigMapEntry,\n\tConfigValidationMap,\n\tMinimumMinorSemanticVersion,\n\tSemanticVersion,\n} from \"./compatibilityBase.js\";\n"]} | ||
| {"version":3,"file":"index.js","s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+BAA+B,EAC/B,gCAAgC,EAChC,0BAA0B,EAC1B,+BAA+B,EAC/B,yBAAyB,EACzB,uCAAuC,EACvC,qBAAqB,EACrB,wBAAwB,GACxB,MAAM,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { generateHandleContextPath } from \"./dataStoreHandleContextUtils.js\";\nexport {\n\tcreate404Response,\n\tcreateResponseError,\n\texceptionToResponse,\n\tresponseToException,\n\tasLegacyAlpha,\n\tdataStoreLoadTelemetryProps,\n} from \"./dataStoreHelpers.js\";\nexport {\n\tcompareFluidHandles,\n\tencodeHandleForSerialization,\n\tFluidHandleBase,\n\tisFluidHandle,\n\tisFluidHandleInternalPayloadPending,\n\tisFluidHandlePayloadPending,\n\tisLocalFluidHandle,\n\tisSerializedHandle,\n\tlookupTemporaryBlobStorageId,\n\ttoFluidHandleErased,\n\ttoFluidHandleInternal,\n} from \"./handles.js\";\nexport type { ISerializedHandle } from \"./handles.js\";\nexport { ObjectStoragePartition } from \"./objectstoragepartition.js\";\nexport {\n\tgetNormalizedObjectStoragePathParts,\n\tlistBlobsAtTreePath,\n} from \"./objectstorageutils.js\";\nexport { RemoteFluidObjectHandle } from \"./remoteFluidObjectHandle.js\";\nexport { RequestParser } from \"./requestParser.js\";\nexport { RuntimeFactoryHelper } from \"./runtimeFactoryHelper.js\";\nexport {\n\taddBlobToSummary,\n\taddSummarizeResultToSummary,\n\tcalculateStats,\n\tconvertSnapshotTreeToSummaryTree,\n\tconvertSummaryTreeToITree,\n\tconvertToSummaryTree,\n\tconvertToSummaryTreeWithStats,\n\tGCDataBuilder,\n\tgetBlobSize,\n\tmergeStats,\n\tprocessAttachMessageGCData,\n\tSummaryTreeBuilder,\n\tTelemetryContext,\n\tutf8ByteLength,\n} from \"./summaryUtils.js\";\nexport { unpackChildNodesUsedRoutes } from \"./unpackUsedRoutes.js\";\nexport {\n\tRuntimeHeaders,\n\tseqFromTree,\n\tencodeCompactIdToString,\n} from \"./utils.js\";\nexport type { ReadAndParseBlob } from \"./utils.js\";\nexport { isSnapshotFetchRequiredForLoadingGroupId } from \"./snapshotUtils.js\";\nexport {\n\ttoDeltaManagerErased,\n\ttoDeltaManagerInternal,\n} from \"./deltaManager.js\";\nexport {\n\tconfigValueToMinVersionForCollab,\n\tdefaultMinVersionForCollab,\n\tvalidateConfigMapOverrides,\n\tgetConfigForMinVersionForCollab,\n\tgetConfigsForMinVersionForCollab,\n\tisValidMinVersionForCollab,\n\tvalidateMinimumVersionForCollab,\n\tlowestMinVersionForCollab,\n\tgetConfigForMinVersionForCollabIterable,\n\tcleanedPackageVersion,\n\tselectVersionRoundedDown,\n} from \"./compatibilityBase.js\";\nexport type {\n\tConfigMap,\n\tConfigMapEntry,\n\tConfigValidationMap,\n\tMinimumMinorSemanticVersion,\n\tSemanticVersion,\n} from \"./compatibilityBase.js\";\n"]} |
@@ -8,3 +8,3 @@ /*! | ||
| export declare const pkgName = "@fluidframework/runtime-utils"; | ||
| export declare const pkgVersion = "2.101.1"; | ||
| export declare const pkgVersion = "2.102.0"; | ||
| //# sourceMappingURL=packageVersion.d.ts.map |
@@ -8,3 +8,3 @@ /*! | ||
| export const pkgName = "@fluidframework/runtime-utils"; | ||
| export const pkgVersion = "2.101.1"; | ||
| export const pkgVersion = "2.102.0"; | ||
| //# sourceMappingURL=packageVersion.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,+BAA+B,CAAC;AACvD,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/runtime-utils\";\nexport const pkgVersion = \"2.101.1\";\n"]} | ||
| {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,+BAA+B,CAAC;AACvD,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/runtime-utils\";\nexport const pkgVersion = \"2.102.0\";\n"]} |
+13
-13
| { | ||
| "name": "@fluidframework/runtime-utils", | ||
| "version": "2.101.1", | ||
| "version": "2.102.0", | ||
| "description": "Collection of utility functions for Fluid Runtime", | ||
@@ -82,12 +82,12 @@ "homepage": "https://fluidframework.com", | ||
| "dependencies": { | ||
| "@fluid-internal/client-utils": "~2.101.1", | ||
| "@fluidframework/container-definitions": "~2.101.1", | ||
| "@fluidframework/container-runtime-definitions": "~2.101.1", | ||
| "@fluidframework/core-interfaces": "~2.101.1", | ||
| "@fluidframework/core-utils": "~2.101.1", | ||
| "@fluidframework/datastore-definitions": "~2.101.1", | ||
| "@fluidframework/driver-definitions": "~2.101.1", | ||
| "@fluidframework/driver-utils": "~2.101.1", | ||
| "@fluidframework/runtime-definitions": "~2.101.1", | ||
| "@fluidframework/telemetry-utils": "~2.101.1", | ||
| "@fluid-internal/client-utils": "~2.102.0", | ||
| "@fluidframework/container-definitions": "~2.102.0", | ||
| "@fluidframework/container-runtime-definitions": "~2.102.0", | ||
| "@fluidframework/core-interfaces": "~2.102.0", | ||
| "@fluidframework/core-utils": "~2.102.0", | ||
| "@fluidframework/datastore-definitions": "~2.102.0", | ||
| "@fluidframework/driver-definitions": "~2.102.0", | ||
| "@fluidframework/driver-utils": "~2.102.0", | ||
| "@fluidframework/runtime-definitions": "~2.102.0", | ||
| "@fluidframework/telemetry-utils": "~2.102.0", | ||
| "semver-ts": "^1.0.3" | ||
@@ -98,3 +98,3 @@ }, | ||
| "@biomejs/biome": "~2.4.5", | ||
| "@fluid-internal/mocha-test-setup": "~2.101.1", | ||
| "@fluid-internal/mocha-test-setup": "~2.102.0", | ||
| "@fluid-tools/build-cli": "^0.65.0", | ||
@@ -104,3 +104,3 @@ "@fluidframework/build-common": "^2.0.3", | ||
| "@fluidframework/eslint-config-fluid": "^9.0.0", | ||
| "@fluidframework/runtime-utils-previous": "npm:@fluidframework/runtime-utils@2.92.0", | ||
| "@fluidframework/runtime-utils-previous": "npm:@fluidframework/runtime-utils@2.101.0", | ||
| "@microsoft/api-extractor": "7.58.1", | ||
@@ -107,0 +107,0 @@ "@types/mocha": "^10.0.10", |
@@ -16,3 +16,7 @@ /*! | ||
| } from "@fluidframework/runtime-definitions/internal"; | ||
| import { generateErrorWithStack } from "@fluidframework/telemetry-utils/internal"; | ||
| import { | ||
| generateErrorWithStack, | ||
| tagCodeArtifacts, | ||
| type ITelemetryPropertiesExt, | ||
| } from "@fluidframework/telemetry-utils/internal"; | ||
@@ -145,2 +149,20 @@ interface IResponseException extends Error { | ||
| /** | ||
| * Returns the canonical set of code-artifact-tagged telemetry properties identifying a data store. | ||
| * Use this anywhere a data store identity needs to appear in telemetry, so all such logs use | ||
| * consistent property names. | ||
| * @internal | ||
| */ | ||
| export function dataStoreLoadTelemetryProps(props: { | ||
| id: string; | ||
| packagePath: readonly string[]; | ||
| }): ITelemetryPropertiesExt { | ||
| const { id, packagePath } = props; | ||
| const fullPackageName = packagePath.length > 0 ? packagePath.join("/") : undefined; | ||
| return tagCodeArtifacts({ | ||
| fullPackageName, | ||
| fluidDataStoreId: id, | ||
| }); | ||
| } | ||
| /** | ||
| * Converts types to their alpha counterparts to expose alpha functionality. | ||
@@ -147,0 +169,0 @@ * @legacy @alpha |
+1
-0
@@ -13,2 +13,3 @@ /*! | ||
| asLegacyAlpha, | ||
| dataStoreLoadTelemetryProps, | ||
| } from "./dataStoreHelpers.js"; | ||
@@ -15,0 +16,0 @@ export { |
@@ -9,2 +9,2 @@ /*! | ||
| export const pkgName = "@fluidframework/runtime-utils"; | ||
| export const pkgVersion = "2.101.1"; | ||
| export const pkgVersion = "2.102.0"; |
650412
0.86%7301
1.02%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated