@modern-js/bff-core 1.2.2 → 1.17.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.
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ debug: true
8
+ };
9
+ Object.defineProperty(exports, "debug", {
10
+ enumerable: true,
11
+ get: function () {
12
+ return _debug.debug;
13
+ }
14
+ });
15
+
16
+ var _storage = require("./storage");
17
+
18
+ Object.keys(_storage).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
21
+ if (key in exports && exports[key] === _storage[key]) return;
22
+ Object.defineProperty(exports, key, {
23
+ enumerable: true,
24
+ get: function () {
25
+ return _storage[key];
26
+ }
27
+ });
28
+ });
29
+
30
+ var _alias = require("./alias");
31
+
32
+ Object.keys(_alias).forEach(function (key) {
33
+ if (key === "default" || key === "__esModule") return;
34
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
35
+ if (key in exports && exports[key] === _alias[key]) return;
36
+ Object.defineProperty(exports, key, {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _alias[key];
40
+ }
41
+ });
42
+ });
43
+
44
+ var _debug = require("./debug");
45
+
46
+ var _meta = require("./meta");
47
+
48
+ Object.keys(_meta).forEach(function (key) {
49
+ if (key === "default" || key === "__esModule") return;
50
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
51
+ if (key in exports && exports[key] === _meta[key]) return;
52
+ Object.defineProperty(exports, key, {
53
+ enumerable: true,
54
+ get: function () {
55
+ return _meta[key];
56
+ }
57
+ });
58
+ });
59
+
60
+ var _validate = require("./validate");
61
+
62
+ Object.keys(_validate).forEach(function (key) {
63
+ if (key === "default" || key === "__esModule") return;
64
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
65
+ if (key in exports && exports[key] === _validate[key]) return;
66
+ Object.defineProperty(exports, key, {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _validate[key];
70
+ }
71
+ });
72
+ });
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isWithMetaHandler = exports.HANDLER_WITH_META = void 0;
7
+ const HANDLER_WITH_META = 'HANDLER_WITH_META';
8
+ exports.HANDLER_WITH_META = HANDLER_WITH_META;
9
+
10
+ const isWithMetaHandler = handler => {
11
+ return typeof handler === 'function' && handler[HANDLER_WITH_META];
12
+ };
13
+
14
+ exports.isWithMetaHandler = isWithMetaHandler;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createStorage = void 0;
7
+
8
+ var ah = _interopRequireWildcard(require("async_hooks"));
9
+
10
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+
12
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+
14
+ const createStorage = () => {
15
+ let storage;
16
+
17
+ if (typeof ah.AsyncLocalStorage !== 'undefined') {
18
+ storage = new ah.AsyncLocalStorage();
19
+ }
20
+
21
+ const run = (context, cb) => {
22
+ if (!storage) {
23
+ throw new Error(`Unable to use async_hook, please confirm the node version >= 12.17
24
+ `);
25
+ }
26
+
27
+ return new Promise((resolve, reject) => {
28
+ storage.run(context, () => {
29
+ try {
30
+ return resolve(cb());
31
+ } catch (error) {
32
+ return reject(error);
33
+ }
34
+ });
35
+ });
36
+ };
37
+
38
+ const useContext = () => {
39
+ if (!storage) {
40
+ throw new Error(`Unable to use async_hook, please confirm the node version >= 12.17
41
+ `);
42
+ }
43
+
44
+ const context = storage.getStore();
45
+
46
+ if (!context) {
47
+ throw new Error(`Can't call useContext out of scope, it should be placed in the bff function`);
48
+ }
49
+
50
+ return context;
51
+ };
52
+
53
+ return {
54
+ run,
55
+ useContext
56
+ };
57
+ };
58
+
59
+ exports.createStorage = createStorage;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.validateFunction = exports.getTypeErrorMessage = exports.ERR_INVALID_ARG_TYPE = void 0;
7
+
8
+ var _util = _interopRequireDefault(require("util"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ // fork from https://github.com/nodejs/node/blob/master/lib/internal/errors.js
13
+ const getTypeErrorMessage = actual => {
14
+ let msg = '';
15
+
16
+ if (actual == null) {
17
+ msg += `. Received ${actual}`;
18
+ } else if (typeof actual === 'function' && actual.name) {
19
+ msg += `. Received function ${actual.name}`;
20
+ } else if (typeof actual === 'object') {
21
+ var _actual$constructor;
22
+
23
+ if ((_actual$constructor = actual.constructor) !== null && _actual$constructor !== void 0 && _actual$constructor.name) {
24
+ msg += `. Received an instance of ${actual.constructor.name}`;
25
+ } else {
26
+ const inspected = _util.default.inspect(actual, {
27
+ depth: -1
28
+ });
29
+
30
+ msg += `. Received ${inspected}`;
31
+ }
32
+ } else {
33
+ let inspected = _util.default.inspect(actual, {
34
+ colors: false
35
+ });
36
+
37
+ if (inspected.length > 25) {
38
+ inspected = `${inspected.slice(0, 25)}...`;
39
+ }
40
+
41
+ msg += `. Received type ${typeof actual} (${inspected})`;
42
+ }
43
+
44
+ return msg;
45
+ }; // eslint-disable-next-line @typescript-eslint/naming-convention
46
+
47
+
48
+ exports.getTypeErrorMessage = getTypeErrorMessage;
49
+
50
+ class ERR_INVALID_ARG_TYPE extends Error {
51
+ constructor(funcName, expectedType, actual) {
52
+ const message = `[ERR_INVALID_ARG_TYPE]: The '${funcName}' argument must be of type ${expectedType}${getTypeErrorMessage(actual)}`;
53
+ super(message);
54
+ }
55
+
56
+ }
57
+
58
+ exports.ERR_INVALID_ARG_TYPE = ERR_INVALID_ARG_TYPE;
59
+
60
+ const validateFunction = (maybeFunc, name) => {
61
+ if (typeof maybeFunc !== 'function') {
62
+ throw new ERR_INVALID_ARG_TYPE(name, 'function', maybeFunc);
63
+ }
64
+
65
+ return true;
66
+ };
67
+
68
+ exports.validateFunction = validateFunction;
@@ -2,6 +2,6 @@ export { Api } from './api';
2
2
  export { HttpError, ValidationError } from './errors/http';
3
3
  export * from './router';
4
4
  export * from './types';
5
- export * from './utils';
6
5
  export * from './client';
7
- export * from './operators/http';
6
+ export * from './operators/http';
7
+ export { getRelativeRuntimePath, HANDLER_WITH_META, isWithMetaHandler, createStorage, registerPaths } from './utils';
@@ -6,6 +6,7 @@ export * from './constants';
6
6
  export declare class ApiRouter {
7
7
  private apiDir;
8
8
  private lambdaDir;
9
+ private existLambda;
9
10
  private prefix;
10
11
  private apiFiles;
11
12
  constructor({
@@ -17,6 +18,8 @@ export declare class ApiRouter {
17
18
  lambdaDir?: string;
18
19
  prefix?: string;
19
20
  });
21
+ isExistLambda(): boolean;
22
+ getLambdaDir(): string;
20
23
  isApiFile(filename: string): boolean;
21
24
  getSingleModuleHandlers(filename: string): APIHandlerInfo[] | null;
22
25
  getHandlerInfo(filename: string, originFuncName: string, handler: ApiHandler): APIHandlerInfo | null;
@@ -32,10 +35,11 @@ export declare class ApiRouter {
32
35
  */
33
36
 
34
37
  private initPrefix;
38
+ private checkExistLambda;
35
39
  private validateAbsolute;
36
40
  private getAPIMode;
37
41
  private createExistChecker;
38
- private getLambdaDir;
42
+ private getExactLambdaDir;
39
43
  private getModuleInfos;
40
44
  private getModuleInfo;
41
45
  private getHandlerInfos;
@@ -0,0 +1,7 @@
1
+ interface Paths {
2
+ [key: string]: string[] | string;
3
+ }
4
+ export declare const getRelativeRuntimePath: (appDirectory: string, serverRuntimePath: string) => string;
5
+ export declare const createMatchPath: (paths: Paths) => (request: string) => string | null;
6
+ export declare const registerPaths: (paths: Paths) => () => void;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const debug: import("@modern-js/utils/compiled/debug").Debugger;
@@ -0,0 +1,5 @@
1
+ export * from './storage';
2
+ export * from './alias';
3
+ export { debug } from './debug';
4
+ export * from './meta';
5
+ export * from './validate';
@@ -0,0 +1,2 @@
1
+ export declare const HANDLER_WITH_META = "HANDLER_WITH_META";
2
+ export declare const isWithMetaHandler: (handler: any) => any;
@@ -0,0 +1,5 @@
1
+ declare const createStorage: <T>() => {
2
+ run: <O>(context: T, cb: () => O | Promise<O>) => Promise<O>;
3
+ useContext: () => T;
4
+ };
5
+ export { createStorage };
@@ -0,0 +1,5 @@
1
+ export declare const getTypeErrorMessage: (actual: unknown) => string;
2
+ export declare class ERR_INVALID_ARG_TYPE extends Error {
3
+ constructor(funcName: string, expectedType: string, actual: unknown);
4
+ }
5
+ export declare const validateFunction: (maybeFunc: unknown, name: string) => boolean;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.2",
14
+ "version": "1.17.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -25,16 +25,16 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.18.0",
28
- "@modern-js/bff-runtime": "^1.4.0",
29
- "@modern-js/utils": "^1.9.0",
28
+ "@modern-js/bff-runtime": "1.17.0",
29
+ "@modern-js/utils": "1.17.0",
30
30
  "esbuild": "^0.14.38",
31
31
  "esbuild-register": "^3.3.3",
32
32
  "koa-compose": "^4.1.0",
33
33
  "reflect-metadata": "^0.1.13"
34
34
  },
35
35
  "devDependencies": {
36
- "@scripts/build": "0.0.0",
37
- "@scripts/jest-config": "0.0.0",
36
+ "@scripts/build": "1.17.0",
37
+ "@scripts/jest-config": "1.17.0",
38
38
  "@types/jest": "^27",
39
39
  "@types/koa-compose": "^3.2.5",
40
40
  "@types/node": "^14",
@@ -1,136 +0,0 @@
1
- import util from 'util';
2
- import fs from 'fs';
3
- import Module from 'module';
4
- import path from 'path';
5
- import { createDebugger } from '@modern-js/utils';
6
- export const HANDLER_WITH_META = 'HANDLER_WITH_META';
7
- export const debug = createDebugger('bff'); // export const pick = <T extends Record<string, unknown>, K extends keyof T>(
8
- // obj: T,
9
- // keys: readonly K[],
10
- // ) => {
11
- // Object.entries(obj).filter(([key]) => {
12
- // return (keys as readonly string[]).includes(key);
13
- // });
14
- // };
15
- // fork from https://github.com/nodejs/node/blob/master/lib/internal/errors.js
16
-
17
- export const getTypeErrorMessage = actual => {
18
- let msg = '';
19
-
20
- if (actual == null) {
21
- msg += `. Received ${actual}`;
22
- } else if (typeof actual === 'function' && actual.name) {
23
- msg += `. Received function ${actual.name}`;
24
- } else if (typeof actual === 'object') {
25
- var _actual$constructor;
26
-
27
- if ((_actual$constructor = actual.constructor) !== null && _actual$constructor !== void 0 && _actual$constructor.name) {
28
- msg += `. Received an instance of ${actual.constructor.name}`;
29
- } else {
30
- const inspected = util.inspect(actual, {
31
- depth: -1
32
- });
33
- msg += `. Received ${inspected}`;
34
- }
35
- } else {
36
- let inspected = util.inspect(actual, {
37
- colors: false
38
- });
39
-
40
- if (inspected.length > 25) {
41
- inspected = `${inspected.slice(0, 25)}...`;
42
- }
43
-
44
- msg += `. Received type ${typeof actual} (${inspected})`;
45
- }
46
-
47
- return msg;
48
- }; // eslint-disable-next-line @typescript-eslint/naming-convention
49
-
50
- export class ERR_INVALID_ARG_TYPE extends Error {
51
- constructor(funcName, expectedType, actual) {
52
- const message = `[ERR_INVALID_ARG_TYPE]: The '${funcName}' argument must be of type ${expectedType}${getTypeErrorMessage(actual)}`;
53
- super(message);
54
- }
55
-
56
- }
57
- export const validateFunction = (maybeFunc, name) => {
58
- if (typeof maybeFunc !== 'function') {
59
- throw new ERR_INVALID_ARG_TYPE(name, 'function', maybeFunc);
60
- }
61
-
62
- return true;
63
- };
64
- export const isWithMetaHandler = handler => {
65
- return typeof handler === 'function' && handler[HANDLER_WITH_META];
66
- };
67
-
68
- const sortByLongestPrefix = arr => {
69
- return arr.concat().sort((a, b) => b.length - a.length);
70
- };
71
-
72
- export const createMatchPath = paths => {
73
- const sortedKeys = sortByLongestPrefix(Object.keys(paths));
74
- const sortedPaths = {};
75
- sortedKeys.forEach(key => {
76
- sortedPaths[key] = paths[key];
77
- });
78
- return request => {
79
- const found = Object.keys(sortedPaths).find(key => {
80
- return request.startsWith(key);
81
- });
82
-
83
- if (found) {
84
- let foundPaths = sortedPaths[found];
85
-
86
- if (!Array.isArray(foundPaths)) {
87
- foundPaths = [foundPaths];
88
- }
89
-
90
- foundPaths = foundPaths.filter(foundPath => path.isAbsolute(foundPath));
91
-
92
- for (const p of foundPaths) {
93
- const foundPath = request.replace(found, p);
94
-
95
- if (fs.existsSync(foundPath)) {
96
- return foundPath;
97
- }
98
- }
99
-
100
- return request.replace(found, foundPaths[0]);
101
- }
102
-
103
- return null;
104
- };
105
- }; // every path must be a absolute path;
106
-
107
- export const registerPaths = paths => {
108
- const originalResolveFilename = Module._resolveFilename; // eslint-disable-next-line node/no-unsupported-features/node-builtins
109
-
110
- const {
111
- builtinModules
112
- } = Module;
113
- const matchPath = createMatchPath(paths);
114
-
115
- Module._resolveFilename = function (request, _parent) {
116
- const isCoreModule = builtinModules.includes(request);
117
-
118
- if (!isCoreModule) {
119
- const matched = matchPath(request);
120
-
121
- if (matched) {
122
- // eslint-disable-next-line prefer-rest-params
123
- const modifiedArguments = [matched, ...[].slice.call(arguments, 1)]; // Passes all arguments. Even those that is not specified above.
124
-
125
- return originalResolveFilename.apply(this, modifiedArguments);
126
- }
127
- } // eslint-disable-next-line prefer-rest-params
128
-
129
-
130
- return originalResolveFilename.apply(this, arguments);
131
- };
132
-
133
- return () => {
134
- Module._resolveFilename = originalResolveFilename;
135
- };
136
- };
@@ -1,170 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.validateFunction = exports.registerPaths = exports.isWithMetaHandler = exports.getTypeErrorMessage = exports.debug = exports.createMatchPath = exports.HANDLER_WITH_META = exports.ERR_INVALID_ARG_TYPE = void 0;
7
-
8
- var _util = _interopRequireDefault(require("util"));
9
-
10
- var _fs = _interopRequireDefault(require("fs"));
11
-
12
- var _module = _interopRequireDefault(require("module"));
13
-
14
- var _path = _interopRequireDefault(require("path"));
15
-
16
- var _utils = require("@modern-js/utils");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- const HANDLER_WITH_META = 'HANDLER_WITH_META';
21
- exports.HANDLER_WITH_META = HANDLER_WITH_META;
22
- const debug = (0, _utils.createDebugger)('bff'); // export const pick = <T extends Record<string, unknown>, K extends keyof T>(
23
- // obj: T,
24
- // keys: readonly K[],
25
- // ) => {
26
- // Object.entries(obj).filter(([key]) => {
27
- // return (keys as readonly string[]).includes(key);
28
- // });
29
- // };
30
- // fork from https://github.com/nodejs/node/blob/master/lib/internal/errors.js
31
-
32
- exports.debug = debug;
33
-
34
- const getTypeErrorMessage = actual => {
35
- let msg = '';
36
-
37
- if (actual == null) {
38
- msg += `. Received ${actual}`;
39
- } else if (typeof actual === 'function' && actual.name) {
40
- msg += `. Received function ${actual.name}`;
41
- } else if (typeof actual === 'object') {
42
- var _actual$constructor;
43
-
44
- if ((_actual$constructor = actual.constructor) !== null && _actual$constructor !== void 0 && _actual$constructor.name) {
45
- msg += `. Received an instance of ${actual.constructor.name}`;
46
- } else {
47
- const inspected = _util.default.inspect(actual, {
48
- depth: -1
49
- });
50
-
51
- msg += `. Received ${inspected}`;
52
- }
53
- } else {
54
- let inspected = _util.default.inspect(actual, {
55
- colors: false
56
- });
57
-
58
- if (inspected.length > 25) {
59
- inspected = `${inspected.slice(0, 25)}...`;
60
- }
61
-
62
- msg += `. Received type ${typeof actual} (${inspected})`;
63
- }
64
-
65
- return msg;
66
- }; // eslint-disable-next-line @typescript-eslint/naming-convention
67
-
68
-
69
- exports.getTypeErrorMessage = getTypeErrorMessage;
70
-
71
- class ERR_INVALID_ARG_TYPE extends Error {
72
- constructor(funcName, expectedType, actual) {
73
- const message = `[ERR_INVALID_ARG_TYPE]: The '${funcName}' argument must be of type ${expectedType}${getTypeErrorMessage(actual)}`;
74
- super(message);
75
- }
76
-
77
- }
78
-
79
- exports.ERR_INVALID_ARG_TYPE = ERR_INVALID_ARG_TYPE;
80
-
81
- const validateFunction = (maybeFunc, name) => {
82
- if (typeof maybeFunc !== 'function') {
83
- throw new ERR_INVALID_ARG_TYPE(name, 'function', maybeFunc);
84
- }
85
-
86
- return true;
87
- };
88
-
89
- exports.validateFunction = validateFunction;
90
-
91
- const isWithMetaHandler = handler => {
92
- return typeof handler === 'function' && handler[HANDLER_WITH_META];
93
- };
94
-
95
- exports.isWithMetaHandler = isWithMetaHandler;
96
-
97
- const sortByLongestPrefix = arr => {
98
- return arr.concat().sort((a, b) => b.length - a.length);
99
- };
100
-
101
- const createMatchPath = paths => {
102
- const sortedKeys = sortByLongestPrefix(Object.keys(paths));
103
- const sortedPaths = {};
104
- sortedKeys.forEach(key => {
105
- sortedPaths[key] = paths[key];
106
- });
107
- return request => {
108
- const found = Object.keys(sortedPaths).find(key => {
109
- return request.startsWith(key);
110
- });
111
-
112
- if (found) {
113
- let foundPaths = sortedPaths[found];
114
-
115
- if (!Array.isArray(foundPaths)) {
116
- foundPaths = [foundPaths];
117
- }
118
-
119
- foundPaths = foundPaths.filter(foundPath => _path.default.isAbsolute(foundPath));
120
-
121
- for (const p of foundPaths) {
122
- const foundPath = request.replace(found, p);
123
-
124
- if (_fs.default.existsSync(foundPath)) {
125
- return foundPath;
126
- }
127
- }
128
-
129
- return request.replace(found, foundPaths[0]);
130
- }
131
-
132
- return null;
133
- };
134
- }; // every path must be a absolute path;
135
-
136
-
137
- exports.createMatchPath = createMatchPath;
138
-
139
- const registerPaths = paths => {
140
- const originalResolveFilename = _module.default._resolveFilename; // eslint-disable-next-line node/no-unsupported-features/node-builtins
141
-
142
- const {
143
- builtinModules
144
- } = _module.default;
145
- const matchPath = createMatchPath(paths);
146
-
147
- _module.default._resolveFilename = function (request, _parent) {
148
- const isCoreModule = builtinModules.includes(request);
149
-
150
- if (!isCoreModule) {
151
- const matched = matchPath(request);
152
-
153
- if (matched) {
154
- // eslint-disable-next-line prefer-rest-params
155
- const modifiedArguments = [matched, ...[].slice.call(arguments, 1)]; // Passes all arguments. Even those that is not specified above.
156
-
157
- return originalResolveFilename.apply(this, modifiedArguments);
158
- }
159
- } // eslint-disable-next-line prefer-rest-params
160
-
161
-
162
- return originalResolveFilename.apply(this, arguments);
163
- };
164
-
165
- return () => {
166
- _module.default._resolveFilename = originalResolveFilename;
167
- };
168
- };
169
-
170
- exports.registerPaths = registerPaths;
@@ -1,14 +0,0 @@
1
- export declare const HANDLER_WITH_META = "HANDLER_WITH_META";
2
- export declare const debug: import("@modern-js/utils/compiled/debug").Debugger;
3
- export declare const getTypeErrorMessage: (actual: unknown) => string;
4
- export declare class ERR_INVALID_ARG_TYPE extends Error {
5
- constructor(funcName: string, expectedType: string, actual: unknown);
6
- }
7
- export declare const validateFunction: (maybeFunc: unknown, name: string) => boolean;
8
- export declare const isWithMetaHandler: (handler: any) => any;
9
- interface Paths {
10
- [key: string]: string[] | string;
11
- }
12
- export declare const createMatchPath: (paths: Paths) => (request: string) => string | null;
13
- export declare const registerPaths: (paths: Paths) => () => void;
14
- export {};