@fluidframework/request-handler 1.4.0-121020 → 2.0.0-dev-rc.1.0.0.225277
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/.eslintrc.js +5 -7
- package/.mocharc.js +12 -0
- package/CHANGELOG.md +119 -0
- package/README.md +37 -1
- package/api-extractor-esm.json +4 -0
- package/api-extractor-lint.json +4 -0
- package/api-extractor.json +2 -2
- package/api-report/request-handler.api.md +20 -0
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/request-handler-alpha.d.ts +19 -0
- package/dist/request-handler-beta.d.ts +14 -0
- package/dist/request-handler-public.d.ts +14 -0
- package/dist/request-handler-untrimmed.d.ts +24 -0
- package/dist/requestHandlers.cjs +7 -0
- package/dist/requestHandlers.cjs.map +1 -0
- package/dist/requestHandlers.d.ts +5 -16
- package/dist/requestHandlers.d.ts.map +1 -1
- package/dist/{runtimeRequestHandlerBuilder.js → runtimeRequestHandlerBuilder.cjs} +13 -6
- package/dist/runtimeRequestHandlerBuilder.cjs.map +1 -0
- package/dist/runtimeRequestHandlerBuilder.d.ts +4 -8
- package/dist/runtimeRequestHandlerBuilder.d.ts.map +1 -1
- package/dist/tsdoc-metadata.json +11 -0
- package/lib/index.d.mts +7 -0
- package/lib/index.d.mts.map +1 -0
- package/lib/{index.js → index.mjs} +2 -3
- package/lib/index.mjs.map +1 -0
- package/lib/request-handler-alpha.d.mts +19 -0
- package/lib/request-handler-beta.d.mts +14 -0
- package/lib/request-handler-public.d.mts +14 -0
- package/lib/request-handler-untrimmed.d.mts +24 -0
- package/lib/requestHandlers.d.mts +18 -0
- package/lib/requestHandlers.d.mts.map +1 -0
- package/lib/{index.d.ts → requestHandlers.mjs} +2 -3
- package/lib/requestHandlers.mjs.map +1 -0
- package/lib/runtimeRequestHandlerBuilder.d.mts +14 -0
- package/lib/runtimeRequestHandlerBuilder.d.mts.map +1 -0
- package/lib/{runtimeRequestHandlerBuilder.js → runtimeRequestHandlerBuilder.mjs} +13 -5
- package/lib/runtimeRequestHandlerBuilder.mjs.map +1 -0
- package/package.json +129 -60
- package/prettier.config.cjs +8 -0
- package/src/index.ts +2 -2
- package/src/requestHandlers.ts +8 -74
- package/src/runtimeRequestHandlerBuilder.ts +33 -23
- package/tsc-multi.test.json +4 -0
- package/tsconfig.json +11 -13
- package/dist/index.js +0 -19
- package/dist/index.js.map +0 -1
- package/dist/packageVersion.d.ts +0 -9
- package/dist/packageVersion.d.ts.map +0 -1
- package/dist/packageVersion.js +0 -12
- package/dist/packageVersion.js.map +0 -1
- package/dist/requestHandlers.js +0 -67
- package/dist/requestHandlers.js.map +0 -1
- package/dist/runtimeRequestHandlerBuilder.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/packageVersion.d.ts +0 -9
- package/lib/packageVersion.d.ts.map +0 -1
- package/lib/packageVersion.js +0 -9
- package/lib/packageVersion.js.map +0 -1
- package/lib/requestHandlers.d.ts +0 -29
- package/lib/requestHandlers.d.ts.map +0 -1
- package/lib/requestHandlers.js +0 -61
- package/lib/requestHandlers.js.map +0 -1
- package/lib/runtimeRequestHandlerBuilder.d.ts +0 -18
- package/lib/runtimeRequestHandlerBuilder.d.ts.map +0 -1
- package/lib/runtimeRequestHandlerBuilder.js.map +0 -1
- package/src/packageVersion.ts +0 -9
- package/tsconfig.esnext.json +0 -7
package/.eslintrc.js
CHANGED
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
}
|
|
7
|
+
extends: [require.resolve("@fluidframework/eslint-config-fluid/minimal"), "prettier"],
|
|
8
|
+
parserOptions: {
|
|
9
|
+
project: ["./tsconfig.json", "./src/test/tsconfig.json"],
|
|
10
|
+
},
|
|
11
|
+
};
|
package/.mocharc.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
const getFluidTestMochaConfig = require("@fluidframework/mocha-test-setup/mocharc-common");
|
|
9
|
+
|
|
10
|
+
const packageDir = __dirname;
|
|
11
|
+
const config = getFluidTestMochaConfig(packageDir);
|
|
12
|
+
module.exports = config;
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# @fluidframework/request-handler
|
|
2
|
+
|
|
3
|
+
## 2.0.0-internal.8.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- aqueduct: Removed requestHandler utilities [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
|
|
8
|
+
|
|
9
|
+
The following `requestHandler` utilities have been removed:
|
|
10
|
+
|
|
11
|
+
- `makeModelRequestHandler`
|
|
12
|
+
- `defaultFluidObjectRequestHandler`
|
|
13
|
+
- `defaultRouteRequestHandler`
|
|
14
|
+
- `mountableViewRequestHandler`
|
|
15
|
+
- `createFluidObjectResponse`
|
|
16
|
+
- `rootDataStoreRequestHandler`
|
|
17
|
+
- `handleFromLegacyUri`
|
|
18
|
+
- `RuntimeRequestHandlerBuilder`
|
|
19
|
+
|
|
20
|
+
Please migrate all usage to the new `entryPoint` pattern.
|
|
21
|
+
|
|
22
|
+
See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
|
|
23
|
+
|
|
24
|
+
## 2.0.0-internal.7.4.0
|
|
25
|
+
|
|
26
|
+
Dependency updates only.
|
|
27
|
+
|
|
28
|
+
## 2.0.0-internal.7.3.0
|
|
29
|
+
|
|
30
|
+
Dependency updates only.
|
|
31
|
+
|
|
32
|
+
## 2.0.0-internal.7.2.0
|
|
33
|
+
|
|
34
|
+
Dependency updates only.
|
|
35
|
+
|
|
36
|
+
## 2.0.0-internal.7.1.0
|
|
37
|
+
|
|
38
|
+
Dependency updates only.
|
|
39
|
+
|
|
40
|
+
## 2.0.0-internal.7.0.0
|
|
41
|
+
|
|
42
|
+
### Major Changes
|
|
43
|
+
|
|
44
|
+
- DEPRECATED: container-runtime: requestHandlers are deprecated [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
45
|
+
|
|
46
|
+
The concept of `requestHandlers` has been deprecated. Please migrate all usage of the following APIs to the new `entryPoint` pattern:
|
|
47
|
+
|
|
48
|
+
- `requestHandler` property in `ContainerRuntime.loadRuntime(...)`
|
|
49
|
+
- `RuntimeRequestHandler`
|
|
50
|
+
- `RuntimeRequestHandlerBuilder`
|
|
51
|
+
- `defaultFluidObjectRequestHandler(...)`
|
|
52
|
+
- `defaultRouteRequestHandler(...)`
|
|
53
|
+
- `mountableViewRequestHandler(...)`
|
|
54
|
+
- `buildRuntimeRequestHandler(...)`
|
|
55
|
+
- `createFluidObjectResponse(...)`
|
|
56
|
+
- `handleFromLegacyUri(...)`
|
|
57
|
+
- `rootDataStoreRequestHandler(...)`
|
|
58
|
+
|
|
59
|
+
See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
|
|
60
|
+
|
|
61
|
+
- Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
62
|
+
|
|
63
|
+
The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
|
|
64
|
+
|
|
65
|
+
## 2.0.0-internal.6.4.0
|
|
66
|
+
|
|
67
|
+
### Minor Changes
|
|
68
|
+
|
|
69
|
+
- Some stack traces are improved ([#17380](https://github.com/microsoft/FluidFramework/issues/17380)) [34f2808ee9](https://github.com/microsoft/FluidFramework/commits/34f2808ee9764aef21b990f8b48860d9e3ce27a5)
|
|
70
|
+
|
|
71
|
+
Some stack traces have been improved and might now include frames for async functions that weren't previously included.
|
|
72
|
+
|
|
73
|
+
## 2.0.0-internal.6.3.0
|
|
74
|
+
|
|
75
|
+
Dependency updates only.
|
|
76
|
+
|
|
77
|
+
## 2.0.0-internal.6.2.0
|
|
78
|
+
|
|
79
|
+
Dependency updates only.
|
|
80
|
+
|
|
81
|
+
## 2.0.0-internal.6.1.0
|
|
82
|
+
|
|
83
|
+
Dependency updates only.
|
|
84
|
+
|
|
85
|
+
## 2.0.0-internal.6.0.0
|
|
86
|
+
|
|
87
|
+
### Major Changes
|
|
88
|
+
|
|
89
|
+
- Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
|
|
90
|
+
|
|
91
|
+
Upgraded typescript transpilation target to ES2020. This is done in order to decrease the bundle sizes of Fluid Framework packages. This has provided size improvements across the board for ex. Loader, Driver, Runtime etc. Reduced bundle sizes helps to load lesser code in apps and hence also helps to improve the perf.If any app wants to target any older versions of browsers with which this target version is not compatible, then they can use packages like babel to transpile to a older target.
|
|
92
|
+
|
|
93
|
+
## 2.0.0-internal.5.4.0
|
|
94
|
+
|
|
95
|
+
Dependency updates only.
|
|
96
|
+
|
|
97
|
+
## 2.0.0-internal.5.3.0
|
|
98
|
+
|
|
99
|
+
Dependency updates only.
|
|
100
|
+
|
|
101
|
+
## 2.0.0-internal.5.2.0
|
|
102
|
+
|
|
103
|
+
Dependency updates only.
|
|
104
|
+
|
|
105
|
+
## 2.0.0-internal.5.1.0
|
|
106
|
+
|
|
107
|
+
Dependency updates only.
|
|
108
|
+
|
|
109
|
+
## 2.0.0-internal.5.0.0
|
|
110
|
+
|
|
111
|
+
Dependency updates only.
|
|
112
|
+
|
|
113
|
+
## 2.0.0-internal.4.4.0
|
|
114
|
+
|
|
115
|
+
Dependency updates only.
|
|
116
|
+
|
|
117
|
+
## 2.0.0-internal.4.1.0
|
|
118
|
+
|
|
119
|
+
Dependency updates only.
|
package/README.md
CHANGED
|
@@ -2,4 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
A simple request handling library for Fluid Framework
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<!-- AUTO-GENERATED-CONTENT:START (README_DEPENDENCY_GUIDELINES_SECTION:includeHeading=TRUE) -->
|
|
6
|
+
|
|
7
|
+
<!-- prettier-ignore-start -->
|
|
8
|
+
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
|
|
9
|
+
|
|
10
|
+
## Using Fluid Framework libraries
|
|
11
|
+
|
|
12
|
+
When taking a dependency on a Fluid Framework library, we recommend using a `^` (caret) version range, such as `^1.3.4`.
|
|
13
|
+
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
14
|
+
library consumers should always prefer `^`.
|
|
15
|
+
|
|
16
|
+
Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
|
|
17
|
+
you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
|
|
18
|
+
Standard `^` and `~` ranges will not work as expected.
|
|
19
|
+
See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
|
|
20
|
+
package for more information including tools to convert between version schemes.
|
|
21
|
+
|
|
22
|
+
<!-- prettier-ignore-end -->
|
|
23
|
+
|
|
24
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
25
|
+
|
|
26
|
+
<!-- AUTO-GENERATED-CONTENT:START (README_TRADEMARK_SECTION:includeHeading=TRUE) -->
|
|
27
|
+
|
|
28
|
+
<!-- prettier-ignore-start -->
|
|
29
|
+
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
|
|
30
|
+
|
|
31
|
+
## Trademark
|
|
32
|
+
|
|
33
|
+
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
|
|
34
|
+
|
|
35
|
+
Use of these trademarks or logos must follow Microsoft's [Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
|
|
36
|
+
|
|
37
|
+
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
|
|
38
|
+
|
|
39
|
+
<!-- prettier-ignore-end -->
|
|
40
|
+
|
|
41
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
package/api-extractor.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.json"
|
|
4
4
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
## API Report File for "@fluidframework/request-handler"
|
|
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 { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
8
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
9
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
10
|
+
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
11
|
+
|
|
12
|
+
// @internal @deprecated (undocumented)
|
|
13
|
+
export function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
14
|
+
|
|
15
|
+
// @alpha @deprecated
|
|
16
|
+
export type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
17
|
+
|
|
18
|
+
// (No @packageDocumentation comment for this package)
|
|
19
|
+
|
|
20
|
+
```
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.buildRuntimeRequestHandler = void 0;
|
|
8
|
+
var runtimeRequestHandlerBuilder_1 = require("./runtimeRequestHandlerBuilder.cjs");
|
|
9
|
+
Object.defineProperty(exports, "buildRuntimeRequestHandler", { enumerable: true, get: function () { return runtimeRequestHandlerBuilder_1.buildRuntimeRequestHandler; } });
|
|
10
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,mFAA4E;AAAnE,0IAAA,0BAA0B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { RuntimeRequestHandler } from \"./requestHandlers\";\nexport { buildRuntimeRequestHandler } from \"./runtimeRequestHandlerBuilder\";\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export { RuntimeRequestHandler } from "./requestHandlers";
|
|
6
|
+
export { buildRuntimeRequestHandler } from "./runtimeRequestHandlerBuilder";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
2
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
3
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
4
|
+
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
5
|
+
|
|
6
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
10
|
+
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
11
|
+
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
12
|
+
* the route, or fulling the specific request.
|
|
13
|
+
* @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
17
|
+
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
18
|
+
|
|
19
|
+
export { }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
2
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
3
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
4
|
+
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
5
|
+
|
|
6
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
7
|
+
|
|
8
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
9
|
+
|
|
10
|
+
/* Excluded from this release type: RequestParser */
|
|
11
|
+
|
|
12
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
13
|
+
|
|
14
|
+
export { }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
2
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
3
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
4
|
+
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
5
|
+
|
|
6
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
7
|
+
|
|
8
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
9
|
+
|
|
10
|
+
/* Excluded from this release type: RequestParser */
|
|
11
|
+
|
|
12
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
13
|
+
|
|
14
|
+
export { }
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
2
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
3
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
4
|
+
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
15
|
+
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
16
|
+
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
17
|
+
* the route, or fulling the specific request.
|
|
18
|
+
* @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
19
|
+
*
|
|
20
|
+
* @alpha
|
|
21
|
+
*/
|
|
22
|
+
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
23
|
+
|
|
24
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestHandlers.cjs","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResponse } from \"@fluidframework/core-interfaces\";\nimport { IContainerRuntime } from \"@fluidframework/container-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 once Loader LTS version is \"2.0.0-internal.7.0.0\". Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n *\n * @alpha\n */\nexport type RuntimeRequestHandler = (\n\trequest: RequestParser,\n\truntime: IContainerRuntime,\n) => Promise<IResponse | undefined>;\n"]}
|
|
@@ -2,28 +2,17 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IResponse
|
|
5
|
+
import { IResponse } from "@fluidframework/core-interfaces";
|
|
6
6
|
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
7
|
-
import { IContainerRuntimeBase } from "@fluidframework/runtime-definitions";
|
|
8
7
|
import { RequestParser } from "@fluidframework/runtime-utils";
|
|
9
8
|
/**
|
|
10
9
|
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
11
10
|
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
12
11
|
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
13
12
|
* the route, or fulling the specific request.
|
|
13
|
+
* @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
14
16
|
*/
|
|
15
|
-
export
|
|
16
|
-
/**
|
|
17
|
-
* A request handler to expose access to all root data stores in the container by id.
|
|
18
|
-
* @param request - the request for the root data store. The first path part must be the data store's ID.
|
|
19
|
-
* @param runtime - the container runtime
|
|
20
|
-
* @returns the result of the request
|
|
21
|
-
*/
|
|
22
|
-
export declare const rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
23
|
-
export declare const createFluidObjectResponse: (fluidObject: FluidObject) => {
|
|
24
|
-
status: 200;
|
|
25
|
-
mimeType: "fluid/object";
|
|
26
|
-
value: FluidObject;
|
|
27
|
-
};
|
|
28
|
-
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
|
|
17
|
+
export type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
29
18
|
//# sourceMappingURL=requestHandlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestHandlers.d.ts","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"requestHandlers.d.ts","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;;;;;;;GAQG;AACH,MAAM,MAAM,qBAAqB,GAAG,CACnC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,iBAAiB,KACtB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -4,16 +4,18 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.buildRuntimeRequestHandler =
|
|
7
|
+
exports.buildRuntimeRequestHandler = void 0;
|
|
8
8
|
const runtime_utils_1 = require("@fluidframework/runtime-utils");
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
* The RuntimeRequestHandlerBuilder creates a runtime request handler based on request handlers.
|
|
11
|
+
* The provided handlers sequentially applied until one is able to satisfy the request.
|
|
12
|
+
*/
|
|
13
13
|
class RuntimeRequestHandlerBuilder {
|
|
14
14
|
constructor() {
|
|
15
|
+
// eslint-disable-next-line import/no-deprecated
|
|
15
16
|
this.handlers = [];
|
|
16
17
|
}
|
|
18
|
+
// eslint-disable-next-line import/no-deprecated
|
|
17
19
|
pushHandler(...handlers) {
|
|
18
20
|
if (handlers !== undefined) {
|
|
19
21
|
this.handlers.push(...handlers);
|
|
@@ -30,11 +32,16 @@ class RuntimeRequestHandlerBuilder {
|
|
|
30
32
|
return (0, runtime_utils_1.create404Response)(request);
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
37
|
+
*
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
// eslint-disable-next-line import/no-deprecated
|
|
34
41
|
function buildRuntimeRequestHandler(...handlers) {
|
|
35
42
|
const builder = new RuntimeRequestHandlerBuilder();
|
|
36
43
|
builder.pushHandler(...handlers);
|
|
37
44
|
return async (request, runtime) => builder.handleRequest(request, runtime);
|
|
38
45
|
}
|
|
39
46
|
exports.buildRuntimeRequestHandler = buildRuntimeRequestHandler;
|
|
40
|
-
//# sourceMappingURL=runtimeRequestHandlerBuilder.
|
|
47
|
+
//# sourceMappingURL=runtimeRequestHandlerBuilder.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtimeRequestHandlerBuilder.cjs","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,iEAAiF;AAIjF;;;GAGG;AACH,MAAM,4BAA4B;IAAlC;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;AAED;;;;GAIG;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 */\nclass 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 once Loader LTS version is \"2.0.0-internal.7.0.0\". Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n *\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"]}
|
|
@@ -6,13 +6,9 @@ import { IRequest, IResponse } from "@fluidframework/core-interfaces";
|
|
|
6
6
|
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
7
7
|
import { RuntimeRequestHandler } from "./requestHandlers";
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
private readonly handlers;
|
|
14
|
-
pushHandler(...handlers: RuntimeRequestHandler[]): void;
|
|
15
|
-
handleRequest(request: IRequest, runtime: IContainerRuntime): Promise<IResponse>;
|
|
16
|
-
}
|
|
9
|
+
* @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
17
13
|
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
18
14
|
//# 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;
|
|
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;AA6B1D;;;;GAIG;AAEH,wBAAgB,0BAA0B,CAAC,GAAG,QAAQ,EAAE,qBAAqB,EAAE,aAGvD,QAAQ,WAAW,iBAAiB,wBAE3D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.38.3"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/lib/index.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
export { RuntimeRequestHandler } from "./requestHandlers.mjs";
|
|
6
|
+
export { buildRuntimeRequestHandler } from "./runtimeRequestHandlerBuilder.mjs";
|
|
7
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,qBAAqB,EAAE;OACzB,EAAE,0BAA0B,EAAE"}
|
|
@@ -2,6 +2,5 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
5
|
+
export { buildRuntimeRequestHandler } from "./runtimeRequestHandlerBuilder.mjs";
|
|
6
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAGI,EAAE,0BAA0B,EAAE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { RuntimeRequestHandler } from \"./requestHandlers\";\nexport { buildRuntimeRequestHandler } from \"./runtimeRequestHandlerBuilder\";\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
2
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
3
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
4
|
+
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
5
|
+
|
|
6
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
10
|
+
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
11
|
+
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
12
|
+
* the route, or fulling the specific request.
|
|
13
|
+
* @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
17
|
+
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
18
|
+
|
|
19
|
+
export { }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
2
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
3
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
4
|
+
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
5
|
+
|
|
6
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
7
|
+
|
|
8
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
9
|
+
|
|
10
|
+
/* Excluded from this release type: RequestParser */
|
|
11
|
+
|
|
12
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
13
|
+
|
|
14
|
+
export { }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
2
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
3
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
4
|
+
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
5
|
+
|
|
6
|
+
/* Excluded from this release type: buildRuntimeRequestHandler */
|
|
7
|
+
|
|
8
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
9
|
+
|
|
10
|
+
/* Excluded from this release type: RequestParser */
|
|
11
|
+
|
|
12
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
13
|
+
|
|
14
|
+
export { }
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
2
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
3
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
4
|
+
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
15
|
+
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
16
|
+
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
17
|
+
* the route, or fulling the specific request.
|
|
18
|
+
* @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
19
|
+
*
|
|
20
|
+
* @alpha
|
|
21
|
+
*/
|
|
22
|
+
export declare type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
23
|
+
|
|
24
|
+
export { }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { IResponse } from "@fluidframework/core-interfaces";
|
|
6
|
+
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
7
|
+
import { RequestParser } from "@fluidframework/runtime-utils";
|
|
8
|
+
/**
|
|
9
|
+
* A request handler for the container runtime. Each handler should handle a specific request, and return undefined
|
|
10
|
+
* if it does not apply. These handlers are called in series, so there may be other handlers before or after.
|
|
11
|
+
* A handler should only return error if the request is for a route the handler owns, and there is a problem with
|
|
12
|
+
* the route, or fulling the specific request.
|
|
13
|
+
* @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
17
|
+
export type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
18
|
+
//# sourceMappingURL=requestHandlers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestHandlers.d.mts","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,SAAS,EAAE,MAAM,iCAAiC;OACpD,EAAE,iBAAiB,EAAE,MAAM,+CAA+C;OAC1E,EAAE,aAAa,EAAE,MAAM,+BAA+B;AAE7D;;;;;;;;GAQG;AACH,MAAM,MAAM,qBAAqB,GAAG,CACnC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,iBAAiB,KACtB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -2,6 +2,5 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=requestHandlers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestHandlers.mjs","sourceRoot":"","sources":["../src/requestHandlers.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResponse } from \"@fluidframework/core-interfaces\";\nimport { IContainerRuntime } from \"@fluidframework/container-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 once Loader LTS version is \"2.0.0-internal.7.0.0\". Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n *\n * @alpha\n */\nexport type RuntimeRequestHandler = (\n\trequest: RequestParser,\n\truntime: IContainerRuntime,\n) => Promise<IResponse | undefined>;\n"]}
|