@fluidframework/runtime-utils 2.0.0-internal.6.4.0 → 2.0.0-internal.7.1.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,65 @@
1
1
  # @fluidframework/runtime-utils
2
2
 
3
+ ## 2.0.0-internal.7.1.0
4
+
5
+ Dependency updates only.
6
+
7
+ ## 2.0.0-internal.7.0.0
8
+
9
+ ### Major Changes
10
+
11
+ - Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
12
+
13
+ This included the following changes from the protocol-definitions release:
14
+
15
+ - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
16
+ submitted by clients to the server and the resulting signals sent from the server to clients.
17
+ - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
18
+ been added, which will be the typing for signals sent from the client to the server. Both extend a new
19
+ ISignalMessageBase interface that contains common members.
20
+ - The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
21
+
22
+ - DEPRECATED: container-loader: Various request related APIs have been deprecated [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
23
+
24
+ Please remove all calls to the following functions and instead use the new `entryPoint` pattern:
25
+
26
+ - `requestFluidObject`
27
+ - `requestResolvedObjectFromContainer`
28
+ - `getDefaultObjectFromContainer`
29
+ - `getObjectWithIdFromContainer`
30
+ - `getObjectFromContainer`
31
+
32
+ See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
33
+
34
+ - Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
35
+
36
+ Dependencies on the following Fluid server package have been updated to version 2.0.1:
37
+
38
+ - @fluidframework/gitresources: 2.0.1
39
+ - @fluidframework/server-kafka-orderer: 2.0.1
40
+ - @fluidframework/server-lambdas: 2.0.1
41
+ - @fluidframework/server-lambdas-driver: 2.0.1
42
+ - @fluidframework/server-local-server: 2.0.1
43
+ - @fluidframework/server-memory-orderer: 2.0.1
44
+ - @fluidframework/protocol-base: 2.0.1
45
+ - @fluidframework/server-routerlicious: 2.0.1
46
+ - @fluidframework/server-routerlicious-base: 2.0.1
47
+ - @fluidframework/server-services: 2.0.1
48
+ - @fluidframework/server-services-client: 2.0.1
49
+ - @fluidframework/server-services-core: 2.0.1
50
+ - @fluidframework/server-services-ordering-kafkanode: 2.0.1
51
+ - @fluidframework/server-services-ordering-rdkafka: 2.0.1
52
+ - @fluidframework/server-services-ordering-zookeeper: 2.0.1
53
+ - @fluidframework/server-services-shared: 2.0.1
54
+ - @fluidframework/server-services-telemetry: 2.0.1
55
+ - @fluidframework/server-services-utils: 2.0.1
56
+ - @fluidframework/server-test-utils: 2.0.1
57
+ - tinylicious: 2.0.1
58
+
59
+ - Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
60
+
61
+ The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
62
+
3
63
  ## 2.0.0-internal.6.4.0
4
64
 
5
65
  Dependency updates only.
@@ -1,4 +1,12 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "@fluidframework/build-common/api-extractor-common-report.json"
3
+ "extends": "@fluidframework/build-common/api-extractor-base.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ "ae-missing-release-tag": {
7
+ // TODO: Fix violations and remove this rule override
8
+ "logLevel": "none"
9
+ }
10
+ }
11
+ }
4
12
  }
@@ -0,0 +1,205 @@
1
+ ## 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
+ import { FluidObject } from '@fluidframework/core-interfaces';
8
+ import { IChannelStorageService } from '@fluidframework/datastore-definitions';
9
+ import { IContainerContext } from '@fluidframework/container-definitions';
10
+ import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
11
+ import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
12
+ import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
13
+ import { IFluidHandleContext } from '@fluidframework/core-interfaces';
14
+ import { IFluidRouter } from '@fluidframework/core-interfaces';
15
+ import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
16
+ import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
17
+ import { IRequest } from '@fluidframework/core-interfaces';
18
+ import { IRequestHeader } from '@fluidframework/core-interfaces';
19
+ import { IResponse } from '@fluidframework/core-interfaces';
20
+ import { IRuntime } from '@fluidframework/container-definitions';
21
+ import { IRuntimeFactory } from '@fluidframework/container-definitions';
22
+ import { ISnapshotTree } from '@fluidframework/protocol-definitions';
23
+ import { ISummarizeResult } from '@fluidframework/runtime-definitions';
24
+ import { ISummaryBlob } from '@fluidframework/protocol-definitions';
25
+ import { ISummaryStats } from '@fluidframework/runtime-definitions';
26
+ import { ISummaryTree } from '@fluidframework/protocol-definitions';
27
+ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
28
+ import { ITelemetryContext } from '@fluidframework/runtime-definitions';
29
+ import { ITree } from '@fluidframework/protocol-definitions';
30
+ import { SummaryObject } from '@fluidframework/protocol-definitions';
31
+ import { SummaryType } from '@fluidframework/protocol-definitions';
32
+ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
33
+
34
+ // @public (undocumented)
35
+ export function addBlobToSummary(summary: ISummaryTreeWithStats, key: string, content: string | Uint8Array): void;
36
+
37
+ // @public (undocumented)
38
+ export function addSummarizeResultToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
39
+
40
+ // @public (undocumented)
41
+ export function addTreeToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
42
+
43
+ // @public (undocumented)
44
+ export function calculateStats(summary: SummaryObject): ISummaryStats;
45
+
46
+ // @public
47
+ export function convertSnapshotTreeToSummaryTree(snapshot: ISnapshotTree): ISummaryTreeWithStats;
48
+
49
+ // @public
50
+ export function convertSummaryTreeToITree(summaryTree: ISummaryTree): ITree;
51
+
52
+ // @public
53
+ export function convertToSummaryTree(snapshot: ITree, fullTree?: boolean): ISummarizeResult;
54
+
55
+ // @public
56
+ export function convertToSummaryTreeWithStats(snapshot: ITree, fullTree?: boolean): ISummaryTreeWithStats;
57
+
58
+ // @public (undocumented)
59
+ export const create404Response: (request: IRequest) => IResponse;
60
+
61
+ // @public (undocumented)
62
+ export function createDataStoreFactory(type: string, factory: Factory | Promise<Factory>): IFluidDataStoreFactory & IFluidDataStoreRegistry;
63
+
64
+ // @public (undocumented)
65
+ export function createResponseError(status: number, value: string, request: IRequest, headers?: {
66
+ [key: string]: any;
67
+ }): IResponse;
68
+
69
+ // @public (undocumented)
70
+ export function exceptionToResponse(err: any): IResponse;
71
+
72
+ // @public (undocumented)
73
+ export type Factory = IFluidDataStoreFactory & Partial<IProvideFluidDataStoreRegistry>;
74
+
75
+ // @internal
76
+ export class GCDataBuilder implements IGarbageCollectionData {
77
+ // (undocumented)
78
+ addNode(id: string, outboundRoutes: string[]): void;
79
+ // (undocumented)
80
+ addNodes(gcNodes: {
81
+ [id: string]: string[];
82
+ }): void;
83
+ addRouteToAllNodes(outboundRoute: string): void;
84
+ // (undocumented)
85
+ get gcNodes(): {
86
+ [id: string]: string[];
87
+ };
88
+ // (undocumented)
89
+ getGCData(): IGarbageCollectionData;
90
+ prefixAndAddNodes(prefixId: string, gcNodes: {
91
+ [id: string]: string[];
92
+ }): void;
93
+ }
94
+
95
+ // @public
96
+ export function generateHandleContextPath(path: string, routeContext?: IFluidHandleContext): string;
97
+
98
+ // @public (undocumented)
99
+ export function getBlobSize(content: ISummaryBlob["content"]): number;
100
+
101
+ // @public (undocumented)
102
+ export function getNormalizedObjectStoragePathParts(path: string): string[];
103
+
104
+ // @public (undocumented)
105
+ export function listBlobsAtTreePath(inputTree: ITree | undefined, path: string): Promise<string[]>;
106
+
107
+ // @public
108
+ export function mergeStats(...stats: ISummaryStats[]): ISummaryStats;
109
+
110
+ // @public
111
+ export class ObjectStoragePartition implements IChannelStorageService {
112
+ constructor(storage: IChannelStorageService, path: string);
113
+ // (undocumented)
114
+ contains(path: string): Promise<boolean>;
115
+ // (undocumented)
116
+ list(path: string): Promise<string[]>;
117
+ // (undocumented)
118
+ readBlob(path: string): Promise<ArrayBufferLike>;
119
+ }
120
+
121
+ // @public
122
+ export type ReadAndParseBlob = <T>(id: string) => Promise<T>;
123
+
124
+ // @public @deprecated (undocumented)
125
+ export function requestFluidObject<T = FluidObject>(router: IFluidRouter, url: string | IRequest): Promise<T>;
126
+
127
+ // @public
128
+ export class RequestParser implements IRequest {
129
+ protected constructor(request: Readonly<IRequest>);
130
+ // (undocumented)
131
+ static create(request: Readonly<IRequest>): RequestParser;
132
+ createSubRequest(startingPathIndex: number): IRequest;
133
+ static getPathParts(url: string): readonly string[];
134
+ // (undocumented)
135
+ get headers(): IRequestHeader | undefined;
136
+ isLeaf(elements: number): boolean;
137
+ get pathParts(): readonly string[];
138
+ // (undocumented)
139
+ readonly query: string;
140
+ // (undocumented)
141
+ get url(): string;
142
+ }
143
+
144
+ // @public (undocumented)
145
+ export function responseToException(response: IResponse, request: IRequest): Error;
146
+
147
+ // @public (undocumented)
148
+ export abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
149
+ // (undocumented)
150
+ hasInitialized(_runtime: T): Promise<void>;
151
+ // (undocumented)
152
+ instantiateFirstTime(_runtime: T): Promise<void>;
153
+ // (undocumented)
154
+ instantiateFromExisting(_runtime: T): Promise<void>;
155
+ // (undocumented)
156
+ instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
157
+ // (undocumented)
158
+ get IRuntimeFactory(): this;
159
+ // (undocumented)
160
+ abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;
161
+ }
162
+
163
+ // @public
164
+ export function seqFromTree(tree: ISnapshotTree, readAndParseBlob: ReadAndParseBlob): Promise<number>;
165
+
166
+ // @public (undocumented)
167
+ export class SummaryTreeBuilder implements ISummaryTreeWithStats {
168
+ constructor();
169
+ // (undocumented)
170
+ addAttachment(id: string): void;
171
+ // (undocumented)
172
+ addBlob(key: string, content: string | Uint8Array): void;
173
+ // (undocumented)
174
+ addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void;
175
+ // (undocumented)
176
+ addWithStats(key: string, summarizeResult: ISummarizeResult): void;
177
+ // (undocumented)
178
+ getSummaryTree(): ISummaryTreeWithStats;
179
+ // (undocumented)
180
+ get stats(): Readonly<ISummaryStats>;
181
+ // (undocumented)
182
+ get summary(): ISummaryTree;
183
+ }
184
+
185
+ // @public (undocumented)
186
+ export class TelemetryContext implements ITelemetryContext {
187
+ // (undocumented)
188
+ get(prefix: string, property: string): TelemetryEventPropertyType;
189
+ // (undocumented)
190
+ serialize(): string;
191
+ // (undocumented)
192
+ set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
193
+ // (undocumented)
194
+ setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
195
+ }
196
+
197
+ // @public
198
+ export function unpackChildNodesUsedRoutes(usedRoutes: string[]): Map<string, string[]>;
199
+
200
+ // @public (undocumented)
201
+ export function utf8ByteLength(str: string): number;
202
+
203
+ // (No @packageDocumentation comment for this package)
204
+
205
+ ```
@@ -6,11 +6,14 @@ import { FluidObject, IFluidRouter, IRequest, IResponse } from "@fluidframework/
6
6
  import { IFluidDataStoreFactory, IFluidDataStoreRegistry, IProvideFluidDataStoreRegistry } from "@fluidframework/runtime-definitions";
7
7
  export declare function exceptionToResponse(err: any): IResponse;
8
8
  export declare function responseToException(response: IResponse, request: IRequest): Error;
9
+ /**
10
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
11
+ */
9
12
  export declare function requestFluidObject<T = FluidObject>(router: IFluidRouter, url: string | IRequest): Promise<T>;
10
13
  export declare const create404Response: (request: IRequest) => IResponse;
11
14
  export declare function createResponseError(status: number, value: string, request: IRequest, headers?: {
12
15
  [key: string]: any;
13
16
  }): IResponse;
14
- export declare type Factory = IFluidDataStoreFactory & Partial<IProvideFluidDataStoreRegistry>;
17
+ export type Factory = IFluidDataStoreFactory & Partial<IProvideFluidDataStoreRegistry>;
15
18
  export declare function createDataStoreFactory(type: string, factory: Factory | Promise<Factory>): IFluidDataStoreFactory & IFluidDataStoreRegistry;
16
19
  //# sourceMappingURL=dataStoreHelpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreHelpers.d.ts","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,EACN,sBAAsB,EACtB,uBAAuB,EACvB,8BAA8B,EAC9B,MAAM,qCAAqC,CAAC;AAW7C,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,SAAS,CA0BvD;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,GAAG,KAAK,CAejF;AAED,wBAAsB,kBAAkB,CAAC,CAAC,GAAG,WAAW,EACvD,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,MAAM,GAAG,QAAQ,GACpB,OAAO,CAAC,CAAC,CAAC,CAUZ;AAED,eAAO,MAAM,iBAAiB,YAAa,QAAQ,cACJ,CAAC;AAEhD,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,MAAM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AO,CAAC,8BAA8B,CAAC,CAAC;AAEvF,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GACjC,sBAAsB,GAAG,uBAAuB,CAalD"}
@@ -49,7 +49,12 @@ function responseToException(response, request) {
49
49
  return responseErr;
50
50
  }
51
51
  exports.responseToException = responseToException;
52
- async function requestFluidObject(router, url) {
52
+ /**
53
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
54
+ */
55
+ async function requestFluidObject(
56
+ // eslint-disable-next-line import/no-deprecated
57
+ router, url) {
53
58
  const request = typeof url === "string" ? { url } : url;
54
59
  const response = await router.request(request);
55
60
  if (response.status !== 200 || response.mimeType !== "fluid/object") {
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreHelpers.js","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAOpD,qEAAyE;AAUzE,SAAgB,mBAAmB,CAAC,GAAQ;IAC3C,MAAM,MAAM,GAAG,GAAG,CAAC;IACnB,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,2BAA2B,KAAK,IAAI,EAAE;QACxF,MAAM,WAAW,GAAuB,GAAG,CAAC;QAC5C,OAAO;YACN,QAAQ,EAAE,YAAY;YACtB,MAAM,EAAE,WAAW,CAAC,IAAI;YACxB,KAAK,EAAE,WAAW,CAAC,OAAO;YAC1B,IAAI,KAAK;gBACR,OAAO,WAAW,CAAC,KAAK,CAAC;YAC1B,CAAC;YACD,OAAO,EAAE,WAAW,CAAC,yBAAyB;SAC9C,CAAC;KACF;IAED,0GAA0G;IAC1G,MAAM,YAAY,GAAG,IAAA,wCAAsB,GAAE,CAAC;IAE9C,OAAO;QACN,QAAQ,EAAE,YAAY;QACtB,MAAM;QACN,KAAK,E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AAG,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;AADnC,QAAA,iBAAiB,qBACkB;AAEhD,SAAgB,mBAAmB,CAClC,MAAc,EACd,KAAa,EACb,OAAiB,EACjB,OAAgC;IAEhC,IAAA,mBAAM,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,0GAA0G;IAC1G,MAAM,YAAY,GAAG,IAAA,wCAAsB,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;AAID,SAAgB,sBAAsB,CACrC,IAAY,EACZ,OAAmC;IAEnC,OAAO;QACN,IAAI;QACJ,IAAI,sBAAsB;YACzB,OAAO,IAAI,CAAC;QACb,CAAC;QACD,IAAI,uBAAuB;YAC1B,OAAO,IAAI,CAAC;QACb,CAAC;QACD,oBAAoB,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,CACjD,CAAC,MAAM,OAAO,CAAC,CAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC;QACxD,GAAG,EAAE,KAAK,EAAE,IAAY,EAAE,EAAE,CAAC,CAAC,MAAM,OAAO,CAAC,CAAC,uBAAuB,EAAE,GAAG,CAAC,IAAI,CAAC;KAC/E,CAAC;AACH,CAAC;AAhBD,wDAgBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { FluidObject, IFluidRouter, IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport {\n\tIFluidDataStoreFactory,\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n} from \"@fluidframework/runtime-definitions\";\nimport { generateErrorWithStack } from \"@fluidframework/telemetry-utils\";\n\ninterface IResponseException extends Error {\n\terrorFromRequestFluidObject: true;\n\tmessage: string;\n\tcode: number;\n\tstack?: string;\n\tunderlyingResponseHeaders?: { [key: string]: any };\n}\n\nexport function exceptionToResponse(err: any): IResponse {\n\tconst status = 500;\n\tif (err !== null && typeof err === \"object\" && err.errorFromRequestFluidObject === true) {\n\t\tconst responseErr: IResponseException = err;\n\t\treturn {\n\t\t\tmimeType: \"text/plain\",\n\t\t\tstatus: responseErr.code,\n\t\t\tvalue: responseErr.message,\n\t\t\tget stack() {\n\t\t\t\treturn responseErr.stack;\n\t\t\t},\n\t\t\theaders: responseErr.underlyingResponseHeaders,\n\t\t};\n\t}\n\n\t// Capture error objects, not stack itself, as stack retrieval is very expensive operation, so we delay it\n\tconst errWithStack = generateErrorWithStack();\n\n\treturn {\n\t\tmimeType: \"text/plain\",\n\t\tstatus,\n\t\tvalue: `${err}`,\n\t\tget stack() {\n\t\t\treturn (err?.stack as string | undefined) ?? errWithStack.stack;\n\t\t},\n\t};\n}\n\nexport function responseToException(response: IResponse, request: IRequest): Error {\n\tconst message = response.value;\n\tconst errWithStack = 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 response.stack ?? errWithStack.stack;\n\t\t},\n\t\tunderlyingResponseHeaders: response.headers,\n\t};\n\n\treturn responseErr;\n}\n\nexport async function requestFluidObject<T = FluidObject>(\n\trouter: IFluidRouter,\n\turl: string | IRequest,\n): Promise<T> {\n\tconst request = typeof url === \"string\" ? { url } : url;\n\tconst response = await router.request(request);\n\n\tif (response.status !== 200 || response.mimeType !== \"fluid/object\") {\n\t\tthrow responseToException(response, request);\n\t}\n\n\tassert(response.value, 0x19a /* \"Invalid response value for Fluid object request\" */);\n\treturn response.value as T;\n}\n\nexport const create404Response = (request: IRequest) =>\n\tcreateResponseError(404, \"not found\", request);\n\nexport function createResponseError(\n\tstatus: number,\n\tvalue: string,\n\trequest: IRequest,\n\theaders?: { [key: string]: any },\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// Capture error objects, not stack itself, as stack retrieval is very expensive operation, so we delay it\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\nexport type Factory = IFluidDataStoreFactory & Partial<IProvideFluidDataStoreRegistry>;\n\nexport function createDataStoreFactory(\n\ttype: string,\n\tfactory: Factory | Promise<Factory>,\n): IFluidDataStoreFactory & IFluidDataStoreRegistry {\n\treturn {\n\t\ttype,\n\t\tget IFluidDataStoreFactory() {\n\t\t\treturn this;\n\t\t},\n\t\tget IFluidDataStoreRegistry() {\n\t\t\treturn this;\n\t\t},\n\t\tinstantiateDataStore: async (context, existing) =>\n\t\t\t(await factory).instantiateDataStore(context, existing),\n\t\tget: async (name: string) => (await factory).IFluidDataStoreRegistry?.get(name),\n\t};\n}\n"]}
1
+ {"version":3,"file":"dataStoreHelpers.js","sourceRoot":"","sources":["../src/dataStoreHelpers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAQpD,qEAAyE;AAUzE,SAAgB,mBAAmB,CAAC,GAAQ;IAC3C,MAAM,MAAM,GAAG,GAAG,CAAC;IACnB,I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AAmC;IAEnC,OAAO;QACN,IAAI;QACJ,IAAI,sBAAsB;YACzB,OAAO,IAAI,CAAC;QACb,CAAC;QACD,IAAI,uBAAuB;YAC1B,OAAO,IAAI,CAAC;QACb,CAAC;QACD,oBAAoB,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,CACjD,CAAC,MAAM,OAAO,CAAC,CAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC;QACxD,GAAG,EAAE,KAAK,EAAE,IAAY,EAAE,EAAE,CAAC,CAAC,MAAM,OAAO,CAAC,CAAC,uBAAuB,EAAE,GAAG,CAAC,IAAI,CAAC;KAC/E,CAAC;AACH,CAAC;AAhBD,wDAgBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\n// eslint-disable-next-line import/no-deprecated\nimport { FluidObject, IFluidRouter, IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport {\n\tIFluidDataStoreFactory,\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n} from \"@fluidframework/runtime-definitions\";\nimport { generateErrorWithStack } from \"@fluidframework/telemetry-utils\";\n\ninterface IResponseException extends Error {\n\terrorFromRequestFluidObject: true;\n\tmessage: string;\n\tcode: number;\n\tstack?: string;\n\tunderlyingResponseHeaders?: { [key: string]: any };\n}\n\nexport function exceptionToResponse(err: any): IResponse {\n\tconst status = 500;\n\tif (err !== null && typeof err === \"object\" && err.errorFromRequestFluidObject === true) {\n\t\tconst responseErr: IResponseException = err;\n\t\treturn {\n\t\t\tmimeType: \"text/plain\",\n\t\t\tstatus: responseErr.code,\n\t\t\tvalue: responseErr.message,\n\t\t\tget stack() {\n\t\t\t\treturn responseErr.stack;\n\t\t\t},\n\t\t\theaders: responseErr.underlyingResponseHeaders,\n\t\t};\n\t}\n\n\t// Capture error objects, not stack itself, as stack retrieval is very expensive operation, so we delay it\n\tconst errWithStack = generateErrorWithStack();\n\n\treturn {\n\t\tmimeType: \"text/plain\",\n\t\tstatus,\n\t\tvalue: `${err}`,\n\t\tget stack() {\n\t\t\treturn (err?.stack as string | undefined) ?? errWithStack.stack;\n\t\t},\n\t};\n}\n\nexport function responseToException(response: IResponse, request: IRequest): Error {\n\tconst message = response.value;\n\tconst errWithStack = 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 response.stack ?? errWithStack.stack;\n\t\t},\n\t\tunderlyingResponseHeaders: response.headers,\n\t};\n\n\treturn responseErr;\n}\n\n/**\n * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n */\nexport async function requestFluidObject<T = FluidObject>(\n\t// eslint-disable-next-line import/no-deprecated\n\trouter: IFluidRouter,\n\turl: string | IRequest,\n): Promise<T> {\n\tconst request = typeof url === \"string\" ? { url } : url;\n\tconst response = await router.request(request);\n\n\tif (response.status !== 200 || response.mimeType !== \"fluid/object\") {\n\t\tthrow responseToException(response, request);\n\t}\n\n\tassert(response.value, 0x19a /* \"Invalid response value for Fluid object request\" */);\n\treturn response.value as T;\n}\n\nexport const create404Response = (request: IRequest) =>\n\tcreateResponseError(404, \"not found\", request);\n\nexport function createResponseError(\n\tstatus: number,\n\tvalue: string,\n\trequest: IRequest,\n\theaders?: { [key: string]: any },\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// Capture error objects, not stack itself, as stack retrieval is very expensive operation, so we delay it\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\nexport type Factory = IFluidDataStoreFactory & Partial<IProvideFluidDataStoreRegistry>;\n\nexport function createDataStoreFactory(\n\ttype: string,\n\tfactory: Factory | Promise<Factory>,\n): IFluidDataStoreFactory & IFluidDataStoreRegistry {\n\treturn {\n\t\ttype,\n\t\tget IFluidDataStoreFactory() {\n\t\t\treturn this;\n\t\t},\n\t\tget IFluidDataStoreRegistry() {\n\t\t\treturn this;\n\t\t},\n\t\tinstantiateDataStore: async (context, existing) =>\n\t\t\t(await factory).instantiateDataStore(context, existing),\n\t\tget: async (name: string) => (await factory).IFluidDataStoreRegistry?.get(name),\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"objectstoragepartition.d.ts","sourceRoot":"","sources":["../src/objectstoragepartition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E;;GAEG;AACH,qBAAa,sBAAuB,YAAW,sBAAsB;IACxD,OAAO,CAAC,QAAQ,CAAC,OAAO;IAA0B,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAtD,OAAO,EAAE,sBAAsB,EAAmB,IAAI,EAAE,MAAM;IAK9E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIhD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAGlD"}
1
+ {"version":3,"file":"objectstoragepartition.d.ts","sourceRoot":"","sources":["../src/objectstoragepartition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E;;GAEG;AACH,qBAAa,sBAAuB,YAAW,sBAAsB;IAEnE,OAAO,CAAC,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poration and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IChannelStorageService } from \"@fluidframework/datastore-definitions\";\n\n/**\n * Returns a new IChannelStorageService that resolves the given `path` as root.\n */\nexport class ObjectStoragePartition implements IChannelStorageService {\n\tconstructor(private readonly storage: IChannelStorageService, private readonly path: string) {\n\t\t// `path` must not include the trailing separator.\n\t\tassert(!path.endsWith(\"/\"), 0x19c /* \"storage service path has trailing separator\" */);\n\t}\n\n\tpublic async readBlob(path: string): Promise<ArrayBufferLike> {\n\t\treturn this.storage.readBlob(`${this.path}/${path}`);\n\t}\n\n\tpublic async contains(path: string): Promise<boolean> {\n\t\treturn this.storage.contains(`${this.path}/${path}`);\n\t}\n\n\tpublic async list(path: string): Promise<string[]> {\n\t\treturn this.storage.list(`${this.path}/${path}`);\n\t}\n}\n"]}
1
+ {"version":3,"file":"objectstoragepartition.js","sourceRoot":"","sources":["../src/objectstoragepartition.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAGpD;;GAEG;AACH,MAAa,sBAAsB;IAClC,YACkB,OAA+B,EAC/B,IAAY;QADZ,YAAO,GAAP,OAAO,CAAwB;QAC/B,SAAI,GAAJ,IAAI,CAAQ;QAE7B,kDAAkD;QAClD,IAAA,mBAAM,EAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACxF,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,IAAY;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,IAAY;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,IAAY;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC;CACD;AApBD,wDAoBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IChannelStorageService } from \"@fluidframework/datastore-definitions\";\n\n/**\n * Returns a new IChannelStorageService that resolves the given `path` as root.\n */\nexport class ObjectStoragePartition implements IChannelStorageService {\n\tconstructor(\n\t\tprivate readonly storage: IChannelStorageService,\n\t\tprivate readonly path: string,\n\t) {\n\t\t// `path` must not include the trailing separator.\n\t\tassert(!path.endsWith(\"/\"), 0x19c /* \"storage service path has trailing separator\" */);\n\t}\n\n\tpublic async readBlob(path: string): Promise<ArrayBufferLike> {\n\t\treturn this.storage.readBlob(`${this.path}/${path}`);\n\t}\n\n\tpublic async contains(path: string): Promise<boolean> {\n\t\treturn this.storage.contains(`${this.path}/${path}`);\n\t}\n\n\tpublic async list(path: string): Promise<string[]> {\n\t\treturn this.storage.list(`${this.path}/${path}`);\n\t}\n}\n"]}
@@ -5,11 +5,6 @@ exports.RequestParser = void 0;
5
5
  * The Request Parser takes an IRequest provides parsing and sub request creation
6
6
  */
7
7
  class RequestParser {
8
- constructor(request) {
9
- this.request = request;
10
- const queryStartIndex = this.request.url.indexOf("?");
11
- this.query = queryStartIndex >= 0 ? this.request.url.substring(queryStartIndex) : "";
12
- }
13
8
  /**
14
9
  * Splits the path of the url and decodes each path part
15
10
  * @param url - the url to get path parts of
@@ -33,6 +28,11 @@ class RequestParser {
33
28
  }
34
29
  return new RequestParser(request);
35
30
  }
31
+ constructor(request) {
32
+ this.request = request;
33
+ const queryStartIndex = this.request.url.indexOf("?");
34
+ this.query = queryStartIndex >= 0 ? this.request.url.substring(queryStartIndex) : "";
35
+ }
36
36
  get url() {
37
37
  return this.request.url;
38
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"requestParser.js","sourceRoot":"","sources":["../src/requestParser.ts"],"names":[],"mappings":";;;AAMA;;GAEG;AACH,MAAa,aAAa;IA6BzB,YAAuC,OAA2B;QAA3B,YAAO,GAAP,OAAO,CAAoB;QACjE,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK,GAAG,eAAe,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtF,CAAC;IA/BD;;;OAGG;IACI,MAAM,CAAC,YAAY,CAAC,GAAW;QACrC,MAAM,eAAe,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACzC,OAAO,GAAG;aACR,SAAS,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC;aAChE,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;YAC5B,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;gBACtC,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC;aAChC;YACD,OAAO,EAAE,CAAC;QACX,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IAKM,MAAM,CAAC,MAAM,CAAC,OAA2B;QAC/C,sBAAsB;QACtB,IAAI,OAAO,YAAY,aAAa,EAAE;YACrC,OAAO,OAAO,CAAC;SACf;QACD,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAOD,IAAW,GAAG;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,G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AAC;CACD;AAzFD,sCAyFC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IRequest, IRequestHeader } from \"@fluidframework/core-interfaces\";\n\n/**\n * The Request Parser takes an IRequest provides parsing and sub request creation\n */\nexport class RequestParser implements IRequest {\n\t/**\n\t * Splits the path of the url and decodes each path part\n\t * @param url - the url to get path parts of\n\t */\n\tpublic static getPathParts(url: string): readonly string[] {\n\t\tconst queryStartIndex = url.indexOf(\"?\");\n\t\treturn url\n\t\t\t.substring(0, queryStartIndex < 0 ? url.length : queryStartIndex)\n\t\t\t.split(\"/\")\n\t\t\t.reduce<string[]>((pv, cv) => {\n\t\t\t\tif (cv !== undefined && cv.length > 0) {\n\t\t\t\t\tpv.push(decodeURIComponent(cv));\n\t\t\t\t}\n\t\t\t\treturn pv;\n\t\t\t}, []);\n\t}\n\n\tprivate requestPathParts: readonly string[] | undefined;\n\tpublic readonly query: string;\n\n\tpublic static create(request: Readonly<IRequest>) {\n\t\t// Perf optimizations.\n\t\tif (request instanceof RequestParser) {\n\t\t\treturn request;\n\t\t}\n\t\treturn new RequestParser(request);\n\t}\n\n\tprotected constructor(private readonly request: Readonly<IRequest>) {\n\t\tconst queryStartIndex = this.request.url.indexOf(\"?\");\n\t\tthis.query = queryStartIndex >= 0 ? this.request.url.substring(queryStartIndex) : \"\";\n\t}\n\n\tpublic get url(): string {\n\t\treturn this.request.url;\n\t}\n\n\tpublic get headers(): IRequestHeader | undefined {\n\t\treturn this.request.headers;\n\t}\n\n\t/**\n\t * Returns the decoded path parts of the request's url\n\t */\n\tpublic get pathParts(): readonly string[] {\n\t\tif (this.requestPathParts === undefined) {\n\t\t\tthis.requestPathParts = RequestParser.getPathParts(this.url);\n\t\t}\n\t\treturn this.requestPathParts;\n\t}\n\n\t/**\n\t * Returns true if it's a terminating path, i.e. no more elements after `elements` entries and empty query.\n\t * @param elements - number of elements in path\n\t */\n\tpublic isLeaf(elements: number) {\n\t\treturn this.query === \"\" && this.pathParts.length === elements;\n\t}\n\n\t/**\n\t * Creates a sub request starting at a specific path part of this request's url\n\t * The sub request url always has a leading slash, and always include query params if original url has any\n\t * e.g. original url is /a/b/?queryParams, createSubRequest(0) is /a/b/?queryParams\n\t * createSubRequest(1) is /b/?queryParams\n\t * createSubRequest(2) is /?queryParams\n\t * createSubRequest(n) where n is bigger than parts length, e.g. 2, or n is less than 0 will throw an exception\n\t *\n\t * note: query params are not counted towards path parts.\n\t *\n\t * @param startingPathIndex - The index of the first path part of the sub request\n\t */\n\tpublic createSubRequest(startingPathIndex: number): IRequest {\n\t\tconst pathLen = this.pathParts.length;\n\t\tif (startingPathIndex < 0 || startingPathIndex > pathLen) {\n\t\t\tthrow new Error(\"incorrect sub-request\");\n\t\t}\n\t\tif (startingPathIndex === pathLen && this.url.includes(\"?\")) {\n\t\t\treturn {\n\t\t\t\turl: `/${this.query}`,\n\t\t\t\theaders: this.headers,\n\t\t\t};\n\t\t}\n\t\tconst path = `/${this.pathParts.slice(startingPathIndex).join(\"/\")}`;\n\t\treturn {\n\t\t\turl: this.query === \"\" ? path : `${path}/${this.query}`,\n\t\t\theaders: this.headers,\n\t\t};\n\t}\n}\n"]}
1
+ {"version":3,"file":"requestParser.js","sourceRoot":"","sources":["../src/requestParser.ts"],"names":[],"mappings":";;;AAMA;;GAEG;AACH,MAAa,aAAa;IACzB;;;OAGG;IACI,MAAM,CAAC,YAAY,CAAC,GAAW;QACrC,MAAM,eAAe,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACzC,OAAO,GAAG;aACR,SAAS,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC;aAChE,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;YAC5B,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,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AAyB;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACtC,IAAI,iBAAiB,GAAG,CAAC,IAAI,iBAAiB,GAAG,OAAO,EAAE;YACzD,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;SACzC;QACD,IAAI,iBAAiB,KAAK,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC5D,OAAO;gBACN,GAAG,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;gBACrB,OAAO,EAAE,IAAI,CAAC,OAAO;aACrB,CAAC;SACF;QACD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACrE,OAAO;YACN,GAAG,EAAE,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;YACvD,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAC;IACH,CAAC;CACD;AAzFD,sCAyFC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IRequest, IRequestHeader } from \"@fluidframework/core-interfaces\";\n\n/**\n * The Request Parser takes an IRequest provides parsing and sub request creation\n */\nexport class RequestParser implements IRequest {\n\t/**\n\t * Splits the path of the url and decodes each path part\n\t * @param url - the url to get path parts of\n\t */\n\tpublic static getPathParts(url: string): readonly string[] {\n\t\tconst queryStartIndex = url.indexOf(\"?\");\n\t\treturn url\n\t\t\t.substring(0, queryStartIndex < 0 ? url.length : queryStartIndex)\n\t\t\t.split(\"/\")\n\t\t\t.reduce<string[]>((pv, cv) => {\n\t\t\t\tif (cv !== undefined && cv.length > 0) {\n\t\t\t\t\tpv.push(decodeURIComponent(cv));\n\t\t\t\t}\n\t\t\t\treturn pv;\n\t\t\t}, []);\n\t}\n\n\tprivate requestPathParts: readonly string[] | undefined;\n\tpublic readonly query: string;\n\n\tpublic static create(request: Readonly<IRequest>) {\n\t\t// Perf optimizations.\n\t\tif (request instanceof RequestParser) {\n\t\t\treturn request;\n\t\t}\n\t\treturn new RequestParser(request);\n\t}\n\n\tprotected constructor(private readonly request: Readonly<IRequest>) {\n\t\tconst queryStartIndex = this.request.url.indexOf(\"?\");\n\t\tthis.query = queryStartIndex >= 0 ? this.request.url.substring(queryStartIndex) : \"\";\n\t}\n\n\tpublic get url(): string {\n\t\treturn this.request.url;\n\t}\n\n\tpublic get headers(): IRequestHeader | undefined {\n\t\treturn this.request.headers;\n\t}\n\n\t/**\n\t * Returns the decoded path parts of the request's url\n\t */\n\tpublic get pathParts(): readonly string[] {\n\t\tif (this.requestPathParts === undefined) {\n\t\t\tthis.requestPathParts = RequestParser.getPathParts(this.url);\n\t\t}\n\t\treturn this.requestPathParts;\n\t}\n\n\t/**\n\t * Returns true if it's a terminating path, i.e. no more elements after `elements` entries and empty query.\n\t * @param elements - number of elements in path\n\t */\n\tpublic isLeaf(elements: number) {\n\t\treturn this.query === \"\" && this.pathParts.length === elements;\n\t}\n\n\t/**\n\t * Creates a sub request starting at a specific path part of this request's url\n\t * The sub request url always has a leading slash, and always include query params if original url has any\n\t * e.g. original url is /a/b/?queryParams, createSubRequest(0) is /a/b/?queryParams\n\t * createSubRequest(1) is /b/?queryParams\n\t * createSubRequest(2) is /?queryParams\n\t * createSubRequest(n) where n is bigger than parts length, e.g. 2, or n is less than 0 will throw an exception\n\t *\n\t * note: query params are not counted towards path parts.\n\t *\n\t * @param startingPathIndex - The index of the first path part of the sub request\n\t */\n\tpublic createSubRequest(startingPathIndex: number): IRequest {\n\t\tconst pathLen = this.pathParts.length;\n\t\tif (startingPathIndex < 0 || startingPathIndex > pathLen) {\n\t\t\tthrow new Error(\"incorrect sub-request\");\n\t\t}\n\t\tif (startingPathIndex === pathLen && this.url.includes(\"?\")) {\n\t\t\treturn {\n\t\t\t\turl: `/${this.query}`,\n\t\t\t\theaders: this.headers,\n\t\t\t};\n\t\t}\n\t\tconst path = `/${this.pathParts.slice(startingPathIndex).join(\"/\")}`;\n\t\treturn {\n\t\t\turl: this.query === \"\" ? path : `${path}/${this.query}`,\n\t\t\theaders: this.headers,\n\t\t};\n\t}\n}\n"]}
@@ -0,0 +1,220 @@
1
+ import { FluidObject } from '@fluidframework/core-interfaces';
2
+ import { IChannelStorageService } from '@fluidframework/datastore-definitions';
3
+ import { IContainerContext } from '@fluidframework/container-definitions';
4
+ import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
5
+ import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
6
+ import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
7
+ import { IFluidHandleContext } from '@fluidframework/core-interfaces';
8
+ import { IFluidRouter } from '@fluidframework/core-interfaces';
9
+ import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
10
+ import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
11
+ import { IRequest } from '@fluidframework/core-interfaces';
12
+ import { IRequestHeader } from '@fluidframework/core-interfaces';
13
+ import { IResponse } from '@fluidframework/core-interfaces';
14
+ import { IRuntime } from '@fluidframework/container-definitions';
15
+ import { IRuntimeFactory } from '@fluidframework/container-definitions';
16
+ import { ISnapshotTree } from '@fluidframework/protocol-definitions';
17
+ import { ISummarizeResult } from '@fluidframework/runtime-definitions';
18
+ import { ISummaryBlob } from '@fluidframework/protocol-definitions';
19
+ import { ISummaryStats } from '@fluidframework/runtime-definitions';
20
+ import { ISummaryTree } from '@fluidframework/protocol-definitions';
21
+ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
22
+ import { ITelemetryContext } from '@fluidframework/runtime-definitions';
23
+ import { ITree } from '@fluidframework/protocol-definitions';
24
+ import { SummaryObject } from '@fluidframework/protocol-definitions';
25
+ import { SummaryType } from '@fluidframework/protocol-definitions';
26
+ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
27
+
28
+ export declare function addBlobToSummary(summary: ISummaryTreeWithStats, key: string, content: string | Uint8Array): void;
29
+
30
+ export declare function addSummarizeResultToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
31
+
32
+ export declare function addTreeToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
33
+
34
+ export declare function calculateStats(summary: SummaryObject): ISummaryStats;
35
+
36
+ /**
37
+ * Converts ISnapshotTree to ISummaryTree format and tracks stats. This snapshot tree was
38
+ * was taken by serialize api in detached container.
39
+ * @param snapshot - snapshot in ISnapshotTree format
40
+ */
41
+ export declare function convertSnapshotTreeToSummaryTree(snapshot: ISnapshotTree): ISummaryTreeWithStats;
42
+
43
+ /**
44
+ * Converts ISummaryTree to ITree format. This is needed for back-compat while we get rid of snapshot.
45
+ * @param summaryTree - summary tree in ISummaryTree format
46
+ */
47
+ export declare function convertSummaryTreeToITree(summaryTree: ISummaryTree): ITree;
48
+
49
+ /**
50
+ * Converts snapshot ITree to ISummaryTree format and tracks stats.
51
+ * @param snapshot - snapshot in ITree format
52
+ * @param fullTree - true to never use handles, even if id is specified
53
+ */
54
+ export declare function convertToSummaryTree(snapshot: ITree, fullTree?: boolean): ISummarizeResult;
55
+
56
+ /**
57
+ * Converts snapshot ITree to ISummaryTree format and tracks stats.
58
+ * @param snapshot - snapshot in ITree format
59
+ * @param fullTree - true to never use handles, even if id is specified
60
+ */
61
+ export declare function convertToSummaryTreeWithStats(snapshot: ITree, fullTree?: boolean): ISummaryTreeWithStats;
62
+
63
+ export declare const create404Response: (request: IRequest) => IResponse;
64
+
65
+ export declare function createDataStoreFactory(type: string, factory: Factory | Promise<Factory>): IFluidDataStoreFactory & IFluidDataStoreRegistry;
66
+
67
+ export declare function createResponseError(status: number, value: string, request: IRequest, headers?: {
68
+ [key: string]: any;
69
+ }): IResponse;
70
+
71
+ export declare function exceptionToResponse(err: any): IResponse;
72
+
73
+ export declare type Factory = IFluidDataStoreFactory & Partial<IProvideFluidDataStoreRegistry>;
74
+
75
+ /* Excluded from this release type: GCDataBuilder */
76
+
77
+ /**
78
+ * Generates the absolute path for a Fluid object given its path and its parent routeContext.
79
+ * @param path - The path to the Fluid object relative to the route context.
80
+ * @param routeContext - The route context that contains the Fluid object.
81
+ * @returns The absolute path to the Fluid object from the root of the Container.
82
+ */
83
+ export declare function generateHandleContextPath(path: string, routeContext?: IFluidHandleContext): string;
84
+
85
+ export declare function getBlobSize(content: ISummaryBlob["content"]): number;
86
+
87
+ export declare function getNormalizedObjectStoragePathParts(path: string): string[];
88
+
89
+ export declare function listBlobsAtTreePath(inputTree: ITree | undefined, path: string): Promise<string[]>;
90
+
91
+ /**
92
+ * Combines summary stats by adding their totals together.
93
+ * Returns empty stats if called without args.
94
+ * @param stats - stats to merge
95
+ */
96
+ export declare function mergeStats(...stats: ISummaryStats[]): ISummaryStats;
97
+
98
+ /**
99
+ * Returns a new IChannelStorageService that resolves the given `path` as root.
100
+ */
101
+ export declare class ObjectStoragePartition implements IChannelStorageService {
102
+ private readonly storage;
103
+ private readonly path;
104
+ constructor(storage: IChannelStorageService, path: string);
105
+ readBlob(path: string): Promise<ArrayBufferLike>;
106
+ contains(path: string): Promise<boolean>;
107
+ list(path: string): Promise<string[]>;
108
+ }
109
+
110
+ /** Reads a blob from storage and parses it from JSON. */
111
+ export declare type ReadAndParseBlob = <T>(id: string) => Promise<T>;
112
+
113
+ /**
114
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
115
+ */
116
+ export declare function requestFluidObject<T = FluidObject>(router: IFluidRouter, url: string | IRequest): Promise<T>;
117
+
118
+ /**
119
+ * The Request Parser takes an IRequest provides parsing and sub request creation
120
+ */
121
+ export declare class RequestParser implements IRequest {
122
+ private readonly request;
123
+ /**
124
+ * Splits the path of the url and decodes each path part
125
+ * @param url - the url to get path parts of
126
+ */
127
+ static getPathParts(url: string): readonly string[];
128
+ private requestPathParts;
129
+ readonly query: string;
130
+ static create(request: Readonly<IRequest>): RequestParser;
131
+ protected constructor(request: Readonly<IRequest>);
132
+ get url(): string;
133
+ get headers(): IRequestHeader | undefined;
134
+ /**
135
+ * Returns the decoded path parts of the request's url
136
+ */
137
+ get pathParts(): readonly string[];
138
+ /**
139
+ * Returns true if it's a terminating path, i.e. no more elements after `elements` entries and empty query.
140
+ * @param elements - number of elements in path
141
+ */
142
+ isLeaf(elements: number): boolean;
143
+ /**
144
+ * Creates a sub request starting at a specific path part of this request's url
145
+ * The sub request url always has a leading slash, and always include query params if original url has any
146
+ * e.g. original url is /a/b/?queryParams, createSubRequest(0) is /a/b/?queryParams
147
+ * createSubRequest(1) is /b/?queryParams
148
+ * createSubRequest(2) is /?queryParams
149
+ * createSubRequest(n) where n is bigger than parts length, e.g. 2, or n is less than 0 will throw an exception
150
+ *
151
+ * note: query params are not counted towards path parts.
152
+ *
153
+ * @param startingPathIndex - The index of the first path part of the sub request
154
+ */
155
+ createSubRequest(startingPathIndex: number): IRequest;
156
+ }
157
+
158
+ export declare function responseToException(response: IResponse, request: IRequest): Error;
159
+
160
+ export declare abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
161
+ get IRuntimeFactory(): this;
162
+ instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
163
+ abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;
164
+ instantiateFirstTime(_runtime: T): Promise<void>;
165
+ instantiateFromExisting(_runtime: T): Promise<void>;
166
+ hasInitialized(_runtime: T): Promise<void>;
167
+ }
168
+
169
+ /**
170
+ * Fetches the sequence number of the snapshot tree by examining the protocol.
171
+ * @param tree - snapshot tree to examine
172
+ * @param readAndParseBlob - function to read blob contents from storage
173
+ * and parse the result from JSON.
174
+ */
175
+ export declare function seqFromTree(tree: ISnapshotTree, readAndParseBlob: ReadAndParseBlob): Promise<number>;
176
+
177
+ export declare class SummaryTreeBuilder implements ISummaryTreeWithStats {
178
+ private attachmentCounter;
179
+ get summary(): ISummaryTree;
180
+ get stats(): Readonly<ISummaryStats>;
181
+ constructor();
182
+ private readonly summaryTree;
183
+ private summaryStats;
184
+ addBlob(key: string, content: string | Uint8Array): void;
185
+ addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void;
186
+ addWithStats(key: string, summarizeResult: ISummarizeResult): void;
187
+ addAttachment(id: string): void;
188
+ getSummaryTree(): ISummaryTreeWithStats;
189
+ }
190
+
191
+ export declare class TelemetryContext implements ITelemetryContext {
192
+ private readonly telemetry;
193
+ /**
194
+ * {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.set}
195
+ */
196
+ set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
197
+ /**
198
+ * {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.setMultiple}
199
+ */
200
+ setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
201
+ /**
202
+ * {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.get}
203
+ */
204
+ get(prefix: string, property: string): TelemetryEventPropertyType;
205
+ /**
206
+ * {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.serialize}
207
+ */
208
+ serialize(): string;
209
+ }
210
+
211
+ /**
212
+ * Helper function that unpacks the used routes of children from a given node's used routes.
213
+ * @param usedRoutes - The used routes of a node.
214
+ * @returns A map of used routes of each children of the the given node.
215
+ */
216
+ export declare function unpackChildNodesUsedRoutes(usedRoutes: string[]): Map<string, string[]>;
217
+
218
+ export declare function utf8ByteLength(str: string): number;
219
+
220
+ export { }