@fluidframework/request-handler 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.216897
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/api-extractor-lint.json +13 -0
- package/api-report/request-handler.api.md +6 -6
- package/dist/request-handler-alpha.d.ts +21 -63
- package/dist/request-handler-beta.d.ts +21 -63
- package/dist/request-handler-public.d.ts +21 -63
- package/dist/request-handler-untrimmed.d.ts +6 -12
- package/dist/requestHandlers.cjs +3 -6
- package/dist/requestHandlers.cjs.map +1 -1
- package/dist/requestHandlers.d.ts +4 -8
- package/dist/requestHandlers.d.ts.map +1 -1
- package/dist/runtimeRequestHandlerBuilder.cjs +2 -4
- package/dist/runtimeRequestHandlerBuilder.cjs.map +1 -1
- package/dist/runtimeRequestHandlerBuilder.d.ts +2 -4
- package/dist/runtimeRequestHandlerBuilder.d.ts.map +1 -1
- package/lib/request-handler-alpha.d.ts +21 -63
- package/lib/request-handler-beta.d.ts +21 -63
- package/lib/request-handler-public.d.ts +21 -63
- package/lib/request-handler-untrimmed.d.ts +6 -12
- package/lib/requestHandlers.d.ts +4 -8
- package/lib/requestHandlers.d.ts.map +1 -1
- package/lib/requestHandlers.mjs +3 -6
- package/lib/requestHandlers.mjs.map +1 -1
- package/lib/runtimeRequestHandlerBuilder.d.ts +2 -4
- package/lib/runtimeRequestHandlerBuilder.d.ts.map +1 -1
- package/lib/runtimeRequestHandlerBuilder.mjs +2 -4
- package/lib/runtimeRequestHandlerBuilder.mjs.map +1 -1
- package/package.json +10 -9
- package/src/requestHandlers.ts +4 -8
- package/src/runtimeRequestHandlerBuilder.ts +2 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-lint.json",
|
|
4
|
+
"messages": {
|
|
5
|
+
"extractorMessageReporting": {
|
|
6
|
+
// TODO: remove once base config has this enabled as an error
|
|
7
|
+
"ae-incompatible-release-tags": {
|
|
8
|
+
"logLevel": "error",
|
|
9
|
+
"addToApiReportFile": false
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -13,26 +13,26 @@ import { IRequest } from '@fluidframework/core-interfaces';
|
|
|
13
13
|
import { IResponse } from '@fluidframework/core-interfaces';
|
|
14
14
|
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
15
15
|
|
|
16
|
-
// @
|
|
16
|
+
// @internal @deprecated (undocumented)
|
|
17
17
|
export function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
18
18
|
|
|
19
|
-
// @
|
|
19
|
+
// @internal @deprecated (undocumented)
|
|
20
20
|
export const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
21
21
|
status: 200;
|
|
22
22
|
mimeType: "fluid/object";
|
|
23
23
|
value: FluidObject;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
// @
|
|
26
|
+
// @internal @deprecated (undocumented)
|
|
27
27
|
export function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
28
28
|
|
|
29
|
-
// @
|
|
29
|
+
// @internal @deprecated
|
|
30
30
|
export const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
31
31
|
|
|
32
|
-
// @
|
|
32
|
+
// @internal @deprecated
|
|
33
33
|
export type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
34
34
|
|
|
35
|
-
// @
|
|
35
|
+
// @internal @deprecated
|
|
36
36
|
export class RuntimeRequestHandlerBuilder {
|
|
37
37
|
// (undocumented)
|
|
38
38
|
handleRequest(request: IRequest, runtime: IContainerRuntime): Promise<IResponse>;
|
|
@@ -1,71 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
3
|
-
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
4
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
5
|
-
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
1
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
3
|
+
/* Excluded from this release type: createFluidObjectResponse */
|
|
16
4
|
|
|
17
|
-
|
|
18
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
23
|
-
status: 200;
|
|
24
|
-
mimeType: "fluid/object";
|
|
25
|
-
value: FluidObject;
|
|
26
|
-
};
|
|
5
|
+
/* Excluded from this release type: FluidObject */
|
|
27
6
|
|
|
28
|
-
|
|
29
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
7
|
+
/* Excluded from this release type: handleFromLegacyUri */
|
|
34
8
|
|
|
35
|
-
|
|
36
|
-
* A request handler to expose access to all root data stores in the container by id.
|
|
37
|
-
* @param request - the request for the root data store. The first path part must be the data store's ID.
|
|
38
|
-
* @param runtime - the container runtime
|
|
39
|
-
* @returns the result of the request
|
|
40
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
9
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
45
10
|
|
|
46
|
-
|
|
47
|
-
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
48
|
-
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
49
|
-
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
50
|
-
* the route, or fulling the specific request.
|
|
51
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
11
|
+
/* Excluded from this release type: IContainerRuntimeBase */
|
|
56
12
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
13
|
+
/* Excluded from this release type: IFluidHandle */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: IFluidLoadable */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IRequest */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IResponse */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: RequestParser */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: rootDataStoreRequestHandler */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: RuntimeRequestHandlerBuilder */
|
|
70
28
|
|
|
71
29
|
export { }
|
|
@@ -1,71 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
3
|
-
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
4
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
5
|
-
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
1
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
3
|
+
/* Excluded from this release type: createFluidObjectResponse */
|
|
16
4
|
|
|
17
|
-
|
|
18
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
23
|
-
status: 200;
|
|
24
|
-
mimeType: "fluid/object";
|
|
25
|
-
value: FluidObject;
|
|
26
|
-
};
|
|
5
|
+
/* Excluded from this release type: FluidObject */
|
|
27
6
|
|
|
28
|
-
|
|
29
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
7
|
+
/* Excluded from this release type: handleFromLegacyUri */
|
|
34
8
|
|
|
35
|
-
|
|
36
|
-
* A request handler to expose access to all root data stores in the container by id.
|
|
37
|
-
* @param request - the request for the root data store. The first path part must be the data store's ID.
|
|
38
|
-
* @param runtime - the container runtime
|
|
39
|
-
* @returns the result of the request
|
|
40
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
9
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
45
10
|
|
|
46
|
-
|
|
47
|
-
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
48
|
-
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
49
|
-
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
50
|
-
* the route, or fulling the specific request.
|
|
51
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
11
|
+
/* Excluded from this release type: IContainerRuntimeBase */
|
|
56
12
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
13
|
+
/* Excluded from this release type: IFluidHandle */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: IFluidLoadable */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IRequest */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IResponse */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: RequestParser */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: rootDataStoreRequestHandler */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: RuntimeRequestHandlerBuilder */
|
|
70
28
|
|
|
71
29
|
export { }
|
|
@@ -1,71 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
3
|
-
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
4
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
5
|
-
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
1
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
3
|
+
/* Excluded from this release type: createFluidObjectResponse */
|
|
16
4
|
|
|
17
|
-
|
|
18
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
23
|
-
status: 200;
|
|
24
|
-
mimeType: "fluid/object";
|
|
25
|
-
value: FluidObject;
|
|
26
|
-
};
|
|
5
|
+
/* Excluded from this release type: FluidObject */
|
|
27
6
|
|
|
28
|
-
|
|
29
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
7
|
+
/* Excluded from this release type: handleFromLegacyUri */
|
|
34
8
|
|
|
35
|
-
|
|
36
|
-
* A request handler to expose access to all root data stores in the container by id.
|
|
37
|
-
* @param request - the request for the root data store. The first path part must be the data store's ID.
|
|
38
|
-
* @param runtime - the container runtime
|
|
39
|
-
* @returns the result of the request
|
|
40
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
9
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
45
10
|
|
|
46
|
-
|
|
47
|
-
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
48
|
-
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
49
|
-
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
50
|
-
* the route, or fulling the specific request.
|
|
51
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
11
|
+
/* Excluded from this release type: IContainerRuntimeBase */
|
|
56
12
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
13
|
+
/* Excluded from this release type: IFluidHandle */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: IFluidLoadable */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IRequest */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IResponse */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: RequestParser */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: rootDataStoreRequestHandler */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: RuntimeRequestHandlerBuilder */
|
|
70
28
|
|
|
71
29
|
export { }
|
|
@@ -9,15 +9,13 @@ import { RequestParser } from '@fluidframework/runtime-utils';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
12
|
+
* @internal
|
|
14
13
|
*/
|
|
15
14
|
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
18
|
+
* @internal
|
|
21
19
|
*/
|
|
22
20
|
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
23
21
|
status: 200;
|
|
@@ -27,8 +25,7 @@ export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
|
27
25
|
|
|
28
26
|
/**
|
|
29
27
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
28
|
+
* @internal
|
|
32
29
|
*/
|
|
33
30
|
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
34
31
|
|
|
@@ -38,8 +35,7 @@ export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(ur
|
|
|
38
35
|
* @param runtime - the container runtime
|
|
39
36
|
* @returns the result of the request
|
|
40
37
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
38
|
+
* @internal
|
|
43
39
|
*/
|
|
44
40
|
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
45
41
|
|
|
@@ -49,8 +45,7 @@ export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: I
|
|
|
49
45
|
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
50
46
|
* the route, or fulling the specific request.
|
|
51
47
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
48
|
+
* @internal
|
|
54
49
|
*/
|
|
55
50
|
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
56
51
|
|
|
@@ -59,8 +54,7 @@ export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IC
|
|
|
59
54
|
* The provided handlers sequentially applied until one is able to satisfy the request.
|
|
60
55
|
*
|
|
61
56
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
62
|
-
*
|
|
63
|
-
* @public
|
|
57
|
+
* @internal
|
|
64
58
|
*/
|
|
65
59
|
export declare class RuntimeRequestHandlerBuilder {
|
|
66
60
|
private readonly handlers;
|
package/dist/requestHandlers.cjs
CHANGED
|
@@ -13,8 +13,7 @@ const runtime_utils_1 = require("@fluidframework/runtime-utils");
|
|
|
13
13
|
* @param runtime - the container runtime
|
|
14
14
|
* @returns the result of the request
|
|
15
15
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
16
|
-
*
|
|
17
|
-
* @public
|
|
16
|
+
* @internal
|
|
18
17
|
*/
|
|
19
18
|
const rootDataStoreRequestHandler = async (request, runtime) => {
|
|
20
19
|
const requestParser = runtime_utils_1.RequestParser.create(request);
|
|
@@ -39,8 +38,7 @@ const rootDataStoreRequestHandler = async (request, runtime) => {
|
|
|
39
38
|
exports.rootDataStoreRequestHandler = rootDataStoreRequestHandler;
|
|
40
39
|
/**
|
|
41
40
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
41
|
+
* @internal
|
|
44
42
|
*/
|
|
45
43
|
const createFluidObjectResponse = (fluidObject) => {
|
|
46
44
|
return { status: 200, mimeType: "fluid/object", value: fluidObject };
|
|
@@ -74,8 +72,7 @@ class LegacyUriHandle {
|
|
|
74
72
|
}
|
|
75
73
|
/**
|
|
76
74
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
77
|
-
*
|
|
78
|
-
* @public
|
|
75
|
+
* @internal
|
|
79
76
|
*/
|
|
80
77
|
function handleFromLegacyUri(uri, runtime) {
|
|
81
78
|
return new LegacyUriHandle(uri, runtime);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestHandlers.cjs","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAYpD,iEAA8D;
|
|
1
|
+
{"version":3,"file":"requestHandlers.cjs","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAYpD,iEAA8D;AAe9D;;;;;;;GAOG;AACI,MAAM,2BAA2B,GAAG,KAAK,EAC/C,OAAiB,EACjB,OAA0B,EACzB,EAAE;IACH,MAAM,aAAa,GAAG,6BAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,EAAE,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,OAAO,OAAO,CAAC,OAAO,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3F,gDAAgD;IAChD,IAAI,aAA2B,CAAC;IAChC,IAAI;QACH,mEAAmE;QACnE,aAAa,GAAG,MAAM,OAAO,CAAC,gBAAgB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;KACzD;IAAC,OAAO,KAAK,EAAE;QACf,OAAO,SAAS,CAAC,CAAC,kBAAkB;KACpC;IACD,IAAI;QACH,OAAO,MAAM,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;KACnF;IAAC,OAAO,KAAK,EAAE;QACf,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;KAC/D;AACF,CAAC,CAAC;AApBW,QAAA,2BAA2B,+BAoBtC;AAEF;;;GAGG;AACI,MAAM,yBAAyB,GAAG,CACxC,WAAwB,EACwC,EAAE;IAClE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AACtE,CAAC,CAAC;AAJW,QAAA,yBAAyB,6BAIpC;AAEF,MAAM,eAAe;IAGpB,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,YACiB,YAAY,EACZ,OAA8B;QAD9B,iBAAY,GAAZ,YAAY,CAAA;QACZ,YAAO,GAAP,OAAO,CAAuB;QAR/B,eAAU,GAAG,IAAI,CAAC;IAS/B,CAAC;IAEG,WAAW;QACjB,IAAA,mBAAM,EAAC,KAAK,EAAE,KAAK,CAAC,0CAA0C,CAAC,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,GAAG;QACf,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,aAAa,CAAC;YACrE,GAAG,EAAE,IAAI,CAAC,YAAY;SACtB,CAAC,CAAC;QACH,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,QAAQ,KAAK,cAAc,EAAE;YACpE,+DAA+D;YAC/D,OAAO,QAAQ,CAAC,KAAK,CAAC;SACtB;QACD,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IAC1E,CAAC;IAEM,IAAI,CAAC,MAAoB;QAC/B,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACnD,CAAC;CACD;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAClC,GAAW,EACX,OAA8B;IAE9B,OAAO,IAAI,eAAe,CAAI,GAAG,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC;AALD,kDAKC","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 {\n\tIResponse,\n\tIRequest,\n\tIFluidHandle,\n\tIFluidLoadable,\n\tFluidObject,\n\t// eslint-disable-next-line import/no-deprecated\n\tIFluidRouter,\n} from \"@fluidframework/core-interfaces\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IContainerRuntimeBase } from \"@fluidframework/runtime-definitions\";\nimport { RequestParser } from \"@fluidframework/runtime-utils\";\n\n/**\n * A request handler for the container runtime. Each handler should handle a specific request, and return undefined\n * if it does not apply. These handlers are called in series, so there may be other handlers before or after.\n * A handler should only return error if the request is for a route the handler owns, and there is a problem with\n * the route, or fulling the specific request.\n * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n * @internal\n */\nexport type RuntimeRequestHandler = (\n\trequest: RequestParser,\n\truntime: IContainerRuntime,\n) => Promise<IResponse | undefined>;\n\n/**\n * A request handler to expose access to all root data stores in the container by id.\n * @param request - the request for the root data store. The first path part must be the data store's ID.\n * @param runtime - the container runtime\n * @returns the result of the request\n * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n * @internal\n */\nexport const rootDataStoreRequestHandler = async (\n\trequest: IRequest,\n\truntime: IContainerRuntime,\n) => {\n\tconst requestParser = RequestParser.create(request);\n\tconst id = requestParser.pathParts[0];\n\tconst wait = typeof request.headers?.wait === \"boolean\" ? request.headers.wait : undefined;\n\t// eslint-disable-next-line import/no-deprecated\n\tlet rootDataStore: IFluidRouter;\n\ttry {\n\t\t// getRootDataStore currently throws if the data store is not found\n\t\trootDataStore = await runtime.getRootDataStore(id, wait);\n\t} catch (error) {\n\t\treturn undefined; // continue search\n\t}\n\ttry {\n\t\treturn await rootDataStore.IFluidRouter.request(requestParser.createSubRequest(1));\n\t} catch (error) {\n\t\treturn { status: 500, mimeType: \"fluid/object\", value: error };\n\t}\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 * @internal\n */\nexport const createFluidObjectResponse = (\n\tfluidObject: FluidObject,\n): { status: 200; mimeType: \"fluid/object\"; value: FluidObject } => {\n\treturn { status: 200, mimeType: \"fluid/object\", value: fluidObject };\n};\n\nclass LegacyUriHandle<T = FluidObject & IFluidLoadable> implements IFluidHandle<T> {\n\tpublic readonly isAttached = true;\n\n\tpublic get IFluidHandle(): IFluidHandle {\n\t\treturn this;\n\t}\n\n\tpublic constructor(\n\t\tpublic readonly absolutePath,\n\t\tpublic readonly runtime: IContainerRuntimeBase,\n\t) {}\n\n\tpublic attachGraph() {\n\t\tassert(false, 0x0ca /* \"Trying to use legacy graph attach!\" */);\n\t}\n\n\tpublic async get(): Promise<any> {\n\t\tconst response = await this.runtime.IFluidHandleContext.resolveHandle({\n\t\t\turl: this.absolutePath,\n\t\t});\n\t\tif (response.status === 200 && response.mimeType === \"fluid/object\") {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn response.value;\n\t\t}\n\t\tthrow new Error(`Failed to resolve container path ${this.absolutePath}`);\n\t}\n\n\tpublic bind(handle: IFluidHandle) {\n\t\tthrow new Error(\"Cannot bind to LegacyUriHandle\");\n\t}\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 * @internal\n */\nexport function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(\n\turi: string,\n\truntime: IContainerRuntimeBase,\n): IFluidHandle<T> {\n\treturn new LegacyUriHandle<T>(uri, runtime);\n}\n"]}
|
|
@@ -12,8 +12,7 @@ import { RequestParser } from "@fluidframework/runtime-utils";
|
|
|
12
12
|
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
13
13
|
* the route, or fulling the specific request.
|
|
14
14
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
15
|
-
*
|
|
16
|
-
* @public
|
|
15
|
+
* @internal
|
|
17
16
|
*/
|
|
18
17
|
export type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
19
18
|
/**
|
|
@@ -22,14 +21,12 @@ export type RuntimeRequestHandler = (request: RequestParser, runtime: IContainer
|
|
|
22
21
|
* @param runtime - the container runtime
|
|
23
22
|
* @returns the result of the request
|
|
24
23
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
24
|
+
* @internal
|
|
27
25
|
*/
|
|
28
26
|
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
29
27
|
/**
|
|
30
28
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
29
|
+
* @internal
|
|
33
30
|
*/
|
|
34
31
|
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
35
32
|
status: 200;
|
|
@@ -38,8 +35,7 @@ export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
|
38
35
|
};
|
|
39
36
|
/**
|
|
40
37
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
38
|
+
* @internal
|
|
43
39
|
*/
|
|
44
40
|
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
45
41
|
//# sourceMappingURL=requestHandlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestHandlers.d.ts","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,WAAW,EAGX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D
|
|
1
|
+
{"version":3,"file":"requestHandlers.d.ts","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,WAAW,EAGX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,CACnC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,iBAAiB,KACtB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;AAEpC;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,YAC9B,QAAQ,WACR,iBAAiB,mCAkB1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,gBACxB,WAAW,KACtB;IAAE,QAAQ,GAAG,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAE7D,CAAC;AAkCF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,GAAG,WAAW,GAAG,cAAc,EACnE,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,qBAAqB,GAC5B,YAAY,CAAC,CAAC,CAAC,CAEjB"}
|
|
@@ -11,8 +11,7 @@ const runtime_utils_1 = require("@fluidframework/runtime-utils");
|
|
|
11
11
|
* The provided handlers sequentially applied until one is able to satisfy the request.
|
|
12
12
|
*
|
|
13
13
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
14
|
+
* @internal
|
|
16
15
|
*/
|
|
17
16
|
class RuntimeRequestHandlerBuilder {
|
|
18
17
|
constructor() {
|
|
@@ -39,8 +38,7 @@ class RuntimeRequestHandlerBuilder {
|
|
|
39
38
|
exports.RuntimeRequestHandlerBuilder = RuntimeRequestHandlerBuilder;
|
|
40
39
|
/**
|
|
41
40
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
41
|
+
* @internal
|
|
44
42
|
*/
|
|
45
43
|
// eslint-disable-next-line import/no-deprecated
|
|
46
44
|
function buildRuntimeRequestHandler(...handlers) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeRequestHandlerBuilder.cjs","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,iEAAiF;AAIjF
|
|
1
|
+
{"version":3,"file":"runtimeRequestHandlerBuilder.cjs","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,iEAAiF;AAIjF;;;;;;GAMG;AACH,MAAa,4BAA4B;IAAzC;QACC,gDAAgD;QAC/B,aAAQ,GAA4B,EAAE,CAAC;IAmBzD,CAAC;IAjBA,gDAAgD;IACzC,WAAW,CAAC,GAAG,QAAiC;QACtD,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;SAChC;IACF,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,OAAiB,EAAE,OAA0B;QACvE,MAAM,MAAM,GAAG,6BAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7C,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACpC,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAChD,IAAI,QAAQ,KAAK,SAAS,EAAE;gBAC3B,OAAO,QAAQ,CAAC;aAChB;SACD;QACD,OAAO,IAAA,iCAAiB,EAAC,OAAO,CAAC,CAAC;IACnC,CAAC;CACD;AArBD,oEAqBC;AAED;;;GAGG;AACH,gDAAgD;AAChD,SAAgB,0BAA0B,CAAC,GAAG,QAAiC;IAC9E,MAAM,OAAO,GAAG,IAAI,4BAA4B,EAAE,CAAC;IACnD,OAAO,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC;IACjC,OAAO,KAAK,EAAE,OAAiB,EAAE,OAA0B,EAAE,EAAE,CAC9D,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC;AALD,gEAKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { RequestParser, create404Response } from \"@fluidframework/runtime-utils\";\n// eslint-disable-next-line import/no-deprecated\nimport { RuntimeRequestHandler } from \"./requestHandlers\";\n\n/**\n * The RuntimeRequestHandlerBuilder creates a runtime request handler based on request handlers.\n * The provided handlers sequentially applied until one is able to satisfy the request.\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 * @internal\n */\nexport class RuntimeRequestHandlerBuilder {\n\t// eslint-disable-next-line import/no-deprecated\n\tprivate readonly handlers: RuntimeRequestHandler[] = [];\n\n\t// eslint-disable-next-line import/no-deprecated\n\tpublic pushHandler(...handlers: RuntimeRequestHandler[]) {\n\t\tif (handlers !== undefined) {\n\t\t\tthis.handlers.push(...handlers);\n\t\t}\n\t}\n\n\tpublic async handleRequest(request: IRequest, runtime: IContainerRuntime): Promise<IResponse> {\n\t\tconst parser = RequestParser.create(request);\n\t\tfor (const handler of this.handlers) {\n\t\t\tconst response = await handler(parser, runtime);\n\t\t\tif (response !== undefined) {\n\t\t\t\treturn response;\n\t\t\t}\n\t\t}\n\t\treturn create404Response(request);\n\t}\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 * @internal\n */\n// eslint-disable-next-line import/no-deprecated\nexport function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]) {\n\tconst builder = new RuntimeRequestHandlerBuilder();\n\tbuilder.pushHandler(...handlers);\n\treturn async (request: IRequest, runtime: IContainerRuntime) =>\n\t\tbuilder.handleRequest(request, runtime);\n}\n"]}
|
|
@@ -10,8 +10,7 @@ import { RuntimeRequestHandler } from "./requestHandlers";
|
|
|
10
10
|
* The provided handlers sequentially applied until one is able to satisfy the request.
|
|
11
11
|
*
|
|
12
12
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
13
|
+
* @internal
|
|
15
14
|
*/
|
|
16
15
|
export declare class RuntimeRequestHandlerBuilder {
|
|
17
16
|
private readonly handlers;
|
|
@@ -20,8 +19,7 @@ export declare class RuntimeRequestHandlerBuilder {
|
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
22
|
+
* @internal
|
|
25
23
|
*/
|
|
26
24
|
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
27
25
|
//# sourceMappingURL=runtimeRequestHandlerBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeRequestHandlerBuilder.d.ts","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"runtimeRequestHandlerBuilder.d.ts","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;GAMG;AACH,qBAAa,4BAA4B;IAExC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IAGjD,WAAW,CAAC,GAAG,QAAQ,EAAE,qBAAqB,EAAE;IAM1C,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC;CAU7F;AAED;;;GAGG;AAEH,wBAAgB,0BAA0B,CAAC,GAAG,QAAQ,EAAE,qBAAqB,EAAE,aAGvD,QAAQ,WAAW,iBAAiB,wBAE3D"}
|
|
@@ -1,71 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
3
|
-
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
4
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
5
|
-
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
1
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
3
|
+
/* Excluded from this release type: createFluidObjectResponse */
|
|
16
4
|
|
|
17
|
-
|
|
18
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
23
|
-
status: 200;
|
|
24
|
-
mimeType: "fluid/object";
|
|
25
|
-
value: FluidObject;
|
|
26
|
-
};
|
|
5
|
+
/* Excluded from this release type: FluidObject */
|
|
27
6
|
|
|
28
|
-
|
|
29
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
7
|
+
/* Excluded from this release type: handleFromLegacyUri */
|
|
34
8
|
|
|
35
|
-
|
|
36
|
-
* A request handler to expose access to all root data stores in the container by id.
|
|
37
|
-
* @param request - the request for the root data store. The first path part must be the data store's ID.
|
|
38
|
-
* @param runtime - the container runtime
|
|
39
|
-
* @returns the result of the request
|
|
40
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
9
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
45
10
|
|
|
46
|
-
|
|
47
|
-
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
48
|
-
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
49
|
-
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
50
|
-
* the route, or fulling the specific request.
|
|
51
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
11
|
+
/* Excluded from this release type: IContainerRuntimeBase */
|
|
56
12
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
13
|
+
/* Excluded from this release type: IFluidHandle */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: IFluidLoadable */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IRequest */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IResponse */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: RequestParser */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: rootDataStoreRequestHandler */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: RuntimeRequestHandlerBuilder */
|
|
70
28
|
|
|
71
29
|
export { }
|
|
@@ -1,71 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
3
|
-
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
4
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
5
|
-
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
1
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
3
|
+
/* Excluded from this release type: createFluidObjectResponse */
|
|
16
4
|
|
|
17
|
-
|
|
18
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
23
|
-
status: 200;
|
|
24
|
-
mimeType: "fluid/object";
|
|
25
|
-
value: FluidObject;
|
|
26
|
-
};
|
|
5
|
+
/* Excluded from this release type: FluidObject */
|
|
27
6
|
|
|
28
|
-
|
|
29
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
7
|
+
/* Excluded from this release type: handleFromLegacyUri */
|
|
34
8
|
|
|
35
|
-
|
|
36
|
-
* A request handler to expose access to all root data stores in the container by id.
|
|
37
|
-
* @param request - the request for the root data store. The first path part must be the data store's ID.
|
|
38
|
-
* @param runtime - the container runtime
|
|
39
|
-
* @returns the result of the request
|
|
40
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
9
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
45
10
|
|
|
46
|
-
|
|
47
|
-
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
48
|
-
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
49
|
-
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
50
|
-
* the route, or fulling the specific request.
|
|
51
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
11
|
+
/* Excluded from this release type: IContainerRuntimeBase */
|
|
56
12
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
13
|
+
/* Excluded from this release type: IFluidHandle */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: IFluidLoadable */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IRequest */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IResponse */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: RequestParser */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: rootDataStoreRequestHandler */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: RuntimeRequestHandlerBuilder */
|
|
70
28
|
|
|
71
29
|
export { }
|
|
@@ -1,71 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
3
|
-
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
4
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
5
|
-
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
1
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
3
|
+
/* Excluded from this release type: createFluidObjectResponse */
|
|
16
4
|
|
|
17
|
-
|
|
18
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
23
|
-
status: 200;
|
|
24
|
-
mimeType: "fluid/object";
|
|
25
|
-
value: FluidObject;
|
|
26
|
-
};
|
|
5
|
+
/* Excluded from this release type: FluidObject */
|
|
27
6
|
|
|
28
|
-
|
|
29
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
7
|
+
/* Excluded from this release type: handleFromLegacyUri */
|
|
34
8
|
|
|
35
|
-
|
|
36
|
-
* A request handler to expose access to all root data stores in the container by id.
|
|
37
|
-
* @param request - the request for the root data store. The first path part must be the data store's ID.
|
|
38
|
-
* @param runtime - the container runtime
|
|
39
|
-
* @returns the result of the request
|
|
40
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
9
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
45
10
|
|
|
46
|
-
|
|
47
|
-
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
48
|
-
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
49
|
-
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
50
|
-
* the route, or fulling the specific request.
|
|
51
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
11
|
+
/* Excluded from this release type: IContainerRuntimeBase */
|
|
56
12
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
13
|
+
/* Excluded from this release type: IFluidHandle */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: IFluidLoadable */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IRequest */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IResponse */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: RequestParser */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: rootDataStoreRequestHandler */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: RuntimeRequestHandlerBuilder */
|
|
70
28
|
|
|
71
29
|
export { }
|
|
@@ -9,15 +9,13 @@ import { RequestParser } from '@fluidframework/runtime-utils';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
12
|
+
* @internal
|
|
14
13
|
*/
|
|
15
14
|
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
18
|
+
* @internal
|
|
21
19
|
*/
|
|
22
20
|
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
23
21
|
status: 200;
|
|
@@ -27,8 +25,7 @@ export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
|
27
25
|
|
|
28
26
|
/**
|
|
29
27
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
28
|
+
* @internal
|
|
32
29
|
*/
|
|
33
30
|
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
34
31
|
|
|
@@ -38,8 +35,7 @@ export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(ur
|
|
|
38
35
|
* @param runtime - the container runtime
|
|
39
36
|
* @returns the result of the request
|
|
40
37
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
38
|
+
* @internal
|
|
43
39
|
*/
|
|
44
40
|
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
45
41
|
|
|
@@ -49,8 +45,7 @@ export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: I
|
|
|
49
45
|
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
50
46
|
* the route, or fulling the specific request.
|
|
51
47
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
48
|
+
* @internal
|
|
54
49
|
*/
|
|
55
50
|
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
56
51
|
|
|
@@ -59,8 +54,7 @@ export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IC
|
|
|
59
54
|
* The provided handlers sequentially applied until one is able to satisfy the request.
|
|
60
55
|
*
|
|
61
56
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
62
|
-
*
|
|
63
|
-
* @public
|
|
57
|
+
* @internal
|
|
64
58
|
*/
|
|
65
59
|
export declare class RuntimeRequestHandlerBuilder {
|
|
66
60
|
private readonly handlers;
|
package/lib/requestHandlers.d.ts
CHANGED
|
@@ -12,8 +12,7 @@ import { RequestParser } from "@fluidframework/runtime-utils";
|
|
|
12
12
|
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
13
13
|
* the route, or fulling the specific request.
|
|
14
14
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
15
|
-
*
|
|
16
|
-
* @public
|
|
15
|
+
* @internal
|
|
17
16
|
*/
|
|
18
17
|
export type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
19
18
|
/**
|
|
@@ -22,14 +21,12 @@ export type RuntimeRequestHandler = (request: RequestParser, runtime: IContainer
|
|
|
22
21
|
* @param runtime - the container runtime
|
|
23
22
|
* @returns the result of the request
|
|
24
23
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
24
|
+
* @internal
|
|
27
25
|
*/
|
|
28
26
|
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
29
27
|
/**
|
|
30
28
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
29
|
+
* @internal
|
|
33
30
|
*/
|
|
34
31
|
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
35
32
|
status: 200;
|
|
@@ -38,8 +35,7 @@ export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
|
38
35
|
};
|
|
39
36
|
/**
|
|
40
37
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
38
|
+
* @internal
|
|
43
39
|
*/
|
|
44
40
|
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
45
41
|
//# sourceMappingURL=requestHandlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestHandlers.d.ts","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,WAAW,EAGX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D
|
|
1
|
+
{"version":3,"file":"requestHandlers.d.ts","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,WAAW,EAGX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,CACnC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,iBAAiB,KACtB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;AAEpC;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,YAC9B,QAAQ,WACR,iBAAiB,mCAkB1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,gBACxB,WAAW,KACtB;IAAE,QAAQ,GAAG,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAE7D,CAAC;AAkCF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,GAAG,WAAW,GAAG,cAAc,EACnE,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,qBAAqB,GAC5B,YAAY,CAAC,CAAC,CAAC,CAEjB"}
|
package/lib/requestHandlers.mjs
CHANGED
|
@@ -10,8 +10,7 @@ import { RequestParser } from "@fluidframework/runtime-utils";
|
|
|
10
10
|
* @param runtime - the container runtime
|
|
11
11
|
* @returns the result of the request
|
|
12
12
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
13
|
+
* @internal
|
|
15
14
|
*/
|
|
16
15
|
export const rootDataStoreRequestHandler = async (request, runtime) => {
|
|
17
16
|
const requestParser = RequestParser.create(request);
|
|
@@ -35,8 +34,7 @@ export const rootDataStoreRequestHandler = async (request, runtime) => {
|
|
|
35
34
|
};
|
|
36
35
|
/**
|
|
37
36
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
38
|
-
*
|
|
39
|
-
* @public
|
|
37
|
+
* @internal
|
|
40
38
|
*/
|
|
41
39
|
export const createFluidObjectResponse = (fluidObject) => {
|
|
42
40
|
return { status: 200, mimeType: "fluid/object", value: fluidObject };
|
|
@@ -69,8 +67,7 @@ class LegacyUriHandle {
|
|
|
69
67
|
}
|
|
70
68
|
/**
|
|
71
69
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
72
|
-
*
|
|
73
|
-
* @public
|
|
70
|
+
* @internal
|
|
74
71
|
*/
|
|
75
72
|
export function handleFromLegacyUri(uri, runtime) {
|
|
76
73
|
return new LegacyUriHandle(uri, runtime);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestHandlers.mjs","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,MAAM,EAAE,MAAM,4BAA4B;OAY5C,EAAE,aAAa,EAAE,MAAM,+BAA+B;
|
|
1
|
+
{"version":3,"file":"requestHandlers.mjs","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,MAAM,EAAE,MAAM,4BAA4B;OAY5C,EAAE,aAAa,EAAE,MAAM,+BAA+B;AAe7D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,EAC/C,OAAiB,EACjB,OAA0B,EACzB,EAAE;IACH,MAAM,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,EAAE,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,OAAO,OAAO,CAAC,OAAO,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3F,gDAAgD;IAChD,IAAI,aAA2B,CAAC;IAChC,IAAI;QACH,mEAAmE;QACnE,aAAa,GAAG,MAAM,OAAO,CAAC,gBAAgB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;KACzD;IAAC,OAAO,KAAK,EAAE;QACf,OAAO,SAAS,CAAC,CAAC,kBAAkB;KACpC;IACD,IAAI;QACH,OAAO,MAAM,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;KACnF;IAAC,OAAO,KAAK,EAAE;QACf,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;KAC/D;AACF,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACxC,WAAwB,EACwC,EAAE;IAClE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AACtE,CAAC,CAAC;AAEF,MAAM,eAAe;IAGpB,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,YACiB,YAAY,EACZ,OAA8B;QAD9B,iBAAY,GAAZ,YAAY,CAAA;QACZ,YAAO,GAAP,OAAO,CAAuB;QAR/B,eAAU,GAAG,IAAI,CAAC;IAS/B,CAAC;IAEG,WAAW;QACjB,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,0CAA0C,CAAC,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,GAAG;QACf,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,aAAa,CAAC;YACrE,GAAG,EAAE,IAAI,CAAC,YAAY;SACtB,CAAC,CAAC;QACH,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,QAAQ,KAAK,cAAc,EAAE;YACpE,+DAA+D;YAC/D,OAAO,QAAQ,CAAC,KAAK,CAAC;SACtB;QACD,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IAC1E,CAAC;IAEM,IAAI,CAAC,MAAoB;QAC/B,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACnD,CAAC;CACD;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAClC,GAAW,EACX,OAA8B;IAE9B,OAAO,IAAI,eAAe,CAAI,GAAG,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC","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 {\n\tIResponse,\n\tIRequest,\n\tIFluidHandle,\n\tIFluidLoadable,\n\tFluidObject,\n\t// eslint-disable-next-line import/no-deprecated\n\tIFluidRouter,\n} from \"@fluidframework/core-interfaces\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IContainerRuntimeBase } from \"@fluidframework/runtime-definitions\";\nimport { RequestParser } from \"@fluidframework/runtime-utils\";\n\n/**\n * A request handler for the container runtime. Each handler should handle a specific request, and return undefined\n * if it does not apply. These handlers are called in series, so there may be other handlers before or after.\n * A handler should only return error if the request is for a route the handler owns, and there is a problem with\n * the route, or fulling the specific request.\n * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n * @internal\n */\nexport type RuntimeRequestHandler = (\n\trequest: RequestParser,\n\truntime: IContainerRuntime,\n) => Promise<IResponse | undefined>;\n\n/**\n * A request handler to expose access to all root data stores in the container by id.\n * @param request - the request for the root data store. The first path part must be the data store's ID.\n * @param runtime - the container runtime\n * @returns the result of the request\n * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n * @internal\n */\nexport const rootDataStoreRequestHandler = async (\n\trequest: IRequest,\n\truntime: IContainerRuntime,\n) => {\n\tconst requestParser = RequestParser.create(request);\n\tconst id = requestParser.pathParts[0];\n\tconst wait = typeof request.headers?.wait === \"boolean\" ? request.headers.wait : undefined;\n\t// eslint-disable-next-line import/no-deprecated\n\tlet rootDataStore: IFluidRouter;\n\ttry {\n\t\t// getRootDataStore currently throws if the data store is not found\n\t\trootDataStore = await runtime.getRootDataStore(id, wait);\n\t} catch (error) {\n\t\treturn undefined; // continue search\n\t}\n\ttry {\n\t\treturn await rootDataStore.IFluidRouter.request(requestParser.createSubRequest(1));\n\t} catch (error) {\n\t\treturn { status: 500, mimeType: \"fluid/object\", value: error };\n\t}\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 * @internal\n */\nexport const createFluidObjectResponse = (\n\tfluidObject: FluidObject,\n): { status: 200; mimeType: \"fluid/object\"; value: FluidObject } => {\n\treturn { status: 200, mimeType: \"fluid/object\", value: fluidObject };\n};\n\nclass LegacyUriHandle<T = FluidObject & IFluidLoadable> implements IFluidHandle<T> {\n\tpublic readonly isAttached = true;\n\n\tpublic get IFluidHandle(): IFluidHandle {\n\t\treturn this;\n\t}\n\n\tpublic constructor(\n\t\tpublic readonly absolutePath,\n\t\tpublic readonly runtime: IContainerRuntimeBase,\n\t) {}\n\n\tpublic attachGraph() {\n\t\tassert(false, 0x0ca /* \"Trying to use legacy graph attach!\" */);\n\t}\n\n\tpublic async get(): Promise<any> {\n\t\tconst response = await this.runtime.IFluidHandleContext.resolveHandle({\n\t\t\turl: this.absolutePath,\n\t\t});\n\t\tif (response.status === 200 && response.mimeType === \"fluid/object\") {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn response.value;\n\t\t}\n\t\tthrow new Error(`Failed to resolve container path ${this.absolutePath}`);\n\t}\n\n\tpublic bind(handle: IFluidHandle) {\n\t\tthrow new Error(\"Cannot bind to LegacyUriHandle\");\n\t}\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 * @internal\n */\nexport function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(\n\turi: string,\n\truntime: IContainerRuntimeBase,\n): IFluidHandle<T> {\n\treturn new LegacyUriHandle<T>(uri, runtime);\n}\n"]}
|
|
@@ -10,8 +10,7 @@ import { RuntimeRequestHandler } from "./requestHandlers";
|
|
|
10
10
|
* The provided handlers sequentially applied until one is able to satisfy the request.
|
|
11
11
|
*
|
|
12
12
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
13
|
+
* @internal
|
|
15
14
|
*/
|
|
16
15
|
export declare class RuntimeRequestHandlerBuilder {
|
|
17
16
|
private readonly handlers;
|
|
@@ -20,8 +19,7 @@ export declare class RuntimeRequestHandlerBuilder {
|
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
22
|
+
* @internal
|
|
25
23
|
*/
|
|
26
24
|
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
27
25
|
//# sourceMappingURL=runtimeRequestHandlerBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeRequestHandlerBuilder.d.ts","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"runtimeRequestHandlerBuilder.d.ts","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;GAMG;AACH,qBAAa,4BAA4B;IAExC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IAGjD,WAAW,CAAC,GAAG,QAAQ,EAAE,qBAAqB,EAAE;IAM1C,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC;CAU7F;AAED;;;GAGG;AAEH,wBAAgB,0BAA0B,CAAC,GAAG,QAAQ,EAAE,qBAAqB,EAAE,aAGvD,QAAQ,WAAW,iBAAiB,wBAE3D"}
|
|
@@ -8,8 +8,7 @@ import { RequestParser, create404Response } from "@fluidframework/runtime-utils"
|
|
|
8
8
|
* The provided handlers sequentially applied until one is able to satisfy the request.
|
|
9
9
|
*
|
|
10
10
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
11
|
+
* @internal
|
|
13
12
|
*/
|
|
14
13
|
export class RuntimeRequestHandlerBuilder {
|
|
15
14
|
constructor() {
|
|
@@ -35,8 +34,7 @@ export class RuntimeRequestHandlerBuilder {
|
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
36
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
38
|
-
*
|
|
39
|
-
* @public
|
|
37
|
+
* @internal
|
|
40
38
|
*/
|
|
41
39
|
// eslint-disable-next-line import/no-deprecated
|
|
42
40
|
export function buildRuntimeRequestHandler(...handlers) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeRequestHandlerBuilder.mjs","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAII,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,+BAA+B;AAIhF
|
|
1
|
+
{"version":3,"file":"runtimeRequestHandlerBuilder.mjs","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAII,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,+BAA+B;AAIhF;;;;;;GAMG;AACH,MAAM,OAAO,4BAA4B;IAAzC;QACC,gDAAgD;QAC/B,aAAQ,GAA4B,EAAE,CAAC;IAmBzD,CAAC;IAjBA,gDAAgD;IACzC,WAAW,CAAC,GAAG,QAAiC;QACtD,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;SAChC;IACF,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,OAAiB,EAAE,OAA0B;QACvE,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7C,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACpC,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAChD,IAAI,QAAQ,KAAK,SAAS,EAAE;gBAC3B,OAAO,QAAQ,CAAC;aAChB;SACD;QACD,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;CACD;AAED;;;GAGG;AACH,gDAAgD;AAChD,MAAM,UAAU,0BAA0B,CAAC,GAAG,QAAiC;IAC9E,MAAM,OAAO,GAAG,IAAI,4BAA4B,EAAE,CAAC;IACnD,OAAO,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC;IACjC,OAAO,KAAK,EAAE,OAAiB,EAAE,OAA0B,EAAE,EAAE,CAC9D,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { RequestParser, create404Response } from \"@fluidframework/runtime-utils\";\n// eslint-disable-next-line import/no-deprecated\nimport { RuntimeRequestHandler } from \"./requestHandlers\";\n\n/**\n * The RuntimeRequestHandlerBuilder creates a runtime request handler based on request handlers.\n * The provided handlers sequentially applied until one is able to satisfy the request.\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 * @internal\n */\nexport class RuntimeRequestHandlerBuilder {\n\t// eslint-disable-next-line import/no-deprecated\n\tprivate readonly handlers: RuntimeRequestHandler[] = [];\n\n\t// eslint-disable-next-line import/no-deprecated\n\tpublic pushHandler(...handlers: RuntimeRequestHandler[]) {\n\t\tif (handlers !== undefined) {\n\t\t\tthis.handlers.push(...handlers);\n\t\t}\n\t}\n\n\tpublic async handleRequest(request: IRequest, runtime: IContainerRuntime): Promise<IResponse> {\n\t\tconst parser = RequestParser.create(request);\n\t\tfor (const handler of this.handlers) {\n\t\t\tconst response = await handler(parser, runtime);\n\t\t\tif (response !== undefined) {\n\t\t\t\treturn response;\n\t\t\t}\n\t\t}\n\t\treturn create404Response(request);\n\t}\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 * @internal\n */\n// eslint-disable-next-line import/no-deprecated\nexport function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]) {\n\tconst builder = new RuntimeRequestHandlerBuilder();\n\tbuilder.pushHandler(...handlers);\n\treturn async (request: IRequest, runtime: IContainerRuntime) =>\n\t\tbuilder.handleRequest(request, runtime);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/request-handler",
|
|
3
|
-
"version": "2.0.0-dev.7.4.0.
|
|
3
|
+
"version": "2.0.0-dev.7.4.0.216897",
|
|
4
4
|
"description": "A simple request handling library for Fluid Framework",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -47,20 +47,20 @@
|
|
|
47
47
|
"temp-directory": "nyc/.nyc_output"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fluidframework/container-runtime-definitions": "2.0.0-dev.7.4.0.
|
|
51
|
-
"@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.
|
|
52
|
-
"@fluidframework/core-utils": "2.0.0-dev.7.4.0.
|
|
53
|
-
"@fluidframework/runtime-definitions": "2.0.0-dev.7.4.0.
|
|
54
|
-
"@fluidframework/runtime-utils": "2.0.0-dev.7.4.0.
|
|
50
|
+
"@fluidframework/container-runtime-definitions": "2.0.0-dev.7.4.0.216897",
|
|
51
|
+
"@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.216897",
|
|
52
|
+
"@fluidframework/core-utils": "2.0.0-dev.7.4.0.216897",
|
|
53
|
+
"@fluidframework/runtime-definitions": "2.0.0-dev.7.4.0.216897",
|
|
54
|
+
"@fluidframework/runtime-utils": "2.0.0-dev.7.4.0.216897"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@fluid-tools/build-cli": "^0.28.0",
|
|
58
58
|
"@fluidframework/build-common": "^2.0.3",
|
|
59
59
|
"@fluidframework/build-tools": "^0.28.0",
|
|
60
60
|
"@fluidframework/eslint-config-fluid": "^3.1.0",
|
|
61
|
-
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.4.0.
|
|
61
|
+
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.4.0.216897",
|
|
62
62
|
"@fluidframework/request-handler-previous": "npm:@fluidframework/request-handler@2.0.0-internal.7.2.0",
|
|
63
|
-
"@fluidframework/test-runtime-utils": "2.0.0-dev.7.4.0.
|
|
63
|
+
"@fluidframework/test-runtime-utils": "2.0.0-dev.7.4.0.216897",
|
|
64
64
|
"@microsoft/api-extractor": "^7.38.3",
|
|
65
65
|
"@types/diff": "^3.5.1",
|
|
66
66
|
"@types/mocha": "^9.1.1",
|
|
@@ -104,12 +104,13 @@
|
|
|
104
104
|
"build:docs": "fluid-build . --task api",
|
|
105
105
|
"build:esnext": "tsc-multi --config ../../../common/build/build-common/tsc-multi.esm.json",
|
|
106
106
|
"build:test": "tsc-multi --config ./tsc-multi.test.json",
|
|
107
|
+
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
107
108
|
"ci:build:docs": "api-extractor run",
|
|
108
109
|
"clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
|
|
109
110
|
"eslint": "eslint --format stylish src",
|
|
110
111
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
111
112
|
"format": "npm run prettier:fix",
|
|
112
|
-
"lint": "npm run prettier && npm run eslint",
|
|
113
|
+
"lint": "npm run prettier && npm run check:release-tags && npm run eslint",
|
|
113
114
|
"lint:fix": "npm run prettier:fix && npm run eslint:fix",
|
|
114
115
|
"prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
115
116
|
"prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
package/src/requestHandlers.ts
CHANGED
|
@@ -23,8 +23,7 @@ import { RequestParser } from "@fluidframework/runtime-utils";
|
|
|
23
23
|
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
24
24
|
* the route, or fulling the specific request.
|
|
25
25
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
26
|
-
*
|
|
27
|
-
* @public
|
|
26
|
+
* @internal
|
|
28
27
|
*/
|
|
29
28
|
export type RuntimeRequestHandler = (
|
|
30
29
|
request: RequestParser,
|
|
@@ -37,8 +36,7 @@ export type RuntimeRequestHandler = (
|
|
|
37
36
|
* @param runtime - the container runtime
|
|
38
37
|
* @returns the result of the request
|
|
39
38
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
40
|
-
*
|
|
41
|
-
* @public
|
|
39
|
+
* @internal
|
|
42
40
|
*/
|
|
43
41
|
export const rootDataStoreRequestHandler = async (
|
|
44
42
|
request: IRequest,
|
|
@@ -64,8 +62,7 @@ export const rootDataStoreRequestHandler = async (
|
|
|
64
62
|
|
|
65
63
|
/**
|
|
66
64
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
67
|
-
*
|
|
68
|
-
* @public
|
|
65
|
+
* @internal
|
|
69
66
|
*/
|
|
70
67
|
export const createFluidObjectResponse = (
|
|
71
68
|
fluidObject: FluidObject,
|
|
@@ -107,8 +104,7 @@ class LegacyUriHandle<T = FluidObject & IFluidLoadable> implements IFluidHandle<
|
|
|
107
104
|
|
|
108
105
|
/**
|
|
109
106
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
110
|
-
*
|
|
111
|
-
* @public
|
|
107
|
+
* @internal
|
|
112
108
|
*/
|
|
113
109
|
export function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(
|
|
114
110
|
uri: string,
|
|
@@ -14,8 +14,7 @@ import { RuntimeRequestHandler } from "./requestHandlers";
|
|
|
14
14
|
* The provided handlers sequentially applied until one is able to satisfy the request.
|
|
15
15
|
*
|
|
16
16
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
17
|
+
* @internal
|
|
19
18
|
*/
|
|
20
19
|
export class RuntimeRequestHandlerBuilder {
|
|
21
20
|
// eslint-disable-next-line import/no-deprecated
|
|
@@ -42,8 +41,7 @@ export class RuntimeRequestHandlerBuilder {
|
|
|
42
41
|
|
|
43
42
|
/**
|
|
44
43
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
45
|
-
*
|
|
46
|
-
* @public
|
|
44
|
+
* @internal
|
|
47
45
|
*/
|
|
48
46
|
// eslint-disable-next-line import/no-deprecated
|
|
49
47
|
export function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]) {
|