@modern-js/prod-server 2.0.0-beta.0 → 2.0.0-beta.1
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 +55 -0
- package/dist/js/modern/constants.js +0 -2
- package/dist/js/modern/index.js +0 -1
- package/dist/js/modern/libs/context/context.js +10 -56
- package/dist/js/modern/libs/hook-api/index.js +0 -31
- package/dist/js/modern/libs/hook-api/route.js +0 -8
- package/dist/js/modern/libs/hook-api/template.js +0 -16
- package/dist/js/modern/libs/loadConfig.js +3 -10
- package/dist/js/modern/libs/metrics.js +6 -6
- package/dist/js/modern/libs/proxy.js +7 -12
- package/dist/js/modern/libs/render/cache/__tests__/cache.fun.test.js +0 -1
- package/dist/js/modern/libs/render/cache/__tests__/cache.test.js +0 -9
- package/dist/js/modern/libs/render/cache/index.js +8 -16
- package/dist/js/modern/libs/render/cache/page-caches/lru.js +0 -10
- package/dist/js/modern/libs/render/cache/spr.js +12 -62
- package/dist/js/modern/libs/render/cache/util.js +0 -6
- package/dist/js/modern/libs/render/index.js +6 -11
- package/dist/js/modern/libs/render/measure.js +1 -11
- package/dist/js/modern/libs/render/modern/index.js +2 -13
- package/dist/js/modern/libs/render/reader.js +13 -24
- package/dist/js/modern/libs/render/ssr.js +5 -6
- package/dist/js/modern/libs/render/static.js +6 -9
- package/dist/js/modern/libs/render/type.js +0 -1
- package/dist/js/modern/libs/route/index.js +8 -19
- package/dist/js/modern/libs/route/matcher.js +21 -29
- package/dist/js/modern/libs/route/route.js +0 -13
- package/dist/js/modern/libs/serve-file.js +5 -6
- package/dist/js/modern/server/index.js +19 -41
- package/dist/js/modern/server/modern-server-split.js +0 -11
- package/dist/js/modern/server/modern-server.js +83 -164
- package/dist/js/modern/utils.js +2 -21
- package/dist/js/modern/worker-server.js +34 -0
- package/dist/js/node/constants.js +0 -2
- package/dist/js/node/index.js +0 -10
- package/dist/js/node/libs/context/context.js +10 -65
- package/dist/js/node/libs/context/index.js +0 -3
- package/dist/js/node/libs/hook-api/index.js +0 -42
- package/dist/js/node/libs/hook-api/route.js +0 -10
- package/dist/js/node/libs/hook-api/template.js +0 -22
- package/dist/js/node/libs/loadConfig.js +3 -22
- package/dist/js/node/libs/metrics.js +6 -6
- package/dist/js/node/libs/proxy.js +7 -17
- package/dist/js/node/libs/render/cache/__tests__/cache.fun.test.js +0 -5
- package/dist/js/node/libs/render/cache/__tests__/cache.test.js +0 -12
- package/dist/js/node/libs/render/cache/index.js +8 -22
- package/dist/js/node/libs/render/cache/page-caches/index.js +0 -2
- package/dist/js/node/libs/render/cache/page-caches/lru.js +0 -14
- package/dist/js/node/libs/render/cache/spr.js +12 -71
- package/dist/js/node/libs/render/cache/util.js +0 -18
- package/dist/js/node/libs/render/index.js +6 -26
- package/dist/js/node/libs/render/measure.js +0 -17
- package/dist/js/node/libs/render/modern/index.js +2 -20
- package/dist/js/node/libs/render/reader.js +12 -39
- package/dist/js/node/libs/render/ssr.js +4 -16
- package/dist/js/node/libs/render/static.js +6 -18
- package/dist/js/node/libs/render/type.js +0 -1
- package/dist/js/node/libs/route/index.js +8 -22
- package/dist/js/node/libs/route/matcher.js +18 -34
- package/dist/js/node/libs/route/route.js +0 -15
- package/dist/js/node/libs/serve-file.js +5 -13
- package/dist/js/node/server/index.js +19 -61
- package/dist/js/node/server/modern-server-split.js +0 -13
- package/dist/js/node/server/modern-server.js +83 -193
- package/dist/js/node/utils.js +3 -46
- package/dist/js/node/worker-server.js +41 -0
- package/dist/js/treeshaking/constants.js +28 -0
- package/dist/js/treeshaking/index.js +13 -0
- package/dist/js/treeshaking/libs/context/context.js +243 -0
- package/dist/js/treeshaking/libs/context/index.js +5 -0
- package/dist/js/treeshaking/libs/hook-api/index.js +157 -0
- package/dist/js/treeshaking/libs/hook-api/route.js +33 -0
- package/dist/js/treeshaking/libs/hook-api/template.js +91 -0
- package/dist/js/treeshaking/libs/loadConfig.js +39 -0
- package/dist/js/treeshaking/libs/metrics.js +12 -0
- package/dist/js/treeshaking/libs/proxy.js +80 -0
- package/dist/js/treeshaking/libs/render/cache/__tests__/cache.fun.test.js +124 -0
- package/dist/js/treeshaking/libs/render/cache/__tests__/cache.test.js +464 -0
- package/dist/js/treeshaking/libs/render/cache/__tests__/cacheable.js +53 -0
- package/dist/js/treeshaking/libs/render/cache/__tests__/error-configuration.js +35 -0
- package/dist/js/treeshaking/libs/render/cache/__tests__/matched-cache.js +121 -0
- package/dist/js/treeshaking/libs/render/cache/index.js +184 -0
- package/dist/js/treeshaking/libs/render/cache/page-caches/index.js +30 -0
- package/dist/js/treeshaking/libs/render/cache/page-caches/lru.js +46 -0
- package/dist/js/treeshaking/libs/render/cache/spr.js +362 -0
- package/dist/js/treeshaking/libs/render/cache/type.js +1 -0
- package/dist/js/treeshaking/libs/render/cache/util.js +101 -0
- package/dist/js/treeshaking/libs/render/index.js +100 -0
- package/dist/js/treeshaking/libs/render/measure.js +61 -0
- package/dist/js/treeshaking/libs/render/modern/browser-list.js +7 -0
- package/dist/js/treeshaking/libs/render/modern/index.js +39 -0
- package/dist/js/treeshaking/libs/render/reader.js +191 -0
- package/dist/js/treeshaking/libs/render/ssr.js +98 -0
- package/dist/js/treeshaking/libs/render/static.js +84 -0
- package/dist/js/treeshaking/libs/render/type.js +6 -0
- package/dist/js/treeshaking/libs/route/index.js +94 -0
- package/dist/js/treeshaking/libs/route/matcher.js +113 -0
- package/dist/js/treeshaking/libs/route/route.js +26 -0
- package/dist/js/treeshaking/libs/serve-file.js +75 -0
- package/dist/js/treeshaking/server/index.js +343 -0
- package/dist/js/treeshaking/server/modern-server-split.js +152 -0
- package/dist/js/treeshaking/server/modern-server.js +945 -0
- package/dist/js/treeshaking/type.js +1 -0
- package/dist/js/treeshaking/utils.js +87 -0
- package/dist/js/treeshaking/worker-server.js +56 -0
- package/dist/types/index.d.ts +0 -2
- package/dist/types/libs/context/context.d.ts +0 -3
- package/dist/types/libs/loadConfig.d.ts +0 -1
- package/dist/types/libs/render/cache/index.d.ts +0 -2
- package/dist/types/libs/render/cache/spr.d.ts +0 -2
- package/dist/types/server/index.d.ts +0 -3
- package/dist/types/utils.d.ts +0 -1
- package/dist/types/worker-server.d.ts +16 -0
- package/package.json +28 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { IncomingMessage } from 'http';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import { createDebugger, isProd } from '@modern-js/utils';
|
|
4
|
+
export var debug = createDebugger('prod-server');
|
|
5
|
+
export var mergeExtension = function mergeExtension(users) {
|
|
6
|
+
var output = [];
|
|
7
|
+
return {
|
|
8
|
+
middleware: output.concat(users)
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export var noop = function noop() {
|
|
12
|
+
// noop
|
|
13
|
+
};
|
|
14
|
+
export var createErrorDocument = function createErrorDocument(status, text) {
|
|
15
|
+
var title = "".concat(status, ": ").concat(text);
|
|
16
|
+
return "<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width\">\n <title>".concat(title, "</title>\n <style>\n html,body {\n margin: 0;\n }\n\n .page-container {\n color: #000;\n background: #fff;\n height: 100vh;\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n </style>\n </head>\n <body>\n <div class=\"page-container\">\n <h1>").concat(status, "</h1>\n <div>").concat(text, "</div>\n </body>\n </html>\n ");
|
|
17
|
+
};
|
|
18
|
+
export var createMiddlewareCollecter = function createMiddlewareCollecter() {
|
|
19
|
+
var webMiddlewares = [];
|
|
20
|
+
var apiMiddlewares = [];
|
|
21
|
+
var addWebMiddleware = function addWebMiddleware(input) {
|
|
22
|
+
webMiddlewares.push(input);
|
|
23
|
+
};
|
|
24
|
+
var addAPIMiddleware = function addAPIMiddleware(input) {
|
|
25
|
+
apiMiddlewares.push(input);
|
|
26
|
+
};
|
|
27
|
+
var getMiddlewares = function getMiddlewares() {
|
|
28
|
+
return {
|
|
29
|
+
web: webMiddlewares,
|
|
30
|
+
api: apiMiddlewares
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
getMiddlewares: getMiddlewares,
|
|
35
|
+
addWebMiddleware: addWebMiddleware,
|
|
36
|
+
addAPIMiddleware: addAPIMiddleware
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export var useLocalPrefix = function useLocalPrefix(url) {
|
|
40
|
+
return isProd() && !url.includes('.');
|
|
41
|
+
};
|
|
42
|
+
export var getStaticReg = function getStaticReg() {
|
|
43
|
+
var output = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
44
|
+
var favicon = output.favicon,
|
|
45
|
+
faviconByEntries = output.faviconByEntries,
|
|
46
|
+
cssPath = output.cssPath,
|
|
47
|
+
jsPath = output.jsPath,
|
|
48
|
+
mediaPath = output.mediaPath,
|
|
49
|
+
_output$assetPrefix = output.assetPrefix,
|
|
50
|
+
assetPrefix = _output$assetPrefix === void 0 ? '/' : _output$assetPrefix;
|
|
51
|
+
var prefix = useLocalPrefix(assetPrefix) ? assetPrefix : '';
|
|
52
|
+
var favicons = prepareFavicons(favicon, faviconByEntries);
|
|
53
|
+
var staticFiles = [cssPath, jsPath, mediaPath].filter(function (v) {
|
|
54
|
+
return Boolean(v);
|
|
55
|
+
});
|
|
56
|
+
var staticReg = ['static/', 'upload/'].concat(_toConsumableArray(staticFiles));
|
|
57
|
+
var iconReg = ['favicon.ico', 'icon.png'].concat(_toConsumableArray(favicons));
|
|
58
|
+
var regPrefix = prefix.endsWith('/') ? prefix : "".concat(prefix, "/");
|
|
59
|
+
var staticPathRegExp = new RegExp("^".concat(regPrefix, "(").concat([].concat(_toConsumableArray(staticReg), _toConsumableArray(iconReg)).join('|'), ")"));
|
|
60
|
+
return staticPathRegExp;
|
|
61
|
+
};
|
|
62
|
+
export var prepareFavicons = function prepareFavicons(favicon, faviconByEntries) {
|
|
63
|
+
var faviconNames = [];
|
|
64
|
+
if (favicon) {
|
|
65
|
+
faviconNames.push(favicon.substring(favicon.lastIndexOf('/') + 1));
|
|
66
|
+
}
|
|
67
|
+
if (faviconByEntries) {
|
|
68
|
+
Object.keys(faviconByEntries).forEach(function (f) {
|
|
69
|
+
var curFavicon = faviconByEntries[f];
|
|
70
|
+
if (curFavicon) {
|
|
71
|
+
faviconNames.push(curFavicon.substring(curFavicon.lastIndexOf('/') + 1));
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return faviconNames;
|
|
76
|
+
};
|
|
77
|
+
export var headersWithoutCookie = function headersWithoutCookie(headers) {
|
|
78
|
+
if (typeof headers.cookie !== 'undefined') {
|
|
79
|
+
var safeHeaders = _objectSpread({}, headers);
|
|
80
|
+
delete safeHeaders.cookie;
|
|
81
|
+
return safeHeaders;
|
|
82
|
+
}
|
|
83
|
+
return headers;
|
|
84
|
+
};
|
|
85
|
+
export var isRedirect = function isRedirect(code) {
|
|
86
|
+
return [301, 302, 307, 308].includes(code);
|
|
87
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import { RouteMatchManager } from "./libs/route";
|
|
4
|
+
export var createHandler = function createHandler(manifest) {
|
|
5
|
+
var routeMgr = new RouteMatchManager();
|
|
6
|
+
var pages = manifest.pages,
|
|
7
|
+
routes = manifest.routes;
|
|
8
|
+
routeMgr.reset(routes);
|
|
9
|
+
return /*#__PURE__*/function () {
|
|
10
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ctx) {
|
|
11
|
+
var _ctx$request, _ctx$request$query, _ctx$request2, _ctx$request2$pathnam, _ctx$request3, _ctx$request3$params;
|
|
12
|
+
var pageMatch, page, params;
|
|
13
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14
|
+
while (1) {
|
|
15
|
+
switch (_context.prev = _context.next) {
|
|
16
|
+
case 0:
|
|
17
|
+
pageMatch = routeMgr.match(ctx.url);
|
|
18
|
+
if (pageMatch) {
|
|
19
|
+
_context.next = 5;
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
ctx.body = '404: Page not found';
|
|
23
|
+
ctx.status = 404;
|
|
24
|
+
return _context.abrupt("return");
|
|
25
|
+
case 5:
|
|
26
|
+
page = pages[pageMatch.spec.urlPath];
|
|
27
|
+
(_ctx$request$query = (_ctx$request = ctx.request).query) !== null && _ctx$request$query !== void 0 ? _ctx$request$query : _ctx$request.query = ctx.query;
|
|
28
|
+
(_ctx$request2$pathnam = (_ctx$request2 = ctx.request).pathname) !== null && _ctx$request2$pathnam !== void 0 ? _ctx$request2$pathnam : _ctx$request2.pathname = ctx.pathname;
|
|
29
|
+
(_ctx$request3$params = (_ctx$request3 = ctx.request).params) !== null && _ctx$request3$params !== void 0 ? _ctx$request3$params : _ctx$request3.params = ctx.params;
|
|
30
|
+
params = pageMatch.parseURLParams(ctx.url);
|
|
31
|
+
_context.next = 12;
|
|
32
|
+
return page.serverRender({
|
|
33
|
+
template: page.template,
|
|
34
|
+
query: ctx.query,
|
|
35
|
+
request: ctx.request,
|
|
36
|
+
response: ctx.response,
|
|
37
|
+
pathname: ctx.pathname,
|
|
38
|
+
req: ctx.request,
|
|
39
|
+
res: ctx.response,
|
|
40
|
+
params: ctx.params || params || {}
|
|
41
|
+
});
|
|
42
|
+
case 12:
|
|
43
|
+
ctx.body = _context.sent;
|
|
44
|
+
ctx.status = 200;
|
|
45
|
+
case 14:
|
|
46
|
+
case "end":
|
|
47
|
+
return _context.stop();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, _callee);
|
|
51
|
+
}));
|
|
52
|
+
return function (_x) {
|
|
53
|
+
return _ref.apply(this, arguments);
|
|
54
|
+
};
|
|
55
|
+
}();
|
|
56
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,7 +6,5 @@ export { ModernServer } from './server/modern-server';
|
|
|
6
6
|
export { createProxyHandler } from './libs/proxy';
|
|
7
7
|
export * from './type';
|
|
8
8
|
export * from './constants';
|
|
9
|
-
|
|
10
9
|
declare const _default: (options: ModernServerOptions) => Promise<Server>;
|
|
11
|
-
|
|
12
10
|
export default _default;
|
|
@@ -20,12 +20,10 @@ export declare class ModernServerContext implements ModernServerContextInterface
|
|
|
20
20
|
/**
|
|
21
21
|
* http response
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
23
|
res: ServerResponse;
|
|
25
24
|
/**
|
|
26
25
|
* url params
|
|
27
26
|
*/
|
|
28
|
-
|
|
29
27
|
params: Record<string, string>;
|
|
30
28
|
get logger(): import("@modern-js/types").Logger;
|
|
31
29
|
get metrics(): import("@modern-js/types").Metrics;
|
|
@@ -56,7 +54,6 @@ export declare class ModernServerContext implements ModernServerContextInterface
|
|
|
56
54
|
/**
|
|
57
55
|
* 判断链接是否已经关闭
|
|
58
56
|
*/
|
|
59
|
-
|
|
60
57
|
resHasHandled(): boolean;
|
|
61
58
|
error(dig: string, e?: Error | string): void;
|
|
62
59
|
}
|
|
@@ -2,7 +2,5 @@
|
|
|
2
2
|
import { Readable } from 'stream';
|
|
3
3
|
import type { ModernServerContext } from '@modern-js/types';
|
|
4
4
|
import { RenderFunction, SSRServerContext } from '../type';
|
|
5
|
-
|
|
6
5
|
declare const _default: (renderFn: RenderFunction, ctx: ModernServerContext) => (context: SSRServerContext) => Promise<string | Readable>;
|
|
7
|
-
|
|
8
6
|
export default _default;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import LRUCache from 'lru-cache';
|
|
2
2
|
import { CacheContent, CacheManagerOptions, CacheResult, CacheContext, CacheConfig } from './type';
|
|
3
|
-
|
|
4
3
|
declare class CacheManager {
|
|
5
4
|
cache: LRUCache<string, CacheContent>;
|
|
6
5
|
cacheOptions: CacheManagerOptions;
|
|
@@ -18,7 +17,6 @@ declare class CacheManager {
|
|
|
18
17
|
set(context: CacheContext, html: string, cacheConfig: CacheConfig, sync?: boolean): Promise<any>;
|
|
19
18
|
del(context: CacheContext, cacheHash: string): Promise<void>;
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
export declare function createCache(): CacheManager;
|
|
23
21
|
export declare function destroyCache(): void;
|
|
24
22
|
export {};
|
|
@@ -25,14 +25,12 @@ export declare class Server {
|
|
|
25
25
|
* - 执行 prepare hook
|
|
26
26
|
* - 执行 server init
|
|
27
27
|
*/
|
|
28
|
-
|
|
29
28
|
init(): Promise<this>;
|
|
30
29
|
/**
|
|
31
30
|
* Execute config hooks
|
|
32
31
|
* @param runner
|
|
33
32
|
* @param options
|
|
34
33
|
*/
|
|
35
|
-
|
|
36
34
|
private runConfigHook;
|
|
37
35
|
private runPrepareHook;
|
|
38
36
|
private initServerConfig;
|
|
@@ -40,7 +38,6 @@ export declare class Server {
|
|
|
40
38
|
*
|
|
41
39
|
* merge cliConfig and serverConfig
|
|
42
40
|
*/
|
|
43
|
-
|
|
44
41
|
private initConfig;
|
|
45
42
|
close(): Promise<void>;
|
|
46
43
|
listen<T extends number | ListenOptions | undefined>(options: T, listener: any): void;
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ export declare const createMiddlewareCollecter: () => {
|
|
|
18
18
|
addWebMiddleware: (input: any) => void;
|
|
19
19
|
addAPIMiddleware: (input: any) => void;
|
|
20
20
|
};
|
|
21
|
-
export declare const toPath: (reg: string, params: Record<string, any>) => string;
|
|
22
21
|
export declare const useLocalPrefix: (url: string) => boolean;
|
|
23
22
|
export declare const getStaticReg: (output?: NormalizedConfig['output']) => RegExp;
|
|
24
23
|
export declare const prepareFavicons: (favicon: string | undefined, faviconByEntries?: Record<string, string | undefined>) => string[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ModernRouteInterface } from './libs/route';
|
|
2
|
+
export declare type Context = Record<string, any>;
|
|
3
|
+
export interface UrlQuery {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
}
|
|
6
|
+
export declare type Manifest = {
|
|
7
|
+
pages: Record<string,
|
|
8
|
+
// path
|
|
9
|
+
{
|
|
10
|
+
entryName: string;
|
|
11
|
+
template: string;
|
|
12
|
+
serverRender: (ctx: Record<string, any>) => Promise<string>;
|
|
13
|
+
}>;
|
|
14
|
+
routes: ModernRouteInterface[];
|
|
15
|
+
};
|
|
16
|
+
export declare const createHandler: (manifest: Manifest) => (ctx: Context) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.0.0-beta.
|
|
14
|
+
"version": "2.0.0-beta.1",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -25,12 +25,28 @@
|
|
|
25
25
|
"require": "./dist/js/node/index.js"
|
|
26
26
|
},
|
|
27
27
|
"default": "./dist/js/treeshaking/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./worker": {
|
|
30
|
+
"node": {
|
|
31
|
+
"jsnext:source": "./src/worker-server.ts",
|
|
32
|
+
"import": "./dist/js/modern/worker-server.js",
|
|
33
|
+
"require": "./dist/js/node/worker-server.js"
|
|
34
|
+
},
|
|
35
|
+
"default": "./dist/js/treeshaking/worker-server.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"typesVersions": {
|
|
39
|
+
"*": {
|
|
40
|
+
".": [
|
|
41
|
+
"./dist/types/index.d.ts"
|
|
42
|
+
],
|
|
43
|
+
"worker": [
|
|
44
|
+
"./dist/types/worker-server.d.ts"
|
|
45
|
+
]
|
|
28
46
|
}
|
|
29
47
|
},
|
|
30
48
|
"dependencies": {
|
|
31
|
-
"@modern-js/utils": "2.0.0-beta.0",
|
|
32
49
|
"@babel/compat-data": "^7.17.10",
|
|
33
|
-
"@modern-js/server-core": "2.0.0-beta.0",
|
|
34
50
|
"axios": "^0.24.0",
|
|
35
51
|
"etag": "^1.8.1",
|
|
36
52
|
"fresh": "^0.5.2",
|
|
@@ -42,13 +58,11 @@
|
|
|
42
58
|
"merge-deep": "^3.0.3",
|
|
43
59
|
"path-to-regexp": "^6.2.0",
|
|
44
60
|
"serve-static": "^1.14.1",
|
|
45
|
-
"ua-parser-js": "^0.7.28"
|
|
61
|
+
"ua-parser-js": "^0.7.28",
|
|
62
|
+
"@modern-js/utils": "2.0.0-beta.1",
|
|
63
|
+
"@modern-js/server-core": "2.0.0-beta.1"
|
|
46
64
|
},
|
|
47
65
|
"devDependencies": {
|
|
48
|
-
"@modern-js/types": "2.0.0-beta.0",
|
|
49
|
-
"@modern-js/core": "2.0.0-beta.0",
|
|
50
|
-
"@scripts/jest-config": "2.0.0-beta.0",
|
|
51
|
-
"@scripts/build": "2.0.0-beta.0",
|
|
52
66
|
"@types/cookie": "^0.4.1",
|
|
53
67
|
"@types/jest": "^27",
|
|
54
68
|
"@types/lru-cache": "^5.1.1",
|
|
@@ -61,13 +75,15 @@
|
|
|
61
75
|
"jest": "^27",
|
|
62
76
|
"node-mocks-http": "^1.11.0",
|
|
63
77
|
"portfinder": "^1.0.28",
|
|
64
|
-
"typescript": "^4"
|
|
78
|
+
"typescript": "^4",
|
|
79
|
+
"@modern-js/types": "2.0.0-beta.1",
|
|
80
|
+
"@modern-js/core": "2.0.0-beta.1",
|
|
81
|
+
"@scripts/jest-config": "2.0.0-beta.1",
|
|
82
|
+
"@scripts/build": "2.0.0-beta.1"
|
|
65
83
|
},
|
|
66
84
|
"sideEffects": false,
|
|
67
85
|
"modernConfig": {
|
|
68
|
-
"output": {
|
|
69
|
-
"packageMode": "node-js"
|
|
70
|
-
}
|
|
86
|
+
"output": {}
|
|
71
87
|
},
|
|
72
88
|
"publishConfig": {
|
|
73
89
|
"access": "public",
|