@fluidframework/runtime-utils 2.70.0-361788 → 2.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/runtime-utils
2
2
 
3
+ ## 2.70.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.63.0
4
8
 
5
9
  Dependency updates only.
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/dist/legacyAlpha.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/legacyAlpha.d.ts"
5
+ }
@@ -1,4 +1,8 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json"
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/legacyAlpha.d.ts",
5
+ "apiReport": {
6
+ "reportVariants": ["public", "beta", "alpha"]
7
+ }
4
8
  }
@@ -0,0 +1,105 @@
1
+ ## Alpha API Report File for "@fluidframework/runtime-utils"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ // @alpha @legacy
8
+ export function asLegacyAlpha(runtime: IContainerRuntimeBase): ContainerRuntimeBaseAlpha;
9
+
10
+ // @alpha @legacy
11
+ export function asLegacyAlpha(runtime: IFluidDataStoreRuntime): IFluidDataStoreRuntimeAlpha;
12
+
13
+ // @public
14
+ export function compareFluidHandles(a: IFluidHandle, b: IFluidHandle): boolean;
15
+
16
+ // @beta @legacy
17
+ export function convertToSummaryTreeWithStats(snapshot: ITree, fullTree?: boolean): ISummaryTreeWithStats;
18
+
19
+ // @beta @legacy
20
+ export const create404Response: (request: IRequest) => IResponse;
21
+
22
+ // @beta @legacy
23
+ export abstract class FluidHandleBase<T> implements IFluidHandleInternal<T> {
24
+ // (undocumented)
25
+ get [fluidHandleSymbol](): IFluidHandleErased<T>;
26
+ // (undocumented)
27
+ abstract absolutePath: string;
28
+ // (undocumented)
29
+ abstract attachGraph(): void;
30
+ // (undocumented)
31
+ abstract get(): Promise<T>;
32
+ get IFluidHandle(): IFluidHandleInternal;
33
+ // (undocumented)
34
+ abstract readonly isAttached: boolean;
35
+ }
36
+
37
+ // @public
38
+ export function isFluidHandle(value: unknown): value is IFluidHandle;
39
+
40
+ // @beta @legacy
41
+ export const isFluidHandlePayloadPending: <T>(handle: IFluidHandle<T>) => handle is IFluidHandlePayloadPending<T>;
42
+
43
+ // @beta @legacy
44
+ export const isLocalFluidHandle: <T>(handle: IFluidHandle<T>) => handle is ILocalFluidHandle<T>;
45
+
46
+ // @alpha @legacy
47
+ export function lookupTemporaryBlobStorageId(containerRuntime: IContainerRuntime, handle: IFluidHandle): string | undefined;
48
+
49
+ // @beta @legacy
50
+ export class RequestParser implements IRequest {
51
+ protected constructor(request: Readonly<IRequest>);
52
+ // (undocumented)
53
+ static create(request: Readonly<IRequest>): RequestParser;
54
+ createSubRequest(startingPathIndex: number): IRequest;
55
+ static getPathParts(url: string): readonly string[];
56
+ // (undocumented)
57
+ readonly headers?: IRequestHeader;
58
+ isLeaf(elements: number): boolean;
59
+ get pathParts(): readonly string[];
60
+ // (undocumented)
61
+ readonly query: string;
62
+ // (undocumented)
63
+ get url(): string;
64
+ }
65
+
66
+ // @beta @legacy (undocumented)
67
+ export abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
68
+ hasInitialized(_runtime: T): Promise<void>;
69
+ instantiateFirstTime(_runtime: T): Promise<void>;
70
+ instantiateFromExisting(_runtime: T): Promise<void>;
71
+ // (undocumented)
72
+ instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
73
+ // (undocumented)
74
+ get IRuntimeFactory(): this;
75
+ abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;
76
+ }
77
+
78
+ // @beta @legacy
79
+ export class SummaryTreeBuilder implements ISummaryTreeWithStats {
80
+ constructor(params?: {
81
+ groupId?: string;
82
+ });
83
+ addAttachment(id: string): void;
84
+ addBlob(key: string, content: string | Uint8Array): void;
85
+ addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void;
86
+ addWithStats(key: string, summarizeResult: ISummarizeResult): void;
87
+ getSummaryTree(): ISummaryTreeWithStats;
88
+ // (undocumented)
89
+ get stats(): Readonly<ISummaryStats>;
90
+ // (undocumented)
91
+ get summary(): ISummaryTree;
92
+ }
93
+
94
+ // @beta @legacy
95
+ export function toDeltaManagerInternal(deltaManager: IDeltaManagerErased): IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
96
+
97
+ // @beta @legacy
98
+ export function toFluidHandleErased<T>(handle: IFluidHandleInternal<T>): IFluidHandleErased<T>;
99
+
100
+ // @beta @legacy
101
+ export function toFluidHandleInternal<T>(handle: IFluidHandle<T>): IFluidHandleInternal<T>;
102
+
103
+ // (No @packageDocumentation comment for this package)
104
+
105
+ ```
@@ -3,6 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { IRequest, IResponse } from "@fluidframework/core-interfaces";
6
+ import type { IFluidDataStoreRuntime, IFluidDataStoreRuntimeAlpha } from "@fluidframework/datastore-definitions/internal";
7
+ import type { ContainerRuntimeBaseAlpha, IContainerRuntimeBase } from "@fluidframework/runtime-definitions/internal";
6
8
  /**
7
9
  * Converts an error object into an {@link @fluidframework/core-interfaces#IResponse}.
8
10
  * @internal
@@ -34,4 +36,14 @@ export declare const create404Response: (request: IRequest) => IResponse;
34
36
  * @internal
35
37
  */
36
38
  export declare function createResponseError(status: number, value: string, request: IRequest, headers?: Record<string, unknown>): IResponse;
39
+ /**
40
+ * Converts types to their alpha counterparts to expose alpha functionality.
41
+ * @legacy @alpha
42
+ */
43
+ export declare function asLegacyAlpha(runtime: IContainerRuntimeBase): ContainerRuntimeBaseAlpha;
44
+ /**
45
+ * Converts types to their alpha counterparts to expose alpha functionality.
46
+ * @legacy @alpha
47
+ */
48
+ export declare function asLegacyAlpha(runtime: IFluidDataStoreRuntime): IFluidDataStoreRuntimeAlpha;
37
49
  //# sourceMappingURL=dataStoreHelpers.d.ts.map
@@ -1 +1 @@
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;AAyB3E;;;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,CAAC,GAC/B,SAAS,CAiBX"}
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,CAAC,GAC/B,SAAS,CAiBX;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,yBAAyB,CAAC;AACzF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,2BAA2B,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.createResponseError = exports.create404Response = exports.responseToException = exports.exceptionToResponse = void 0;
7
+ exports.asLegacyAlpha = exports.createResponseError = exports.create404Response = exports.responseToException = exports.exceptionToResponse = void 0;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const internal_2 = require("@fluidframework/telemetry-utils/internal");
10
10
  /**
@@ -109,4 +109,12 @@ function createResponseError(status, value, request, headers) {
109
109
  };
110
110
  }
111
111
  exports.createResponseError = createResponseError;
112
+ /**
113
+ * Converts types to their alpha counterparts to expose alpha functionality.
114
+ * @legacy @alpha
115
+ */
116
+ function asLegacyAlpha(runtime) {
117
+ return runtime;
118
+ }
119
+ exports.asLegacyAlpha = asLegacyAlpha;
112
120
  //# sourceMappingURL=dataStoreHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreHelpers.js","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA6D;AAC7D,uEAAkF;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,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,IAAI,KAAK;QAC9D,CAAC,CAAE,KAA2B;QAC9B,CAAC,CAAC,IAAA,iCAAsB,GAAE,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;AA5BD,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EAAE;QACnE,IAAI,KAAK;YACR,OAAO,YAAY,CAAC,KAAK,CAAC;QAC3B,CAAC;QACD,OAAO;KACP,CAAC;AACH,CAAC;AAtBD,kDAsBC","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 { 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"]}
1
+ {"version":3,"file":"dataStoreHelpers.js","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA6D;AAS7D,uEAAkF;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,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,IAAI,KAAK;QAC9D,CAAC,CAAE,KAA2B;QAC9B,CAAC,CAAC,IAAA,iCAAsB,GAAE,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;AA5BD,kDA4BC;AAED;;;;;;GAMG;AACH,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AAO,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"]}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { generateHandleContextPath } from "./dataStoreHandleContextUtils.js";
6
- export { create404Response, createResponseError, exceptionToResponse, responseToException, } from "./dataStoreHelpers.js";
6
+ export { create404Response, createResponseError, exceptionToResponse, responseToException, asLegacyAlpha, } from "./dataStoreHelpers.js";
7
7
  export { compareFluidHandles, encodeHandleForSerialization, FluidHandleBase, isFluidHandle, isFluidHandleInternalPayloadPending, isFluidHandlePayloadPending, isLocalFluidHandle, isSerializedHandle, lookupTemporaryBlobStorageId, toFluidHandleErased, toFluidHandleInternal, } from "./handles.js";
8
8
  export type { ISerializedHandle } from "./handles.js";
9
9
  export { ObjectStoragePartition } from "./objectstoragepartition.js";
@@ -1 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AmB,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,8BAA8B,EAC9B,gCAAgC,EAChC,0BAA0B,EAC1B,wCAAwC,GACxC,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACX,SAAS,EACT,mBAAmB,EACnB,2BAA2B,EAC3B,eAAe,GACf,MAAM,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.semanticVersionToMinimumVersionForCollab = exports.isValidMinVersionForCollab = exports.getConfigsForMinVersionForCollab = exports.getValidationForRuntimeOptions = 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.responseToException = exports.exceptionToResponse = exports.createResponseError = exports.create404Response = exports.generateHandleContextPath = void 0;
7
+ exports.semanticVersionToMinimumVersionForCollab = exports.isValidMinVersionForCollab = exports.getConfigsForMinVersionForCollab = exports.getValidationForRuntimeOptions = 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;
8
8
  var dataStoreHandleContextUtils_js_1 = require("./dataStoreHandleContextUtils.js");
9
9
  Object.defineProperty(exports, "generateHandleContextPath", { enumerable: true, get: function () { return dataStoreHandleContextUtils_js_1.generateHandleContextPath; } });
10
10
  var dataStoreHelpers_js_1 = require("./dataStoreHelpers.js");
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "create404Response", { enumerable: true, get: fun
12
12
  Object.defineProperty(exports, "createResponseError", { enumerable: true, get: function () { return dataStoreHelpers_js_1.createResponseError; } });
13
13
  Object.defineProperty(exports, "exceptionToResponse", { enumerable: true, get: function () { return dataStoreHelpers_js_1.exceptionToResponse; } });
14
14
  Object.defineProperty(exports, "responseToException", { enumerable: true, get: function () { return dataStoreHelpers_js_1.responseToException; } });
15
+ Object.defineProperty(exports, "asLegacyAlpha", { enumerable: true, get: function () { return dataStoreHelpers_js_1.asLegacyAlpha; } });
15
16
  var handles_js_1 = require("./handles.js");
16
17
  Object.defineProperty(exports, "compareFluidHandles", { enumerable: true, get: function () { return handles_js_1.compareFluidHandles; } });
17
18
  Object.defineProperty(exports, "encodeHandleForSerialization", { enumerable: true, get: function () { return handles_js_1.encodeHandleForSerialization; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mFAA6E;AAApE,2IAAA,yBAAyB,OAAA;AAClC,6DAK+B;AAJ9B,wHAAA,iBAAiB,OAAA;AACjB,0HAAA,mBAAmB,OAAA;AACnB,0HAAA,mBAAmB,OAAA;AACnB,0HAAA,mBAAmB,OAAA;AAEpB,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,+DAOgC;AAN/B,wIAAA,gCAAgC,OAAA;AAChC,kIAAA,0BAA0B,OAAA;AAC1B,sIAAA,8BAA8B,OAAA;AAC9B,wIAAA,gCAAgC,OAAA;AAChC,kIAAA,0BAA0B,OAAA;AAC1B,gJAAA,wCAAwC,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} 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\tgetValidationForRuntimeOptions,\n\tgetConfigsForMinVersionForCollab,\n\tisValidMinVersionForCollab,\n\tsemanticVersionToMinimumVersionForCollab,\n} from \"./compatibilityBase.js\";\nexport type {\n\tConfigMap,\n\tConfigValidationMap,\n\tMinimumMinorSemanticVersion,\n\tSemanticVersion,\n} from \"./compatibilityBase.js\";\n"]}
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,+DAOgC;AAN/B,wIAAA,gCAAgC,OAAA;AAChC,kIAAA,0BAA0B,OAAA;AAC1B,sIAAA,8BAA8B,OAAA;AAC9B,wIAAA,gCAAgC,OAAA;AAChC,kIAAA,0BAA0B,OAAA;AAC1B,gJAAA,wCAAwC,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\tgetValidationForRuntimeOptions,\n\tgetConfigsForMinVersionForCollab,\n\tisValidMinVersionForCollab,\n\tsemanticVersionToMinimumVersionForCollab,\n} from \"./compatibilityBase.js\";\nexport type {\n\tConfigMap,\n\tConfigValidationMap,\n\tMinimumMinorSemanticVersion,\n\tSemanticVersion,\n} from \"./compatibilityBase.js\";\n"]}
@@ -0,0 +1,35 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ export {
12
+ // #region @public APIs
13
+ compareFluidHandles,
14
+ isFluidHandle,
15
+ // #endregion
16
+
17
+ // #region @legacyBeta APIs
18
+ FluidHandleBase,
19
+ RequestParser,
20
+ RuntimeFactoryHelper,
21
+ SummaryTreeBuilder,
22
+ convertToSummaryTreeWithStats,
23
+ create404Response,
24
+ isFluidHandlePayloadPending,
25
+ isLocalFluidHandle,
26
+ toDeltaManagerInternal,
27
+ toFluidHandleErased,
28
+ toFluidHandleInternal,
29
+ // #endregion
30
+
31
+ // #region @legacyAlpha APIs
32
+ asLegacyAlpha,
33
+ lookupTemporaryBlobStorageId
34
+ // #endregion
35
+ } from "./index.js";
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/runtime-utils";
8
- export declare const pkgVersion = "2.70.0-361788";
8
+ export declare const pkgVersion = "2.70.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,kCAAkC,CAAC;AACvD,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,kCAAkC,CAAC;AACvD,eAAO,MAAM,UAAU,WAAW,CAAC"}
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/runtime-utils";
11
- exports.pkgVersion = "2.70.0-361788";
11
+ exports.pkgVersion = "2.70.0";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,+BAA+B,CAAC;AAC1C,QAAA,UAAU,GAAG,eAAe,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.70.0-361788\";\n"]}
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,QAAQ,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.70.0\";\n"]}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ export * from "../lib/legacyAlpha.js";
@@ -3,6 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { IRequest, IResponse } from "@fluidframework/core-interfaces";
6
+ import type { IFluidDataStoreRuntime, IFluidDataStoreRuntimeAlpha } from "@fluidframework/datastore-definitions/internal";
7
+ import type { ContainerRuntimeBaseAlpha, IContainerRuntimeBase } from "@fluidframework/runtime-definitions/internal";
6
8
  /**
7
9
  * Converts an error object into an {@link @fluidframework/core-interfaces#IResponse}.
8
10
  * @internal
@@ -34,4 +36,14 @@ export declare const create404Response: (request: IRequest) => IResponse;
34
36
  * @internal
35
37
  */
36
38
  export declare function createResponseError(status: number, value: string, request: IRequest, headers?: Record<string, unknown>): IResponse;
39
+ /**
40
+ * Converts types to their alpha counterparts to expose alpha functionality.
41
+ * @legacy @alpha
42
+ */
43
+ export declare function asLegacyAlpha(runtime: IContainerRuntimeBase): ContainerRuntimeBaseAlpha;
44
+ /**
45
+ * Converts types to their alpha counterparts to expose alpha functionality.
46
+ * @legacy @alpha
47
+ */
48
+ export declare function asLegacyAlpha(runtime: IFluidDataStoreRuntime): IFluidDataStoreRuntimeAlpha;
37
49
  //# sourceMappingURL=dataStoreHelpers.d.ts.map
@@ -1 +1 @@
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;AAyB3E;;;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,CAAC,GAC/B,SAAS,CAiBX"}
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,CAAC,GAC/B,SAAS,CAiBX;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,yBAAyB,CAAC;AACzF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,2BAA2B,CAAC"}
@@ -102,4 +102,11 @@ export function createResponseError(status, value, request, headers) {
102
102
  headers,
103
103
  };
104
104
  }
105
+ /**
106
+ * Converts types to their alpha counterparts to expose alpha functionality.
107
+ * @legacy @alpha
108
+ */
109
+ export function asLegacyAlpha(runtime) {
110
+ return runtime;
111
+ }
105
112
  //# sourceMappingURL=dataStoreHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreHelpers.js","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,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,KAA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QAAQ,CAAC,OAAO;KAC3C,CAAC;IAEF,OAAO,WAAW,CAAC;AACpB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,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","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 { 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"]}
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;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;IAEF,OAAO,WAAW,CAAC;AACpB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,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"]}
package/lib/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { generateHandleContextPath } from "./dataStoreHandleContextUtils.js";
6
- export { create404Response, createResponseError, exceptionToResponse, responseToException, } from "./dataStoreHelpers.js";
6
+ export { create404Response, createResponseError, exceptionToResponse, responseToException, asLegacyAlpha, } from "./dataStoreHelpers.js";
7
7
  export { compareFluidHandles, encodeHandleForSerialization, FluidHandleBase, isFluidHandle, isFluidHandleInternalPayloadPending, isFluidHandlePayloadPending, isLocalFluidHandle, isSerializedHandle, lookupTemporaryBlobStorageId, toFluidHandleErased, toFluidHandleInternal, } from "./handles.js";
8
8
  export type { ISerializedHandle } from "./handles.js";
9
9
  export { ObjectStoragePartition } from "./objectstoragepartition.js";
@@ -1 +1 @@
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,GACnB,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,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3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { generateHandleContextPath } from "./dataStoreHandleContextUtils.js";
6
- export { create404Response, createResponseError, exceptionToResponse, responseToException, } from "./dataStoreHelpers.js";
6
+ export { create404Response, createResponseError, exceptionToResponse, responseToException, asLegacyAlpha, } from "./dataStoreHelpers.js";
7
7
  export { compareFluidHandles, encodeHandleForSerialization, FluidHandleBase, isFluidHandle, isFluidHandleInternalPayloadPending, isFluidHandlePayloadPending, isLocalFluidHandle, isSerializedHandle, lookupTemporaryBlobStorageId, toFluidHandleErased, toFluidHandleInternal, } from "./handles.js";
8
8
  export { ObjectStoragePartition } from "./objectstoragepartition.js";
9
9
  export { getNormalizedObjectStoragePathParts, listBlobsAtTreePath, } from "./objectstorageutils.js";
package/lib/index.js.map CHANGED
@@ -1 +1 @@
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,GACnB,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,8BAA8B,EAC9B,gCAAgC,EAChC,0BAA0B,EAC1B,wCAAwC,GACxC,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} 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\tgetValidationForRuntimeOptions,\n\tgetConfigsForMinVersionForCollab,\n\tisValidMinVersionForCollab,\n\tsemanticVersionToMinimumVersionForCollab,\n} from \"./compatibilityBase.js\";\nexport type {\n\tConfigMap,\n\tConfigValidationMap,\n\tMinimumMinorSemanticVersion,\n\tSemanticVersion,\n} from \"./compatibilityBase.js\";\n"]}
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,8BAA8B,EAC9B,gCAAgC,EAChC,0BAA0B,EAC1B,wCAAwC,GACxC,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\tgetValidationForRuntimeOptions,\n\tgetConfigsForMinVersionForCollab,\n\tisValidMinVersionForCollab,\n\tsemanticVersionToMinimumVersionForCollab,\n} from \"./compatibilityBase.js\";\nexport type {\n\tConfigMap,\n\tConfigValidationMap,\n\tMinimumMinorSemanticVersion,\n\tSemanticVersion,\n} from \"./compatibilityBase.js\";\n"]}
@@ -0,0 +1,35 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ export {
12
+ // #region @public APIs
13
+ compareFluidHandles,
14
+ isFluidHandle,
15
+ // #endregion
16
+
17
+ // #region @legacyBeta APIs
18
+ FluidHandleBase,
19
+ RequestParser,
20
+ RuntimeFactoryHelper,
21
+ SummaryTreeBuilder,
22
+ convertToSummaryTreeWithStats,
23
+ create404Response,
24
+ isFluidHandlePayloadPending,
25
+ isLocalFluidHandle,
26
+ toDeltaManagerInternal,
27
+ toFluidHandleErased,
28
+ toFluidHandleInternal,
29
+ // #endregion
30
+
31
+ // #region @legacyAlpha APIs
32
+ asLegacyAlpha,
33
+ lookupTemporaryBlobStorageId
34
+ // #endregion
35
+ } from "./index.js";
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/runtime-utils";
8
- export declare const pkgVersion = "2.70.0-361788";
8
+ export declare const pkgVersion = "2.70.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,kCAAkC,CAAC;AACvD,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,kCAAkC,CAAC;AACvD,eAAO,MAAM,UAAU,WAAW,CAAC"}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/runtime-utils";
8
- export const pkgVersion = "2.70.0-361788";
8
+ export const pkgVersion = "2.70.0";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
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,eAAe,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.70.0-361788\";\n"]}
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,QAAQ,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.70.0\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/runtime-utils",
3
- "version": "2.70.0-361788",
3
+ "version": "2.70.0",
4
4
  "description": "Collection of utility functions for Fluid Runtime",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -33,6 +33,16 @@
33
33
  "default": "./dist/index.js"
34
34
  }
35
35
  },
36
+ "./legacy/alpha": {
37
+ "import": {
38
+ "types": "./lib/legacyAlpha.d.ts",
39
+ "default": "./lib/index.js"
40
+ },
41
+ "require": {
42
+ "types": "./dist/legacyAlpha.d.ts",
43
+ "default": "./dist/index.js"
44
+ }
45
+ },
36
46
  "./internal": {
37
47
  "import": {
38
48
  "types": "./lib/index.d.ts",
@@ -69,22 +79,22 @@
69
79
  "temp-directory": "nyc/.nyc_output"
70
80
  },
71
81
  "dependencies": {
72
- "@fluid-internal/client-utils": "2.70.0-361788",
73
- "@fluidframework/container-definitions": "2.70.0-361788",
74
- "@fluidframework/container-runtime-definitions": "2.70.0-361788",
75
- "@fluidframework/core-interfaces": "2.70.0-361788",
76
- "@fluidframework/core-utils": "2.70.0-361788",
77
- "@fluidframework/datastore-definitions": "2.70.0-361788",
78
- "@fluidframework/driver-definitions": "2.70.0-361788",
79
- "@fluidframework/driver-utils": "2.70.0-361788",
80
- "@fluidframework/runtime-definitions": "2.70.0-361788",
81
- "@fluidframework/telemetry-utils": "2.70.0-361788",
82
+ "@fluid-internal/client-utils": "~2.70.0",
83
+ "@fluidframework/container-definitions": "~2.70.0",
84
+ "@fluidframework/container-runtime-definitions": "~2.70.0",
85
+ "@fluidframework/core-interfaces": "~2.70.0",
86
+ "@fluidframework/core-utils": "~2.70.0",
87
+ "@fluidframework/datastore-definitions": "~2.70.0",
88
+ "@fluidframework/driver-definitions": "~2.70.0",
89
+ "@fluidframework/driver-utils": "~2.70.0",
90
+ "@fluidframework/runtime-definitions": "~2.70.0",
91
+ "@fluidframework/telemetry-utils": "~2.70.0",
82
92
  "semver-ts": "^1.0.3"
83
93
  },
84
94
  "devDependencies": {
85
95
  "@arethetypeswrong/cli": "^0.17.1",
86
96
  "@biomejs/biome": "~1.9.3",
87
- "@fluid-internal/mocha-test-setup": "2.70.0-361788",
97
+ "@fluid-internal/mocha-test-setup": "~2.70.0",
88
98
  "@fluid-tools/build-cli": "^0.58.3",
89
99
  "@fluidframework/build-common": "^2.0.3",
90
100
  "@fluidframework/build-tools": "^0.58.3",
@@ -112,8 +122,8 @@
112
122
  },
113
123
  "scripts": {
114
124
  "api": "fluid-build . --task api",
115
- "api-extractor:commonjs": "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./dist",
116
- "api-extractor:esnext": "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat",
125
+ "api-extractor:commonjs": "flub generate entrypoints --outFileLegacyBeta legacy --outFileLegacyAlpha legacyAlpha --outDir ./dist",
126
+ "api-extractor:esnext": "flub generate entrypoints --outFileLegacyBeta legacy --outFileLegacyAlpha legacyAlpha --outDir ./lib --node10TypeCompat",
117
127
  "build": "fluid-build . --task build",
118
128
  "build:api-reports": "concurrently \"npm:build:api-reports:*\"",
119
129
  "build:api-reports:current": "api-extractor run --local --config api-extractor/api-extractor.current.json",
@@ -131,8 +141,10 @@
131
141
  "check:exports": "concurrently \"npm:check:exports:*\"",
132
142
  "check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
133
143
  "check:exports:cjs:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.cjs.json",
144
+ "check:exports:cjs:legacyAlpha": "api-extractor run --config api-extractor/api-extractor-lint-legacyAlpha.cjs.json",
134
145
  "check:exports:cjs:public": "api-extractor run --config api-extractor/api-extractor-lint-public.cjs.json",
135
146
  "check:exports:esm:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.esm.json",
147
+ "check:exports:esm:legacyAlpha": "api-extractor run --config api-extractor/api-extractor-lint-legacyAlpha.esm.json",
136
148
  "check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
137
149
  "check:format": "npm run check:biome",
138
150
  "ci:build:api-reports": "concurrently \"npm:ci:build:api-reports:*\"",
@@ -5,6 +5,14 @@
5
5
 
6
6
  import type { IRequest, IResponse } from "@fluidframework/core-interfaces";
7
7
  import { assert } from "@fluidframework/core-utils/internal";
8
+ import type {
9
+ IFluidDataStoreRuntime,
10
+ IFluidDataStoreRuntimeAlpha,
11
+ } from "@fluidframework/datastore-definitions/internal";
12
+ import type {
13
+ ContainerRuntimeBaseAlpha,
14
+ IContainerRuntimeBase,
15
+ } from "@fluidframework/runtime-definitions/internal";
8
16
  import { generateErrorWithStack } from "@fluidframework/telemetry-utils/internal";
9
17
 
10
18
  interface IResponseException extends Error {
@@ -131,3 +139,23 @@ export function createResponseError(
131
139
  headers,
132
140
  };
133
141
  }
142
+
143
+ /**
144
+ * Converts types to their alpha counterparts to expose alpha functionality.
145
+ * @legacy @alpha
146
+ */
147
+ export function asLegacyAlpha(runtime: IContainerRuntimeBase): ContainerRuntimeBaseAlpha;
148
+ /**
149
+ * Converts types to their alpha counterparts to expose alpha functionality.
150
+ * @legacy @alpha
151
+ */
152
+ export function asLegacyAlpha(runtime: IFluidDataStoreRuntime): IFluidDataStoreRuntimeAlpha;
153
+ /**
154
+ * Converts types to their alpha counterparts to expose alpha functionality.
155
+ * @legacy @alpha
156
+ */
157
+ export function asLegacyAlpha(
158
+ runtime: IFluidDataStoreRuntime | IContainerRuntimeBase,
159
+ ): unknown {
160
+ return runtime;
161
+ }
package/src/index.ts CHANGED
@@ -9,6 +9,7 @@ export {
9
9
  createResponseError,
10
10
  exceptionToResponse,
11
11
  responseToException,
12
+ asLegacyAlpha,
12
13
  } from "./dataStoreHelpers.js";
13
14
  export {
14
15
  compareFluidHandles,
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/runtime-utils";
9
- export const pkgVersion = "2.70.0-361788";
9
+ export const pkgVersion = "2.70.0";