@modern-js/prod-server 1.22.1 → 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +271 -17
- package/dist/js/modern/constants.js +32 -27
- package/dist/js/modern/index.js +11 -7
- package/dist/js/modern/libs/context/context.js +54 -132
- package/dist/js/modern/libs/context/index.js +5 -2
- package/dist/js/modern/libs/hook-api/index.js +134 -0
- package/dist/js/modern/libs/hook-api/route.js +13 -37
- package/dist/js/modern/libs/hook-api/template.js +41 -32
- package/dist/js/modern/libs/loadConfig.js +46 -32
- package/dist/js/modern/libs/metrics.js +6 -7
- package/dist/js/modern/libs/proxy.js +70 -44
- package/dist/js/modern/libs/render/cache/__tests__/cache.fun.test.js +112 -68
- package/dist/js/modern/libs/render/cache/__tests__/cache.test.js +246 -225
- package/dist/js/modern/libs/render/cache/__tests__/cacheable.js +43 -49
- package/dist/js/modern/libs/render/cache/__tests__/error-configuration.js +36 -34
- package/dist/js/modern/libs/render/cache/__tests__/matched-cache.js +83 -113
- package/dist/js/modern/libs/render/cache/index.js +93 -50
- package/dist/js/modern/libs/render/cache/page-caches/index.js +31 -8
- package/dist/js/modern/libs/render/cache/page-caches/lru.js +6 -16
- package/dist/js/modern/libs/render/cache/spr.js +133 -167
- package/dist/js/modern/libs/render/cache/type.js +0 -1
- package/dist/js/modern/libs/render/cache/util.js +71 -45
- package/dist/js/modern/libs/render/index.js +76 -61
- package/dist/js/modern/libs/render/measure.js +42 -34
- package/dist/js/modern/libs/render/reader.js +68 -76
- package/dist/js/modern/libs/render/ssr.js +63 -33
- package/dist/js/modern/libs/render/static.js +51 -37
- package/dist/js/modern/libs/render/type.js +9 -7
- package/dist/js/modern/libs/route/index.js +12 -30
- package/dist/js/modern/libs/route/matcher.js +28 -50
- package/dist/js/modern/libs/route/route.js +9 -31
- package/dist/js/modern/libs/serve-file.js +40 -20
- package/dist/js/modern/server/index.js +152 -168
- package/dist/js/modern/server/modern-server-split.js +44 -60
- package/dist/js/modern/server/modern-server.js +416 -526
- package/dist/js/modern/type.js +0 -1
- package/dist/js/modern/utils.js +62 -58
- package/dist/js/modern/worker-server.js +54 -0
- package/dist/js/node/constants.js +53 -32
- package/dist/js/node/index.js +37 -67
- package/dist/js/node/libs/context/context.js +84 -150
- package/dist/js/node/libs/context/index.js +28 -16
- package/dist/js/node/libs/hook-api/index.js +164 -0
- package/dist/js/node/libs/hook-api/route.js +35 -45
- package/dist/js/node/libs/hook-api/template.js +64 -40
- package/dist/js/node/libs/loadConfig.js +74 -55
- package/dist/js/node/libs/metrics.js +28 -12
- package/dist/js/node/libs/proxy.js +90 -55
- package/dist/js/node/libs/render/cache/__tests__/cache.fun.test.js +99 -61
- package/dist/js/node/libs/render/cache/__tests__/cache.test.js +147 -140
- package/dist/js/node/libs/render/cache/__tests__/cacheable.js +65 -55
- package/dist/js/node/libs/render/cache/__tests__/error-configuration.js +58 -40
- package/dist/js/node/libs/render/cache/__tests__/matched-cache.js +105 -119
- package/dist/js/node/libs/render/cache/index.js +115 -65
- package/dist/js/node/libs/render/cache/page-caches/index.js +54 -16
- package/dist/js/node/libs/render/cache/page-caches/lru.js +33 -26
- package/dist/js/node/libs/render/cache/spr.js +161 -188
- package/dist/js/node/libs/render/cache/type.js +15 -5
- package/dist/js/node/libs/render/cache/util.js +99 -63
- package/dist/js/node/libs/render/index.js +106 -87
- package/dist/js/node/libs/render/measure.js +61 -44
- package/dist/js/node/libs/render/reader.js +98 -100
- package/dist/js/node/libs/render/ssr.js +92 -58
- package/dist/js/node/libs/render/static.js +80 -53
- package/dist/js/node/libs/render/type.js +31 -13
- package/dist/js/node/libs/route/index.js +35 -44
- package/dist/js/node/libs/route/matcher.js +48 -65
- package/dist/js/node/libs/route/route.js +29 -37
- package/dist/js/node/libs/serve-file.js +74 -37
- package/dist/js/node/server/index.js +170 -203
- package/dist/js/node/server/modern-server-split.js +70 -73
- package/dist/js/node/server/modern-server.js +432 -577
- package/dist/js/node/type.js +15 -3
- package/dist/js/node/utils.js +87 -93
- package/dist/js/node/worker-server.js +77 -0
- package/dist/js/treeshaking/constants.js +29 -0
- package/dist/js/treeshaking/index.js +13 -0
- package/dist/js/treeshaking/libs/context/context.js +274 -0
- package/dist/js/treeshaking/libs/context/index.js +5 -0
- package/dist/js/treeshaking/libs/hook-api/index.js +281 -0
- package/dist/js/treeshaking/libs/hook-api/route.js +68 -0
- package/dist/js/treeshaking/libs/hook-api/template.js +127 -0
- package/dist/js/treeshaking/libs/loadConfig.js +82 -0
- package/dist/js/treeshaking/libs/metrics.js +6 -0
- package/dist/js/treeshaking/libs/proxy.js +244 -0
- package/dist/js/treeshaking/libs/render/cache/__tests__/cache.fun.test.js +291 -0
- package/dist/js/treeshaking/libs/render/cache/__tests__/cache.test.js +781 -0
- package/dist/js/treeshaking/libs/render/cache/__tests__/cacheable.js +67 -0
- package/dist/js/treeshaking/libs/render/cache/__tests__/error-configuration.js +45 -0
- package/dist/js/treeshaking/libs/render/cache/__tests__/matched-cache.js +147 -0
- package/dist/js/treeshaking/libs/render/cache/index.js +346 -0
- package/dist/js/treeshaking/libs/render/cache/page-caches/index.js +154 -0
- package/dist/js/treeshaking/libs/render/cache/page-caches/lru.js +84 -0
- package/dist/js/treeshaking/libs/render/cache/spr.js +492 -0
- package/dist/js/treeshaking/libs/render/cache/type.js +1 -0
- package/dist/js/treeshaking/libs/render/cache/util.js +280 -0
- package/dist/js/treeshaking/libs/render/index.js +233 -0
- package/dist/js/treeshaking/libs/render/measure.js +146 -0
- package/dist/js/treeshaking/libs/render/reader.js +339 -0
- package/dist/js/treeshaking/libs/render/ssr.js +223 -0
- package/dist/js/treeshaking/libs/render/static.js +216 -0
- package/dist/js/treeshaking/libs/render/type.js +7 -0
- package/dist/js/treeshaking/libs/route/index.js +130 -0
- package/dist/js/treeshaking/libs/route/matcher.js +138 -0
- package/dist/js/treeshaking/libs/route/route.js +40 -0
- package/dist/js/treeshaking/libs/serve-file.js +184 -0
- package/dist/js/treeshaking/server/index.js +505 -0
- package/dist/js/treeshaking/server/modern-server-split.js +360 -0
- package/dist/js/treeshaking/server/modern-server.js +1083 -0
- package/dist/js/treeshaking/type.js +1 -0
- package/dist/js/treeshaking/utils.js +147 -0
- package/dist/js/treeshaking/worker-server.js +177 -0
- package/dist/types/libs/context/context.d.ts +1 -1
- package/dist/types/libs/hook-api/index.d.ts +5 -0
- package/dist/types/libs/hook-api/route.d.ts +9 -14
- package/dist/types/libs/hook-api/template.d.ts +19 -9
- package/dist/types/libs/render/cache/index.d.ts +4 -2
- package/dist/types/libs/render/type.d.ts +3 -1
- package/dist/types/libs/route/route.d.ts +0 -1
- package/dist/types/libs/serve-file.d.ts +2 -1
- package/dist/types/server/index.d.ts +2 -0
- package/dist/types/server/modern-server.d.ts +11 -11
- package/dist/types/type.d.ts +8 -10
- package/dist/types/utils.d.ts +3 -4
- package/dist/types/worker-server.d.ts +15 -0
- package/package.json +31 -45
- package/dist/js/modern/libs/render/modern/browser-list.js +0 -7
- package/dist/js/modern/libs/render/modern/index.js +0 -48
- package/dist/js/node/libs/render/modern/browser-list.js +0 -14
- package/dist/js/node/libs/render/modern/index.js +0 -64
- package/dist/types/libs/render/modern/browser-list.d.ts +0 -1
- package/dist/types/libs/render/modern/index.d.ts +0 -3
|
@@ -1,48 +1,32 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
3
1
|
import { RouteMatcher } from "./matcher";
|
|
4
|
-
|
|
2
|
+
class RouteMatchManager {
|
|
5
3
|
constructor() {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_defineProperty(this, "specs", []);
|
|
9
|
-
|
|
4
|
+
this.specs = [];
|
|
10
5
|
this.matchers = [];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
}
|
|
14
7
|
filter(pathname) {
|
|
15
8
|
return this.matchers.reduce((matches, matcher) => {
|
|
16
9
|
if (matcher.matchUrlPath(pathname)) {
|
|
17
10
|
matches.push(matcher);
|
|
18
11
|
}
|
|
19
|
-
|
|
20
12
|
return matches;
|
|
21
13
|
}, []);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
}
|
|
25
15
|
best(pathname, matches) {
|
|
26
16
|
let best;
|
|
27
17
|
let matchedLen = 0;
|
|
28
|
-
|
|
29
18
|
for (const match of matches) {
|
|
30
19
|
const len = match.matchLength(pathname);
|
|
31
|
-
|
|
32
20
|
if (len === null) {
|
|
33
21
|
continue;
|
|
34
22
|
}
|
|
35
|
-
|
|
36
23
|
if (len > matchedLen) {
|
|
37
24
|
best = match;
|
|
38
25
|
matchedLen = len;
|
|
39
26
|
}
|
|
40
27
|
}
|
|
41
|
-
|
|
42
28
|
return best;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
}
|
|
46
30
|
reset(specs) {
|
|
47
31
|
this.specs = specs;
|
|
48
32
|
const matchers = specs.reduce((ms, spec) => {
|
|
@@ -50,23 +34,21 @@ export class RouteMatchManager {
|
|
|
50
34
|
return ms;
|
|
51
35
|
}, []);
|
|
52
36
|
this.matchers = matchers;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
}
|
|
56
38
|
match(pathname) {
|
|
57
39
|
const matches = this.filter(pathname);
|
|
58
40
|
const best = this.best(pathname, matches);
|
|
59
41
|
return best;
|
|
60
42
|
}
|
|
61
|
-
|
|
62
43
|
matchEntry(entryname) {
|
|
63
|
-
return this.matchers.find(matcher => matcher.matchEntry(entryname));
|
|
44
|
+
return this.matchers.find((matcher) => matcher.matchEntry(entryname));
|
|
64
45
|
}
|
|
65
|
-
|
|
66
46
|
getBundles() {
|
|
67
|
-
const bundles = this.specs.filter(route => route.isSSR).map(route => route.bundle);
|
|
47
|
+
const bundles = this.specs.filter((route) => route.isSSR).map((route) => route.bundle);
|
|
68
48
|
return bundles;
|
|
69
49
|
}
|
|
70
|
-
|
|
71
50
|
}
|
|
72
|
-
export {
|
|
51
|
+
export {
|
|
52
|
+
RouteMatchManager,
|
|
53
|
+
RouteMatcher
|
|
54
|
+
};
|
|
@@ -1,38 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { ModernRoute } from "./route";
|
|
7
|
-
|
|
1
|
+
import {
|
|
2
|
+
match,
|
|
3
|
+
pathToRegexp,
|
|
4
|
+
compile
|
|
5
|
+
} from "path-to-regexp";
|
|
6
|
+
import { ModernRoute } from "./route";
|
|
7
|
+
const removeTailSlash = (s) => s.replace(/\/+$/, "");
|
|
8
|
+
const toPath = (reg, params) => {
|
|
9
|
+
const fn = compile(reg, { encode: encodeURIComponent });
|
|
10
|
+
return fn(params);
|
|
11
|
+
};
|
|
8
12
|
const regCharsDetector = /[^a-zA-Z\-_0-9\/\.]/;
|
|
9
|
-
|
|
13
|
+
class RouteMatcher {
|
|
10
14
|
constructor(spec) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
_defineProperty(this, "urlPath", '');
|
|
14
|
-
|
|
15
|
-
_defineProperty(this, "urlMatcher", void 0);
|
|
16
|
-
|
|
17
|
-
_defineProperty(this, "urlReg", void 0);
|
|
18
|
-
|
|
15
|
+
this.urlPath = "";
|
|
19
16
|
this.spec = spec;
|
|
20
17
|
this.setupUrlPath();
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
}
|
|
24
19
|
generate(url) {
|
|
25
20
|
const route = new ModernRoute(this.spec);
|
|
26
|
-
|
|
27
21
|
if (this.urlPath) {
|
|
28
22
|
const params = this.parseURLParams(url);
|
|
29
23
|
route.urlPath = toPath(route.urlPath, params);
|
|
30
24
|
route.params = params;
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
return route;
|
|
34
27
|
}
|
|
35
|
-
|
|
36
28
|
parseURLParams(pathname) {
|
|
37
29
|
if (!this.urlMatcher) {
|
|
38
30
|
return {};
|
|
@@ -40,56 +32,40 @@ export class RouteMatcher {
|
|
|
40
32
|
const matchResult = this.urlMatcher(pathname);
|
|
41
33
|
return matchResult.params;
|
|
42
34
|
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
}
|
|
46
36
|
matchLength(pathname) {
|
|
37
|
+
var _a;
|
|
47
38
|
if (!this.urlReg) {
|
|
48
39
|
return this.urlPath.length;
|
|
49
40
|
} else {
|
|
50
|
-
var _result$;
|
|
51
|
-
|
|
52
41
|
const result = this.urlReg.exec(pathname);
|
|
53
|
-
return (
|
|
42
|
+
return ((_a = result == null ? void 0 : result[0]) == null ? void 0 : _a.length) || null;
|
|
54
43
|
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
}
|
|
58
45
|
matchUrlPath(requestUrl) {
|
|
59
|
-
let urlWithoutSlash = requestUrl.endsWith(
|
|
60
|
-
|
|
61
|
-
if (urlWithoutSlash.endsWith('.html')) {
|
|
46
|
+
let urlWithoutSlash = requestUrl.endsWith("/") && requestUrl !== "/" ? requestUrl.slice(0, -1) : requestUrl;
|
|
47
|
+
if (urlWithoutSlash.endsWith(".html")) {
|
|
62
48
|
urlWithoutSlash = urlWithoutSlash.slice(0, -5);
|
|
63
49
|
}
|
|
64
|
-
|
|
65
50
|
if (this.urlMatcher) {
|
|
66
51
|
return Boolean(this.urlMatcher(urlWithoutSlash));
|
|
67
52
|
} else {
|
|
68
53
|
if (urlWithoutSlash.startsWith(this.urlPath)) {
|
|
69
|
-
|
|
70
|
-
if (this.urlPath !== '/' && urlWithoutSlash.length > this.urlPath.length && !urlWithoutSlash.startsWith(`${this.urlPath}/`)) {
|
|
54
|
+
if (this.urlPath !== "/" && urlWithoutSlash.length > this.urlPath.length && !urlWithoutSlash.startsWith(`${this.urlPath}/`)) {
|
|
71
55
|
return false;
|
|
72
56
|
}
|
|
73
|
-
|
|
74
57
|
return true;
|
|
75
58
|
}
|
|
76
|
-
|
|
77
59
|
return false;
|
|
78
60
|
}
|
|
79
61
|
}
|
|
80
|
-
|
|
81
62
|
matchEntry(entryName) {
|
|
82
63
|
return this.spec.entryName === entryName;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
64
|
+
}
|
|
86
65
|
setupUrlPath() {
|
|
87
|
-
const {
|
|
88
|
-
|
|
89
|
-
} = this.spec;
|
|
90
|
-
this.urlPath = urlPath === '/' ? urlPath : removeTailSlash(urlPath);
|
|
66
|
+
const { urlPath } = this.spec;
|
|
67
|
+
this.urlPath = urlPath === "/" ? urlPath : removeTailSlash(urlPath);
|
|
91
68
|
const useReg = regCharsDetector.test(urlPath);
|
|
92
|
-
|
|
93
69
|
if (useReg) {
|
|
94
70
|
this.urlMatcher = match(urlPath, {
|
|
95
71
|
end: false,
|
|
@@ -100,5 +76,7 @@ export class RouteMatcher {
|
|
|
100
76
|
});
|
|
101
77
|
}
|
|
102
78
|
}
|
|
103
|
-
|
|
104
|
-
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
RouteMatcher
|
|
82
|
+
};
|
|
@@ -1,38 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export class ModernRoute {
|
|
1
|
+
class ModernRoute {
|
|
4
2
|
constructor(routeSpec) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
_defineProperty(this, "entryName", void 0);
|
|
8
|
-
|
|
9
|
-
_defineProperty(this, "urlPath", void 0);
|
|
10
|
-
|
|
11
|
-
_defineProperty(this, "entryPath", void 0);
|
|
12
|
-
|
|
13
|
-
_defineProperty(this, "bundle", void 0);
|
|
14
|
-
|
|
15
|
-
_defineProperty(this, "isApi", void 0);
|
|
16
|
-
|
|
17
|
-
_defineProperty(this, "isSSR", void 0);
|
|
18
|
-
|
|
19
|
-
_defineProperty(this, "isSPA", void 0);
|
|
20
|
-
|
|
21
|
-
_defineProperty(this, "enableModernMode", void 0);
|
|
22
|
-
|
|
23
|
-
_defineProperty(this, "params", {});
|
|
24
|
-
|
|
25
|
-
_defineProperty(this, "responseHeaders", void 0);
|
|
26
|
-
|
|
27
|
-
this.entryName = routeSpec.entryName || '';
|
|
3
|
+
this.params = {};
|
|
4
|
+
this.entryName = routeSpec.entryName || "";
|
|
28
5
|
this.urlPath = routeSpec.urlPath;
|
|
29
|
-
this.entryPath = routeSpec.entryPath ||
|
|
6
|
+
this.entryPath = routeSpec.entryPath || "";
|
|
30
7
|
this.isSSR = routeSpec.isSSR || false;
|
|
31
8
|
this.isSPA = routeSpec.isSPA || false;
|
|
32
9
|
this.isApi = routeSpec.isApi || false;
|
|
33
|
-
this.bundle = routeSpec.bundle ||
|
|
34
|
-
this.enableModernMode = (_routeSpec$enableMode = routeSpec.enableModernMode) !== null && _routeSpec$enableMode !== void 0 ? _routeSpec$enableMode : false;
|
|
10
|
+
this.bundle = routeSpec.bundle || "";
|
|
35
11
|
this.responseHeaders = routeSpec.responseHeaders;
|
|
36
12
|
}
|
|
37
|
-
|
|
38
|
-
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
ModernRoute
|
|
16
|
+
};
|
|
@@ -1,8 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import serve from "serve-static";
|
|
22
|
+
import { isString, isRegExp } from "@modern-js/utils";
|
|
4
23
|
import { useLocalPrefix } from "../utils";
|
|
5
|
-
|
|
6
24
|
const removedPrefix = (req, prefix) => {
|
|
7
25
|
if (useLocalPrefix(prefix)) {
|
|
8
26
|
req.url = req.url.slice(prefix.length);
|
|
@@ -10,31 +28,29 @@ const removedPrefix = (req, prefix) => {
|
|
|
10
28
|
req.url = prefix + req.url;
|
|
11
29
|
};
|
|
12
30
|
} else {
|
|
13
|
-
return () => {
|
|
31
|
+
return () => {
|
|
14
32
|
};
|
|
15
33
|
}
|
|
16
34
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = output;
|
|
28
|
-
const hitRule = rules.find(item => {
|
|
35
|
+
const faviconFallbackHandler = (context, next) => {
|
|
36
|
+
if (context.url === "/favicon.ico") {
|
|
37
|
+
context.res.statusCode = 204;
|
|
38
|
+
context.res.end();
|
|
39
|
+
} else {
|
|
40
|
+
next();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const createStaticFileHandler = (rules, output = {}) => (context, next) => __async(void 0, null, function* () {
|
|
44
|
+
const { url: requestUrl, req, res } = context;
|
|
45
|
+
const { assetPrefix = "/" } = output;
|
|
46
|
+
const hitRule = rules.find((item) => {
|
|
29
47
|
if (isString(item.path) && requestUrl.startsWith(item.path)) {
|
|
30
48
|
return true;
|
|
31
49
|
} else if (isRegExp(item.path) && item.path.test(requestUrl)) {
|
|
32
50
|
return true;
|
|
33
51
|
}
|
|
34
|
-
|
|
35
52
|
return false;
|
|
36
53
|
});
|
|
37
|
-
|
|
38
54
|
if (hitRule) {
|
|
39
55
|
const resume = removedPrefix(req, assetPrefix);
|
|
40
56
|
serve(hitRule.target)(req, res, () => {
|
|
@@ -44,4 +60,8 @@ async (context, next) => {
|
|
|
44
60
|
} else {
|
|
45
61
|
return next();
|
|
46
62
|
}
|
|
47
|
-
};
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
createStaticFileHandler,
|
|
66
|
+
faviconFallbackHandler
|
|
67
|
+
};
|