@modern-js/server 2.26.0 → 2.27.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
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @modern-js/server
|
|
2
2
|
|
|
3
|
+
## 2.27.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [91d14b8]
|
|
8
|
+
- Updated dependencies [6d7104d]
|
|
9
|
+
- @modern-js/utils@2.27.0
|
|
10
|
+
- @modern-js/prod-server@2.27.0
|
|
11
|
+
- @modern-js/server-utils@2.27.0
|
|
12
|
+
- @modern-js/types@2.27.0
|
|
13
|
+
|
|
3
14
|
## 2.26.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
});
|
|
11
11
|
const _define_property = require("@swc/helpers/_/_define_property");
|
|
12
12
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
13
|
+
const _path = require("path");
|
|
13
14
|
const _events = require("events");
|
|
14
15
|
const _socketServer = /* @__PURE__ */ _interop_require_default._(require("./socketServer"));
|
|
15
16
|
const noop = () => {
|
|
@@ -20,7 +21,7 @@ function getHMRClientPath(client) {
|
|
|
20
21
|
const path = (client === null || client === void 0 ? void 0 : client.path) ? `&path=${client.path}` : "";
|
|
21
22
|
const port = (client === null || client === void 0 ? void 0 : client.port) ? `&port=${client.port}` : "";
|
|
22
23
|
const clientEntry = `${require.resolve("@modern-js/server/hmr-client")}?${host}${path}${port}${protocol}`;
|
|
23
|
-
return clientEntry;
|
|
24
|
+
return clientEntry.replace(`${_path.sep}cjs${_path.sep}dev-tools`, `${_path.sep}esm${_path.sep}dev-tools`);
|
|
24
25
|
}
|
|
25
26
|
class DevMiddleware extends _events.EventEmitter {
|
|
26
27
|
init(app) {
|
|
@@ -7,6 +7,7 @@ import { _ as _inherits } from "@swc/helpers/_/_inherits";
|
|
|
7
7
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
8
8
|
import { _ as _create_super } from "@swc/helpers/_/_create_super";
|
|
9
9
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
10
|
+
import { sep } from "path";
|
|
10
11
|
import { EventEmitter } from "events";
|
|
11
12
|
import SocketServer from "./socketServer";
|
|
12
13
|
var noop = function() {
|
|
@@ -17,7 +18,7 @@ function getHMRClientPath(client) {
|
|
|
17
18
|
var path = (client === null || client === void 0 ? void 0 : client.path) ? "&path=".concat(client.path) : "";
|
|
18
19
|
var port = (client === null || client === void 0 ? void 0 : client.port) ? "&port=".concat(client.port) : "";
|
|
19
20
|
var clientEntry = "".concat(require.resolve("@modern-js/server/hmr-client"), "?").concat(host).concat(path).concat(port).concat(protocol);
|
|
20
|
-
return clientEntry;
|
|
21
|
+
return clientEntry.replace("".concat(sep, "cjs").concat(sep, "dev-tools"), "".concat(sep, "esm").concat(sep, "dev-tools"));
|
|
21
22
|
}
|
|
22
23
|
var DevMiddleware = /* @__PURE__ */ function(EventEmitter2) {
|
|
23
24
|
"use strict";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
2
|
+
import { sep } from "path";
|
|
2
3
|
import { EventEmitter } from "events";
|
|
3
4
|
import SocketServer from "./socketServer";
|
|
4
5
|
const noop = () => {
|
|
@@ -9,7 +10,7 @@ function getHMRClientPath(client) {
|
|
|
9
10
|
const path = (client === null || client === void 0 ? void 0 : client.path) ? `&path=${client.path}` : "";
|
|
10
11
|
const port = (client === null || client === void 0 ? void 0 : client.port) ? `&port=${client.port}` : "";
|
|
11
12
|
const clientEntry = `${require.resolve("@modern-js/server/hmr-client")}?${host}${path}${port}${protocol}`;
|
|
12
|
-
return clientEntry;
|
|
13
|
+
return clientEntry.replace(`${sep}cjs${sep}dev-tools`, `${sep}esm${sep}dev-tools`);
|
|
13
14
|
}
|
|
14
15
|
class DevMiddleware extends EventEmitter {
|
|
15
16
|
init(app) {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.27.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"minimatch": "^3.0.4",
|
|
48
48
|
"path-to-regexp": "^6.2.0",
|
|
49
49
|
"ws": "^8.2.0",
|
|
50
|
-
"@modern-js/prod-server": "2.
|
|
51
|
-
"@modern-js/server-utils": "2.
|
|
52
|
-
"@modern-js/types": "2.
|
|
53
|
-
"@modern-js/utils": "2.
|
|
50
|
+
"@modern-js/prod-server": "2.27.0",
|
|
51
|
+
"@modern-js/server-utils": "2.27.0",
|
|
52
|
+
"@modern-js/types": "2.27.0",
|
|
53
|
+
"@modern-js/utils": "2.27.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/connect-history-api-fallback": "^1.3.5",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"typescript": "^5",
|
|
66
66
|
"webpack": "^5.88.1",
|
|
67
67
|
"websocket": "^1",
|
|
68
|
-
"@modern-js/server-core": "2.
|
|
69
|
-
"@scripts/build": "2.
|
|
70
|
-
"@scripts/jest-config": "2.
|
|
68
|
+
"@modern-js/server-core": "2.27.0",
|
|
69
|
+
"@scripts/build": "2.27.0",
|
|
70
|
+
"@scripts/jest-config": "2.27.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"devcert": "^1.0.0",
|