@fluidframework/request-handler 2.0.0-internal.8.0.1 → 2.0.0-rc.1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +0 -6
  3. package/api-extractor-esm.json +4 -0
  4. package/api-extractor-lint.json +1 -10
  5. package/api-extractor.json +1 -9
  6. package/dist/{index.cjs → index.js} +2 -2
  7. package/dist/index.js.map +1 -0
  8. package/dist/request-handler-beta.d.ts +0 -4
  9. package/dist/request-handler-public.d.ts +0 -4
  10. package/dist/{requestHandlers.cjs → requestHandlers.js} +1 -1
  11. package/dist/requestHandlers.js.map +1 -0
  12. package/dist/{runtimeRequestHandlerBuilder.cjs → runtimeRequestHandlerBuilder.js} +1 -1
  13. package/dist/runtimeRequestHandlerBuilder.js.map +1 -0
  14. package/lib/{index.d.ts → index.d.mts} +1 -1
  15. package/lib/index.d.mts.map +1 -0
  16. package/lib/{request-handler-beta.d.ts → request-handler-beta.d.mts} +0 -4
  17. package/lib/{request-handler-public.d.ts → request-handler-public.d.mts} +0 -4
  18. package/lib/{requestHandlers.d.ts → requestHandlers.d.mts} +1 -1
  19. package/lib/requestHandlers.d.mts.map +1 -0
  20. package/lib/{runtimeRequestHandlerBuilder.d.ts → runtimeRequestHandlerBuilder.d.mts} +1 -1
  21. package/lib/runtimeRequestHandlerBuilder.d.mts.map +1 -0
  22. package/package.json +75 -40
  23. package/dist/index.cjs.map +0 -1
  24. package/dist/requestHandlers.cjs.map +0 -1
  25. package/dist/runtimeRequestHandlerBuilder.cjs.map +0 -1
  26. package/lib/index.d.ts.map +0 -1
  27. package/lib/requestHandlers.d.ts.map +0 -1
  28. package/lib/runtimeRequestHandlerBuilder.d.ts.map +0 -1
  29. package/tsc-multi.test.json +0 -4
  30. /package/lib/{request-handler-alpha.d.ts → request-handler-alpha.d.mts} +0 -0
  31. /package/lib/{request-handler-untrimmed.d.ts → request-handler-untrimmed.d.mts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/request-handler
2
2
 
3
+ ## 2.0.0-rc.1.0.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.0.0-internal.8.0.0
4
8
 
5
9
  ### Major Changes
package/README.md CHANGED
@@ -13,12 +13,6 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
13
13
  While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
14
14
  library consumers should always prefer `^`.
15
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
16
  <!-- prettier-ignore-end -->
23
17
 
24
18
  <!-- AUTO-GENERATED-CONTENT:END -->
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "../../../common/build/build-common/api-extractor-base-esm.json"
4
+ }
@@ -1,13 +1,4 @@
1
1
  {
2
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
- }
3
+ "extends": "../../../common/build/build-common/api-extractor-lint.json"
13
4
  }
@@ -1,12 +1,4 @@
1
1
  {
2
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
- "messages": {
5
- "extractorMessageReporting": {
6
- // TODO: Add missing documentation and remove this rule override
7
- "ae-undocumented": {
8
- "logLevel": "none"
9
- }
10
- }
11
- }
3
+ "extends": "../../../common/build/build-common/api-extractor-base.json"
12
4
  }
@@ -5,6 +5,6 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.buildRuntimeRequestHandler = void 0;
8
- var runtimeRequestHandlerBuilder_1 = require("./runtimeRequestHandlerBuilder.cjs");
8
+ var runtimeRequestHandlerBuilder_1 = require("./runtimeRequestHandlerBuilder");
9
9
  Object.defineProperty(exports, "buildRuntimeRequestHandler", { enumerable: true, get: function () { return runtimeRequestHandlerBuilder_1.buildRuntimeRequestHandler; } });
10
- //# sourceMappingURL=index.cjs.map
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+EAA4E;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"]}
@@ -7,10 +7,6 @@ import { RequestParser } from '@fluidframework/runtime-utils';
7
7
 
8
8
  /* Excluded from this release type: IContainerRuntime */
9
9
 
10
- /* Excluded from this release type: IRequest */
11
-
12
- /* Excluded from this release type: IResponse */
13
-
14
10
  /* Excluded from this release type: RequestParser */
15
11
 
16
12
  /* Excluded from this release type: RuntimeRequestHandler */
@@ -7,10 +7,6 @@ import { RequestParser } from '@fluidframework/runtime-utils';
7
7
 
8
8
  /* Excluded from this release type: IContainerRuntime */
9
9
 
10
- /* Excluded from this release type: IRequest */
11
-
12
- /* Excluded from this release type: IResponse */
13
-
14
10
  /* Excluded from this release type: RequestParser */
15
11
 
16
12
  /* Excluded from this release type: RuntimeRequestHandler */
@@ -4,4 +4,4 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- //# sourceMappingURL=requestHandlers.cjs.map
7
+ //# sourceMappingURL=requestHandlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestHandlers.js","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"]}
@@ -44,4 +44,4 @@ function buildRuntimeRequestHandler(...handlers) {
44
44
  return async (request, runtime) => builder.handleRequest(request, runtime);
45
45
  }
46
46
  exports.buildRuntimeRequestHandler = buildRuntimeRequestHandler;
47
- //# sourceMappingURL=runtimeRequestHandlerBuilder.cjs.map
47
+ //# sourceMappingURL=runtimeRequestHandlerBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeRequestHandlerBuilder.js","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"]}
@@ -4,4 +4,4 @@
4
4
  */
5
5
  export { RuntimeRequestHandler } from "./requestHandlers.mjs";
6
6
  export { buildRuntimeRequestHandler } from "./runtimeRequestHandlerBuilder.mjs";
7
- //# sourceMappingURL=index.d.ts.map
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"}
@@ -7,10 +7,6 @@ import { RequestParser } from '@fluidframework/runtime-utils';
7
7
 
8
8
  /* Excluded from this release type: IContainerRuntime */
9
9
 
10
- /* Excluded from this release type: IRequest */
11
-
12
- /* Excluded from this release type: IResponse */
13
-
14
10
  /* Excluded from this release type: RequestParser */
15
11
 
16
12
  /* Excluded from this release type: RuntimeRequestHandler */
@@ -7,10 +7,6 @@ import { RequestParser } from '@fluidframework/runtime-utils';
7
7
 
8
8
  /* Excluded from this release type: IContainerRuntime */
9
9
 
10
- /* Excluded from this release type: IRequest */
11
-
12
- /* Excluded from this release type: IResponse */
13
-
14
10
  /* Excluded from this release type: RequestParser */
15
11
 
16
12
  /* Excluded from this release type: RuntimeRequestHandler */
@@ -15,4 +15,4 @@ import { RequestParser } from "@fluidframework/runtime-utils";
15
15
  * @alpha
16
16
  */
17
17
  export type RuntimeRequestHandler = (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
18
- //# sourceMappingURL=requestHandlers.d.ts.map
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"}
@@ -11,4 +11,4 @@ import { RuntimeRequestHandler } from "./requestHandlers.mjs";
11
11
  * @internal
12
12
  */
13
13
  export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
14
- //# sourceMappingURL=runtimeRequestHandlerBuilder.d.ts.map
14
+ //# sourceMappingURL=runtimeRequestHandlerBuilder.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeRequestHandlerBuilder.d.mts","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC;OAC9D,EAAE,iBAAiB,EAAE,MAAM,+CAA+C;OAG1E,EAAE,qBAAqB,EAAE;AA6BhC;;;;GAIG;AAEH,wBAAgB,0BAA0B,CAAC,GAAG,QAAQ,EAAE,qBAAqB,EAAE,aAGvD,QAAQ,WAAW,iBAAiB,wBAE3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/request-handler",
3
- "version": "2.0.0-internal.8.0.1",
3
+ "version": "2.0.0-rc.1.0.0",
4
4
  "description": "A simple request handling library for Fluid Framework",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -11,20 +11,72 @@
11
11
  "license": "MIT",
12
12
  "author": "Microsoft and contributors",
13
13
  "sideEffects": false,
14
- "main": "dist/index.cjs",
14
+ "exports": {
15
+ ".": {
16
+ "import": {
17
+ "types": "./lib/index.d.mts",
18
+ "default": "./lib/index.mjs"
19
+ },
20
+ "require": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.js"
23
+ }
24
+ },
25
+ "./alpha": {
26
+ "import": {
27
+ "types": "./lib/request-handler-alpha.d.mts",
28
+ "default": "./lib/index.mjs"
29
+ },
30
+ "require": {
31
+ "types": "./dist/request-handler-alpha.d.ts",
32
+ "default": "./dist/index.js"
33
+ }
34
+ },
35
+ "./beta": {
36
+ "import": {
37
+ "types": "./lib/request-handler-beta.d.mts",
38
+ "default": "./lib/index.mjs"
39
+ },
40
+ "require": {
41
+ "types": "./dist/request-handler-beta.d.ts",
42
+ "default": "./dist/index.js"
43
+ }
44
+ },
45
+ "./internal": {
46
+ "import": {
47
+ "types": "./lib/index.d.mts",
48
+ "default": "./lib/index.mjs"
49
+ },
50
+ "require": {
51
+ "types": "./dist/index.d.ts",
52
+ "default": "./dist/index.js"
53
+ }
54
+ },
55
+ "./public": {
56
+ "import": {
57
+ "types": "./lib/request-handler-public.d.mts",
58
+ "default": "./lib/index.mjs"
59
+ },
60
+ "require": {
61
+ "types": "./dist/request-handler-public.d.ts",
62
+ "default": "./dist/index.js"
63
+ }
64
+ }
65
+ },
66
+ "main": "dist/index.js",
15
67
  "module": "lib/index.mjs",
16
68
  "types": "dist/index.d.ts",
17
69
  "c8": {
18
70
  "all": true,
19
71
  "cache-dir": "nyc/.cache",
20
72
  "exclude": [
21
- "src/test/**/*.ts",
22
- "dist/test/**/*.cjs"
73
+ "src/test/**/*.*ts",
74
+ "dist/test/**/*.*js"
23
75
  ],
24
76
  "exclude-after-remap": false,
25
77
  "include": [
26
- "src/**/*.ts",
27
- "dist/**/*.cjs"
78
+ "src/**/*.*ts",
79
+ "dist/**/*.*js"
28
80
  ],
29
81
  "report-dir": "nyc/report",
30
82
  "reporter": [
@@ -35,26 +87,26 @@
35
87
  "temp-directory": "nyc/.nyc_output"
36
88
  },
37
89
  "dependencies": {
38
- "@fluidframework/container-runtime-definitions": ">=2.0.0-internal.8.0.1 <2.0.0-internal.8.1.0",
39
- "@fluidframework/core-interfaces": ">=2.0.0-internal.8.0.1 <2.0.0-internal.8.1.0",
40
- "@fluidframework/core-utils": ">=2.0.0-internal.8.0.1 <2.0.0-internal.8.1.0",
41
- "@fluidframework/runtime-definitions": ">=2.0.0-internal.8.0.1 <2.0.0-internal.8.1.0",
42
- "@fluidframework/runtime-utils": ">=2.0.0-internal.8.0.1 <2.0.0-internal.8.1.0"
90
+ "@fluidframework/container-runtime-definitions": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
91
+ "@fluidframework/core-interfaces": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
92
+ "@fluidframework/core-utils": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
93
+ "@fluidframework/runtime-definitions": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
94
+ "@fluidframework/runtime-utils": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0"
43
95
  },
44
96
  "devDependencies": {
45
97
  "@arethetypeswrong/cli": "^0.13.3",
46
- "@fluid-tools/build-cli": "^0.28.0",
98
+ "@fluid-tools/build-cli": "^0.29.0",
47
99
  "@fluidframework/build-common": "^2.0.3",
48
- "@fluidframework/build-tools": "^0.28.0",
49
- "@fluidframework/eslint-config-fluid": "^3.1.0",
50
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.8.0.1 <2.0.0-internal.8.1.0",
51
- "@fluidframework/request-handler-previous": "npm:@fluidframework/request-handler@2.0.0-internal.7.2.0",
52
- "@fluidframework/test-runtime-utils": ">=2.0.0-internal.8.0.1 <2.0.0-internal.8.1.0",
100
+ "@fluidframework/build-tools": "^0.29.0",
101
+ "@fluidframework/eslint-config-fluid": "^3.2.0",
102
+ "@fluidframework/mocha-test-setup": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
103
+ "@fluidframework/request-handler-previous": "npm:@fluidframework/request-handler@2.0.0-internal.8.0.0",
104
+ "@fluidframework/test-runtime-utils": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
53
105
  "@microsoft/api-extractor": "^7.38.3",
54
106
  "@types/diff": "^3.5.1",
55
107
  "@types/mocha": "^9.1.1",
56
108
  "@types/node": "^18.19.0",
57
- "c8": "^7.7.1",
109
+ "c8": "^8.0.1",
58
110
  "copyfiles": "^2.4.1",
59
111
  "cross-env": "^7.0.3",
60
112
  "diff": "^3.5.0",
@@ -81,36 +133,19 @@
81
133
  }
82
134
  },
83
135
  "typeValidation": {
84
- "broken": {
85
- "RemovedVariableDeclaration_createFluidObjectResponse": {
86
- "forwardCompat": false,
87
- "backCompat": false
88
- },
89
- "RemovedVariableDeclaration_rootDataStoreRequestHandler": {
90
- "forwardCompat": false,
91
- "backCompat": false
92
- },
93
- "RemovedFunctionDeclaration_handleFromLegacyUri": {
94
- "forwardCompat": false,
95
- "backCompat": false
96
- },
97
- "RemovedClassDeclaration_RuntimeRequestHandlerBuilder": {
98
- "forwardCompat": false,
99
- "backCompat": false
100
- }
101
- }
136
+ "broken": {}
102
137
  },
103
138
  "scripts": {
104
139
  "api": "fluid-build . --task api",
105
140
  "api-extractor:commonjs": "api-extractor run --local",
106
- "api-extractor:esnext": "copyfiles -u 1 \"dist/**/*-@(alpha|beta|public|untrimmed).d.ts\" lib",
141
+ "api-extractor:esnext": "api-extractor run --config ./api-extractor-esm.json",
107
142
  "build": "fluid-build . --task build",
108
143
  "build:commonjs": "fluid-build . --task commonjs",
109
144
  "build:compile": "fluid-build . --task compile",
110
145
  "build:docs": "fluid-build . --task api",
111
146
  "build:esnext": "tsc-multi --config ../../../common/build/build-common/tsc-multi.esm.json",
112
- "build:test": "tsc-multi --config ./tsc-multi.test.json",
113
- "check:are-the-types-wrong": "attw --pack",
147
+ "build:test": "tsc --project ./src/test/tsconfig.json",
148
+ "check:are-the-types-wrong": "attw --pack . --entrypoints .",
114
149
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
115
150
  "ci:build:docs": "api-extractor run",
116
151
  "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
@@ -125,7 +160,7 @@
125
160
  "test:coverage": "c8 npm test",
126
161
  "test:mocha": "mocha --ignore \"dist/test/types/*\" --recursive dist/test --exit -r node_modules/@fluidframework/mocha-test-setup",
127
162
  "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
128
- "tsc": "tsc-multi --config ../../../common/build/build-common/tsc-multi.cjs.json",
163
+ "tsc": "tsc",
129
164
  "typetests:gen": "fluid-type-test-generator",
130
165
  "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
131
166
  }
@@ -1 +0,0 @@
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"]}
@@ -1 +0,0 @@
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"]}
@@ -1 +0,0 @@
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"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,qBAAqB,EAAE;OACzB,EAAE,0BAA0B,EAAE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"requestHandlers.d.ts","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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtimeRequestHandlerBuilder.d.ts","sourceRoot":"","sources":["../src/runtimeRequestHandlerBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC;OAC9D,EAAE,iBAAiB,EAAE,MAAM,+CAA+C;OAG1E,EAAE,qBAAqB,EAAE;AA6BhC;;;;GAIG;AAEH,wBAAgB,0BAA0B,CAAC,GAAG,QAAQ,EAAE,qBAAqB,EAAE,aAGvD,QAAQ,WAAW,iBAAiB,wBAE3D"}
@@ -1,4 +0,0 @@
1
- {
2
- "targets": [{ "extname": ".cjs", "module": "CommonJS", "moduleResolution": "Node10" }],
3
- "projects": ["./tsconfig.json", "./src/test/tsconfig.json"]
4
- }