@modern-js/server 2.58.1 → 2.58.3
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/dist/cjs/createDevServer.js +2 -2
- package/dist/cjs/dev-tools/watcher/statsCache.js +1 -1
- package/dist/cjs/dev.js +4 -2
- package/dist/cjs/helpers/index.js +2 -2
- package/dist/cjs/helpers/mock.js +1 -1
- package/dist/esm/createDevServer.js +19 -14
- package/dist/esm/dev-tools/watcher/statsCache.js +1 -1
- package/dist/esm/dev.js +6 -4
- package/dist/esm/helpers/index.js +2 -2
- package/dist/esm/helpers/mock.js +1 -1
- package/dist/esm-node/createDevServer.js +2 -2
- package/dist/esm-node/dev-tools/watcher/statsCache.js +1 -1
- package/dist/esm-node/dev.js +5 -3
- package/dist/esm-node/helpers/index.js +2 -2
- package/dist/esm-node/helpers/mock.js +1 -1
- package/dist/types/createDevServer.d.ts +1 -1
- package/dist/types/dev-tools/watcher/index.d.ts +1 -1
- package/dist/types/dev.d.ts +3 -3
- package/dist/types/helpers/constants.d.ts +1 -1
- package/dist/types/helpers/devOptions.d.ts +1 -1
- package/dist/types/helpers/fileReader.d.ts +1 -1
- package/dist/types/helpers/index.d.ts +2 -2
- package/dist/types/helpers/mock.d.ts +3 -3
- package/dist/types/helpers/repack.d.ts +1 -1
- package/dist/types/types.d.ts +2 -2
- package/package.json +10 -10
|
@@ -34,14 +34,14 @@ module.exports = __toCommonJS(createDevServer_exports);
|
|
|
34
34
|
var import_node_path = __toESM(require("node:path"));
|
|
35
35
|
var import_server_core = require("@modern-js/server-core");
|
|
36
36
|
var import_node = require("@modern-js/server-core/node");
|
|
37
|
-
var import_helpers = require("./helpers");
|
|
38
37
|
var import_dev = require("./dev");
|
|
38
|
+
var import_helpers = require("./helpers");
|
|
39
39
|
async function createDevServer(options, applyPlugins) {
|
|
40
40
|
var _config_output_distPath;
|
|
41
41
|
const { config, pwd, serverConfigFile, serverConfigPath, builder } = options;
|
|
42
42
|
const dev = (0, import_helpers.getDevOptions)(options);
|
|
43
43
|
const distDir = import_node_path.default.resolve(pwd, ((_config_output_distPath = config.output.distPath) === null || _config_output_distPath === void 0 ? void 0 : _config_output_distPath.root) || "dist");
|
|
44
|
-
const serverConfig = (0, import_node.loadServerRuntimeConfig)(distDir, serverConfigFile, serverConfigPath);
|
|
44
|
+
const serverConfig = await (0, import_node.loadServerRuntimeConfig)(distDir, serverConfigFile, serverConfigPath);
|
|
45
45
|
const prodServerOptions = {
|
|
46
46
|
...options,
|
|
47
47
|
pwd: distDir
|
|
@@ -31,8 +31,8 @@ __export(statsCache_exports, {
|
|
|
31
31
|
StatsCache: () => StatsCache
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(statsCache_exports);
|
|
34
|
-
var import_fs = __toESM(require("fs"));
|
|
35
34
|
var import_crypto = __toESM(require("crypto"));
|
|
35
|
+
var import_fs = __toESM(require("fs"));
|
|
36
36
|
class StatsCache {
|
|
37
37
|
add(files) {
|
|
38
38
|
const { cachedHash, cachedSize } = this;
|
package/dist/cjs/dev.js
CHANGED
|
@@ -33,10 +33,12 @@ const devPlugin = (options) => ({
|
|
|
33
33
|
return {
|
|
34
34
|
async prepare() {
|
|
35
35
|
var _dev_after, _dev_before;
|
|
36
|
-
const { middlewares: builderMiddlewares, close,
|
|
36
|
+
const { middlewares: builderMiddlewares, close, connectWebSocket } = builderDevServer || {};
|
|
37
37
|
close && closeCb.push(close);
|
|
38
38
|
const { middlewares, distDirectory, nodeServer, apiDirectory, sharedDirectory, serverBase } = api.useAppContext();
|
|
39
|
-
|
|
39
|
+
connectWebSocket && nodeServer && connectWebSocket({
|
|
40
|
+
server: nodeServer
|
|
41
|
+
});
|
|
40
42
|
const runner = api.useHookRunners();
|
|
41
43
|
builder === null || builder === void 0 ? void 0 : builder.onDevCompileDone(({ stats }) => {
|
|
42
44
|
if (stats.toJson({
|
|
@@ -33,11 +33,11 @@ __export(helpers_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(helpers_exports);
|
|
35
35
|
var import_path = __toESM(require("path"));
|
|
36
|
-
var import_utils = require("@modern-js/utils");
|
|
37
36
|
var import_server_core = require("@modern-js/server-core");
|
|
37
|
+
var import_utils = require("@modern-js/utils");
|
|
38
38
|
var import_watcher = __toESM(require("../dev-tools/watcher"));
|
|
39
|
-
var import_utils2 = require("./utils");
|
|
40
39
|
var import_mock = require("./mock");
|
|
40
|
+
var import_utils2 = require("./utils");
|
|
41
41
|
__reExport(helpers_exports, require("./repack"), module.exports);
|
|
42
42
|
__reExport(helpers_exports, require("./devOptions"), module.exports);
|
|
43
43
|
__reExport(helpers_exports, require("./fileReader"), module.exports);
|
package/dist/cjs/helpers/mock.js
CHANGED
|
@@ -34,9 +34,9 @@ __export(mock_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(mock_exports);
|
|
36
36
|
var import_node_path = __toESM(require("node:path"));
|
|
37
|
-
var import_utils = require("@modern-js/utils");
|
|
38
37
|
var import_server_core = require("@modern-js/server-core");
|
|
39
38
|
var import_node = require("@modern-js/server-core/node");
|
|
39
|
+
var import_utils = require("@modern-js/utils");
|
|
40
40
|
var import_path_to_regexp = require("path-to-regexp");
|
|
41
41
|
let mockAPIs = [];
|
|
42
42
|
let mockConfig;
|
|
@@ -5,8 +5,8 @@ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { createServerBase } from "@modern-js/server-core";
|
|
7
7
|
import { createNodeServer, loadServerRuntimeConfig } from "@modern-js/server-core/node";
|
|
8
|
-
import { getDevOptions } from "./helpers";
|
|
9
8
|
import { devPlugin } from "./dev";
|
|
9
|
+
import { getDevOptions } from "./helpers";
|
|
10
10
|
function createDevServer(options, applyPlugins) {
|
|
11
11
|
return _createDevServer.apply(this, arguments);
|
|
12
12
|
}
|
|
@@ -19,7 +19,12 @@ function _createDevServer() {
|
|
|
19
19
|
config = options.config, pwd = options.pwd, serverConfigFile = options.serverConfigFile, serverConfigPath = options.serverConfigPath, builder = options.builder;
|
|
20
20
|
dev = getDevOptions(options);
|
|
21
21
|
distDir = path.resolve(pwd, ((_config_output_distPath = config.output.distPath) === null || _config_output_distPath === void 0 ? void 0 : _config_output_distPath.root) || "dist");
|
|
22
|
-
|
|
22
|
+
return [
|
|
23
|
+
4,
|
|
24
|
+
loadServerRuntimeConfig(distDir, serverConfigFile, serverConfigPath)
|
|
25
|
+
];
|
|
26
|
+
case 1:
|
|
27
|
+
serverConfig = _state.sent();
|
|
23
28
|
prodServerOptions = _object_spread_props(_object_spread({}, options), {
|
|
24
29
|
pwd: distDir
|
|
25
30
|
});
|
|
@@ -31,46 +36,46 @@ function _createDevServer() {
|
|
|
31
36
|
if (!devHttpsOption)
|
|
32
37
|
return [
|
|
33
38
|
3,
|
|
34
|
-
|
|
39
|
+
5
|
|
35
40
|
];
|
|
36
41
|
return [
|
|
37
42
|
4,
|
|
38
43
|
import("./dev-tools/https")
|
|
39
44
|
];
|
|
40
|
-
case
|
|
45
|
+
case 2:
|
|
41
46
|
genHttpsOptions = _state.sent().genHttpsOptions;
|
|
42
47
|
return [
|
|
43
48
|
4,
|
|
44
49
|
genHttpsOptions(devHttpsOption, pwd)
|
|
45
50
|
];
|
|
46
|
-
case
|
|
51
|
+
case 3:
|
|
47
52
|
httpsOptions = _state.sent();
|
|
48
53
|
return [
|
|
49
54
|
4,
|
|
50
55
|
createNodeServer(server.handle.bind(server), httpsOptions)
|
|
51
56
|
];
|
|
52
|
-
case
|
|
57
|
+
case 4:
|
|
53
58
|
nodeServer = _state.sent();
|
|
54
59
|
return [
|
|
55
60
|
3,
|
|
56
|
-
|
|
61
|
+
7
|
|
57
62
|
];
|
|
58
|
-
case
|
|
63
|
+
case 5:
|
|
59
64
|
return [
|
|
60
65
|
4,
|
|
61
66
|
createNodeServer(server.handle.bind(server))
|
|
62
67
|
];
|
|
63
|
-
case 5:
|
|
64
|
-
nodeServer = _state.sent();
|
|
65
|
-
_state.label = 6;
|
|
66
68
|
case 6:
|
|
69
|
+
nodeServer = _state.sent();
|
|
70
|
+
_state.label = 7;
|
|
71
|
+
case 7:
|
|
67
72
|
return [
|
|
68
73
|
4,
|
|
69
74
|
builder === null || builder === void 0 ? void 0 : builder.createDevServer({
|
|
70
75
|
runCompile: options.runCompile
|
|
71
76
|
})
|
|
72
77
|
];
|
|
73
|
-
case
|
|
78
|
+
case 8:
|
|
74
79
|
builderDevServer = _state.sent();
|
|
75
80
|
server.addPlugins([
|
|
76
81
|
devPlugin(_object_spread_props(_object_spread({}, options), {
|
|
@@ -81,13 +86,13 @@ function _createDevServer() {
|
|
|
81
86
|
4,
|
|
82
87
|
applyPlugins(server, prodServerOptions, nodeServer)
|
|
83
88
|
];
|
|
84
|
-
case
|
|
89
|
+
case 9:
|
|
85
90
|
_state.sent();
|
|
86
91
|
return [
|
|
87
92
|
4,
|
|
88
93
|
server.init()
|
|
89
94
|
];
|
|
90
|
-
case
|
|
95
|
+
case 10:
|
|
91
96
|
_state.sent();
|
|
92
97
|
afterListen = function() {
|
|
93
98
|
var _ref = _async_to_generator(function() {
|
package/dist/esm/dev.js
CHANGED
|
@@ -3,7 +3,7 @@ import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
|
3
3
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
4
4
|
import { connectMid2HonoMid } from "@modern-js/server-core/node";
|
|
5
5
|
import { API_DIR, SHARED_DIR } from "@modern-js/utils";
|
|
6
|
-
import {
|
|
6
|
+
import { getDevOptions, getMockMiddleware, initFileReader, onRepack, startWatcher } from "./helpers";
|
|
7
7
|
var devPlugin = function(options) {
|
|
8
8
|
return {
|
|
9
9
|
name: "@modern-js/plugin-dev",
|
|
@@ -14,14 +14,16 @@ var devPlugin = function(options) {
|
|
|
14
14
|
return {
|
|
15
15
|
prepare: function prepare() {
|
|
16
16
|
return _async_to_generator(function() {
|
|
17
|
-
var _dev_after, _dev_before, _ref, builderMiddlewares, close,
|
|
17
|
+
var _dev_after, _dev_before, _ref, builderMiddlewares, close, connectWebSocket, _api_useAppContext, middlewares, distDirectory, nodeServer, apiDirectory, sharedDirectory, serverBase, runner, watchOptions, watcher, before, after, _dev_setupMiddlewares, setupMiddlewares, mockMiddleware;
|
|
18
18
|
return _ts_generator(this, function(_state) {
|
|
19
19
|
switch (_state.label) {
|
|
20
20
|
case 0:
|
|
21
|
-
_ref = builderDevServer || {}, builderMiddlewares = _ref.middlewares, close = _ref.close,
|
|
21
|
+
_ref = builderDevServer || {}, builderMiddlewares = _ref.middlewares, close = _ref.close, connectWebSocket = _ref.connectWebSocket;
|
|
22
22
|
close && closeCb.push(close);
|
|
23
23
|
_api_useAppContext = api.useAppContext(), middlewares = _api_useAppContext.middlewares, distDirectory = _api_useAppContext.distDirectory, nodeServer = _api_useAppContext.nodeServer, apiDirectory = _api_useAppContext.apiDirectory, sharedDirectory = _api_useAppContext.sharedDirectory, serverBase = _api_useAppContext.serverBase;
|
|
24
|
-
|
|
24
|
+
connectWebSocket && nodeServer && connectWebSocket({
|
|
25
|
+
server: nodeServer
|
|
26
|
+
});
|
|
25
27
|
runner = api.useHookRunners();
|
|
26
28
|
builder === null || builder === void 0 ? void 0 : builder.onDevCompileDone(function(param) {
|
|
27
29
|
var stats = param.stats;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
2
2
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
3
3
|
import path from "path";
|
|
4
|
-
import { SERVER_BUNDLE_DIRECTORY, SERVER_DIR, logger } from "@modern-js/utils";
|
|
5
4
|
import { AGGRED_DIR } from "@modern-js/server-core";
|
|
5
|
+
import { SERVER_BUNDLE_DIRECTORY, SERVER_DIR, logger } from "@modern-js/utils";
|
|
6
6
|
import Watcher, { mergeWatchOptions } from "../dev-tools/watcher";
|
|
7
|
-
import { debug } from "./utils";
|
|
8
7
|
import { initOrUpdateMockMiddlewares } from "./mock";
|
|
8
|
+
import { debug } from "./utils";
|
|
9
9
|
export * from "./repack";
|
|
10
10
|
export * from "./devOptions";
|
|
11
11
|
export * from "./fileReader";
|
package/dist/esm/helpers/mock.js
CHANGED
|
@@ -2,9 +2,9 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
|
2
2
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
3
3
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import { fs } from "@modern-js/utils";
|
|
6
5
|
import { AGGRED_DIR } from "@modern-js/server-core";
|
|
7
6
|
import { connectMid2HonoMid } from "@modern-js/server-core/node";
|
|
7
|
+
import { fs } from "@modern-js/utils";
|
|
8
8
|
import { match } from "path-to-regexp";
|
|
9
9
|
var mockAPIs = [];
|
|
10
10
|
var mockConfig;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { createServerBase } from "@modern-js/server-core";
|
|
3
3
|
import { createNodeServer, loadServerRuntimeConfig } from "@modern-js/server-core/node";
|
|
4
|
-
import { getDevOptions } from "./helpers";
|
|
5
4
|
import { devPlugin } from "./dev";
|
|
5
|
+
import { getDevOptions } from "./helpers";
|
|
6
6
|
async function createDevServer(options, applyPlugins) {
|
|
7
7
|
var _config_output_distPath;
|
|
8
8
|
const { config, pwd, serverConfigFile, serverConfigPath, builder } = options;
|
|
9
9
|
const dev = getDevOptions(options);
|
|
10
10
|
const distDir = path.resolve(pwd, ((_config_output_distPath = config.output.distPath) === null || _config_output_distPath === void 0 ? void 0 : _config_output_distPath.root) || "dist");
|
|
11
|
-
const serverConfig = loadServerRuntimeConfig(distDir, serverConfigFile, serverConfigPath);
|
|
11
|
+
const serverConfig = await loadServerRuntimeConfig(distDir, serverConfigFile, serverConfigPath);
|
|
12
12
|
const prodServerOptions = {
|
|
13
13
|
...options,
|
|
14
14
|
pwd: distDir
|
package/dist/esm-node/dev.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { connectMid2HonoMid } from "@modern-js/server-core/node";
|
|
2
2
|
import { API_DIR, SHARED_DIR } from "@modern-js/utils";
|
|
3
|
-
import {
|
|
3
|
+
import { getDevOptions, getMockMiddleware, initFileReader, onRepack, startWatcher } from "./helpers";
|
|
4
4
|
const devPlugin = (options) => ({
|
|
5
5
|
name: "@modern-js/plugin-dev",
|
|
6
6
|
setup(api) {
|
|
@@ -10,10 +10,12 @@ const devPlugin = (options) => ({
|
|
|
10
10
|
return {
|
|
11
11
|
async prepare() {
|
|
12
12
|
var _dev_after, _dev_before;
|
|
13
|
-
const { middlewares: builderMiddlewares, close,
|
|
13
|
+
const { middlewares: builderMiddlewares, close, connectWebSocket } = builderDevServer || {};
|
|
14
14
|
close && closeCb.push(close);
|
|
15
15
|
const { middlewares, distDirectory, nodeServer, apiDirectory, sharedDirectory, serverBase } = api.useAppContext();
|
|
16
|
-
|
|
16
|
+
connectWebSocket && nodeServer && connectWebSocket({
|
|
17
|
+
server: nodeServer
|
|
18
|
+
});
|
|
17
19
|
const runner = api.useHookRunners();
|
|
18
20
|
builder === null || builder === void 0 ? void 0 : builder.onDevCompileDone(({ stats }) => {
|
|
19
21
|
if (stats.toJson({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
-
import { SERVER_BUNDLE_DIRECTORY, SERVER_DIR, logger } from "@modern-js/utils";
|
|
3
2
|
import { AGGRED_DIR } from "@modern-js/server-core";
|
|
3
|
+
import { SERVER_BUNDLE_DIRECTORY, SERVER_DIR, logger } from "@modern-js/utils";
|
|
4
4
|
import Watcher, { mergeWatchOptions } from "../dev-tools/watcher";
|
|
5
|
-
import { debug } from "./utils";
|
|
6
5
|
import { initOrUpdateMockMiddlewares } from "./mock";
|
|
6
|
+
import { debug } from "./utils";
|
|
7
7
|
export * from "./repack";
|
|
8
8
|
export * from "./devOptions";
|
|
9
9
|
export * from "./fileReader";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { fs } from "@modern-js/utils";
|
|
3
2
|
import { AGGRED_DIR } from "@modern-js/server-core";
|
|
4
3
|
import { connectMid2HonoMid } from "@modern-js/server-core/node";
|
|
4
|
+
import { fs } from "@modern-js/utils";
|
|
5
5
|
import { match } from "path-to-regexp";
|
|
6
6
|
let mockAPIs = [];
|
|
7
7
|
let mockConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import { ApplyPlugins, ModernDevServerOptions } from './types';
|
|
3
|
+
import type { ApplyPlugins, ModernDevServerOptions } from './types';
|
|
4
4
|
export declare function createDevServer(options: ModernDevServerOptions, applyPlugins: ApplyPlugins): Promise<{
|
|
5
5
|
server: (import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | import("https").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>) & {
|
|
6
6
|
getRequestListener: () => (req: import("http").IncomingMessage, res: import("http").ServerResponse) => Promise<void>;
|
package/dist/types/dev.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UniBuilderInstance } from '@modern-js/uni-builder';
|
|
3
|
-
import { ModernDevServerOptions } from './types';
|
|
1
|
+
import type { ServerBaseOptions, ServerPlugin } from '@modern-js/server-core';
|
|
2
|
+
import type { UniBuilderInstance } from '@modern-js/uni-builder';
|
|
3
|
+
import type { ModernDevServerOptions } from './types';
|
|
4
4
|
type BuilderDevServer = Awaited<ReturnType<UniBuilderInstance['createDevServer']>>;
|
|
5
5
|
export type DevPluginOptions = ModernDevServerOptions<ServerBaseOptions> & {
|
|
6
6
|
builderDevServer?: BuilderDevServer;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DevServerOptions } from '../types';
|
|
1
|
+
import type { DevServerOptions } from '../types';
|
|
2
2
|
export declare const getDefaultDevOptions: () => DevServerOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModernDevServerOptions } from '../types';
|
|
1
|
+
import type { ModernDevServerOptions } from '../types';
|
|
2
2
|
export declare const getDevOptions: (options: ModernDevServerOptions) => import("@modern-js/types/server/devServer").DevServerOptions & Pick<import("@modern-js/types/server/devServer").DevServerOptions, "watch" | "https"> & {
|
|
3
3
|
port?: number | undefined;
|
|
4
4
|
host?: string | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Middleware } from '@modern-js/server-core';
|
|
1
|
+
import type { Middleware } from '@modern-js/server-core';
|
|
2
2
|
export declare const initFileReader: () => Middleware;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type ServerBase } from '@modern-js/server-core';
|
|
2
|
+
import { type WatchOptions } from '@modern-js/utils';
|
|
3
3
|
import Watcher from '../dev-tools/watcher';
|
|
4
4
|
export * from './repack';
|
|
5
5
|
export * from './devOptions';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
2
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
|
+
import { type InternalRequest, type Middleware } from '@modern-js/server-core';
|
|
4
|
+
import type { NextFunction } from '@modern-js/types';
|
|
5
5
|
/** Types: Mock */
|
|
6
6
|
type MockHandler = {
|
|
7
7
|
data: any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ServerHookRunner } from '@modern-js/server-core';
|
|
1
|
+
import type { ServerHookRunner } from '@modern-js/server-core';
|
|
2
2
|
export declare const onRepack: (distDir: string, runner: ServerHookRunner) => void;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import type { DevServerHttpsOptions, DevServerOptions } from '@modern-js/types';
|
|
2
3
|
import type { UniBuilderInstance } from '@modern-js/uni-builder';
|
|
3
|
-
import type {
|
|
4
|
-
import { NodeServer, ServerBase, ServerBaseOptions } from '@modern-js/server-core';
|
|
4
|
+
import type { NodeServer, ServerBase, ServerBaseOptions } from '@modern-js/server-core';
|
|
5
5
|
export type { DevServerOptions, DevServerHttpsOptions };
|
|
6
6
|
export type ExtraOptions = {
|
|
7
7
|
dev: Pick<DevServerOptions, 'watch' | 'https'> & {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.58.
|
|
18
|
+
"version": "2.58.3",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"@babel/core": "^7.24.7",
|
|
43
43
|
"@babel/register": "^7.22.15",
|
|
44
44
|
"@swc/helpers": "0.5.3",
|
|
45
|
-
"axios": "^1.
|
|
45
|
+
"axios": "^1.7.4",
|
|
46
46
|
"connect-history-api-fallback": "^2.0.0",
|
|
47
47
|
"http-compression": "1.0.6",
|
|
48
48
|
"minimatch": "^3.0.4",
|
|
49
49
|
"path-to-regexp": "^6.2.0",
|
|
50
50
|
"ws": "^8.13.0",
|
|
51
|
-
"@modern-js/
|
|
52
|
-
"@modern-js/server-utils": "2.58.
|
|
53
|
-
"@modern-js/
|
|
54
|
-
"@modern-js/
|
|
55
|
-
"@modern-js/utils": "2.58.
|
|
51
|
+
"@modern-js/runtime-utils": "2.58.3",
|
|
52
|
+
"@modern-js/server-utils": "2.58.3",
|
|
53
|
+
"@modern-js/types": "2.58.3",
|
|
54
|
+
"@modern-js/server-core": "2.58.3",
|
|
55
|
+
"@modern-js/utils": "2.58.3"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/connect-history-api-fallback": "^1.3.5",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"typescript": "^5",
|
|
68
68
|
"webpack": "^5.93.0",
|
|
69
69
|
"websocket": "^1",
|
|
70
|
-
"@
|
|
71
|
-
"@scripts/
|
|
72
|
-
"@
|
|
70
|
+
"@modern-js/uni-builder": "2.58.3",
|
|
71
|
+
"@scripts/build": "2.58.3",
|
|
72
|
+
"@scripts/jest-config": "2.58.3"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"devcert": "^1.2.2",
|