@modern-js/server 2.17.1 → 2.18.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,14 @@
1
1
  # @modern-js/server
2
2
 
3
+ ## 2.18.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @modern-js/prod-server@2.18.0
8
+ - @modern-js/server-utils@2.18.0
9
+ - @modern-js/types@2.18.0
10
+ - @modern-js/utils@2.18.0
11
+
3
12
  ## 2.17.1
4
13
 
5
14
  ### Patch Changes
@@ -36,7 +36,7 @@ function handleSuccess() {
36
36
  function handleWarnings(warnings) {
37
37
  var printWarnings = function printWarnings2() {
38
38
  var formatted = formatWebpackMessages({
39
- warnings,
39
+ warnings: warnings,
40
40
  errors: []
41
41
  });
42
42
  if (typeof console !== "undefined" && typeof console.warn === "function") {
@@ -63,7 +63,7 @@ function handleErrors(errors) {
63
63
  isFirstCompilation = false;
64
64
  hasCompileErrors = true;
65
65
  var formatted = formatWebpackMessages({
66
- errors,
66
+ errors: errors,
67
67
  warnings: []
68
68
  });
69
69
  if (typeof console !== "undefined" && typeof console.error === "function") {
@@ -58,7 +58,7 @@ function _create_class(Constructor, protoProps, staticProps) {
58
58
  function _define_property(obj, key, value) {
59
59
  if (key in obj) {
60
60
  Object.defineProperty(obj, key, {
61
- value,
61
+ value: value,
62
62
  enumerable: true,
63
63
  configurable: true,
64
64
  writable: true
@@ -326,7 +326,7 @@ var DevMiddleware = /* @__PURE__ */ function(EventEmitter2) {
326
326
  var middleware = devMiddleware(_object_spread({
327
327
  headers: devOptions.headers,
328
328
  stats: false,
329
- callbacks,
329
+ callbacks: callbacks,
330
330
  hmrClientPath: enableHMR ? getHMRClientPath(devOptions.client) : void 0
331
331
  }, devOptions.devMiddleware));
332
332
  return middleware;
@@ -23,7 +23,7 @@ function _create_class(Constructor, protoProps, staticProps) {
23
23
  function _define_property(obj, key, value) {
24
24
  if (key in obj) {
25
25
  Object.defineProperty(obj, key, {
26
- value,
26
+ value: value,
27
27
  enumerable: true,
28
28
  configurable: true,
29
29
  writable: true
@@ -104,8 +104,8 @@ var SocketServer = /* @__PURE__ */ function() {
104
104
  var _this = this;
105
105
  this.sockets.forEach(function(socket) {
106
106
  _this.send(socket, JSON.stringify({
107
- type,
108
- data
107
+ type: type,
108
+ data: data
109
109
  }));
110
110
  });
111
111
  }
@@ -115,8 +115,8 @@ var SocketServer = /* @__PURE__ */ function() {
115
115
  key: "singleWrite",
116
116
  value: function singleWrite(socket, type, data) {
117
117
  this.send(socket, JSON.stringify({
118
- type,
119
- data
118
+ type: type,
119
+ data: data
120
120
  }));
121
121
  }
122
122
  },
@@ -41,7 +41,7 @@ function _async_to_generator(fn) {
41
41
  function _define_property(obj, key, value) {
42
42
  if (key in obj) {
43
43
  Object.defineProperty(obj, key, {
44
- value,
44
+ value: value,
45
45
  enumerable: true,
46
46
  configurable: true,
47
47
  writable: true
@@ -1,7 +1,7 @@
1
1
  function _define_property(obj, key, value) {
2
2
  if (key in obj) {
3
3
  Object.defineProperty(obj, key, {
4
- value,
4
+ value: value,
5
5
  enumerable: true,
6
6
  configurable: true,
7
7
  writable: true
@@ -58,7 +58,7 @@ var checkDep = function(depName, paths) {
58
58
  var packagePath = "";
59
59
  try {
60
60
  packagePath = require.resolve(depName, {
61
- paths
61
+ paths: paths
62
62
  });
63
63
  } catch (error) {
64
64
  }
@@ -89,7 +89,7 @@ export var enableRegister = function(projectRoot, config) {
89
89
  var alias = config.source.alias;
90
90
  var aliasConfig = getAliasConfig(alias, {
91
91
  appDirectory: projectRoot,
92
- tsconfigPath
92
+ tsconfigPath: tsconfigPath
93
93
  });
94
94
  var _aliasConfig_paths = aliasConfig.paths, paths = _aliasConfig_paths === void 0 ? {} : _aliasConfig_paths, _aliasConfig_absoluteBaseUrl = aliasConfig.absoluteBaseUrl, absoluteBaseUrl = _aliasConfig_absoluteBaseUrl === void 0 ? "./" : _aliasConfig_absoluteBaseUrl;
95
95
  var tsPaths = Object.keys(paths).reduce(function(o, key) {
@@ -128,7 +128,7 @@ export var enableRegister = function(projectRoot, config) {
128
128
  compiler: (_config_server = config.server) === null || _config_server === void 0 ? void 0 : _config_server.compiler
129
129
  }
130
130
  }), {
131
- tsconfigPath,
131
+ tsconfigPath: tsconfigPath,
132
132
  syntax: "es6+",
133
133
  type: "commonjs"
134
134
  });
@@ -34,7 +34,7 @@ function _create_class(Constructor, protoProps, staticProps) {
34
34
  function _define_property(obj, key, value) {
35
35
  if (key in obj) {
36
36
  Object.defineProperty(obj, key, {
37
- value,
37
+ value: value,
38
38
  enumerable: true,
39
39
  configurable: true,
40
40
  writable: true
@@ -107,7 +107,7 @@ export var DependencyTree = /* @__PURE__ */ function() {
107
107
  if (!_this.shouldIgnore(path)) {
108
108
  var module = cache[path];
109
109
  _this.tree.set(module.filename, {
110
- module,
110
+ module: module,
111
111
  parent: /* @__PURE__ */ new Set(),
112
112
  children: /* @__PURE__ */ new Set()
113
113
  });
@@ -34,7 +34,7 @@ function _create_class(Constructor, protoProps, staticProps) {
34
34
  function _define_property(obj, key, value) {
35
35
  if (key in obj) {
36
36
  Object.defineProperty(obj, key, {
37
- value,
37
+ value: value,
38
38
  enumerable: true,
39
39
  configurable: true,
40
40
  writable: true
@@ -23,7 +23,7 @@ function _create_class(Constructor, protoProps, staticProps) {
23
23
  function _define_property(obj, key, value) {
24
24
  if (key in obj) {
25
25
  Object.defineProperty(obj, key, {
26
- value,
26
+ value: value,
27
27
  enumerable: true,
28
28
  configurable: true,
29
29
  writable: true
@@ -73,7 +73,7 @@ function _create_class(Constructor, protoProps, staticProps) {
73
73
  function _define_property(obj, key, value) {
74
74
  if (key in obj) {
75
75
  Object.defineProperty(obj, key, {
76
- value,
76
+ value: value,
77
77
  enumerable: true,
78
78
  configurable: true,
79
79
  writable: true
@@ -418,8 +418,8 @@ export var ModernDevServer = /* @__PURE__ */ function(ModernServer2) {
418
418
  }, serverOptions);
419
419
  });
420
420
  return {
421
- befores,
422
- afters
421
+ befores: befores,
422
+ afters: afters
423
423
  };
424
424
  }
425
425
  },
@@ -536,7 +536,7 @@ export var ModernDevServer = /* @__PURE__ */ function(ModernServer2) {
536
536
  next();
537
537
  });
538
538
  _this.mockHandler = createMockHandler({
539
- pwd
539
+ pwd: pwd
540
540
  });
541
541
  _this.addHandler(function(ctx, next) {
542
542
  if (_this.mockHandler) {
@@ -676,7 +676,7 @@ export var ModernDevServer = /* @__PURE__ */ function(ModernServer2) {
676
676
  1
677
677
  ];
678
678
  _this1.mockHandler = createMockHandler({
679
- pwd
679
+ pwd: pwd
680
680
  });
681
681
  return [
682
682
  3,
@@ -692,7 +692,7 @@ export var ModernDevServer = /* @__PURE__ */ function(ModernServer2) {
692
692
  success = _this1.runner.onApiChange([
693
693
  {
694
694
  filename: filepath,
695
- event
695
+ event: event
696
696
  }
697
697
  ]);
698
698
  if (!(success !== true))
@@ -703,7 +703,7 @@ export var ModernDevServer = /* @__PURE__ */ function(ModernServer2) {
703
703
  return [
704
704
  4,
705
705
  _superprop_get_onServerChange().call(_this1, {
706
- filepath
706
+ filepath: filepath
707
707
  })
708
708
  ];
709
709
  case 2:
@@ -856,8 +856,8 @@ export var ModernDevServer = /* @__PURE__ */ function(ModernServer2) {
856
856
  watcher.cleanDepCache(filepath);
857
857
  }
858
858
  _this.onServerChange({
859
- filepath,
860
- event
859
+ filepath: filepath,
860
+ event: event
861
861
  });
862
862
  });
863
863
  this.watcher = watcher;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.17.1",
18
+ "version": "2.18.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -45,10 +45,10 @@
45
45
  "minimatch": "^3.0.4",
46
46
  "path-to-regexp": "^6.2.0",
47
47
  "ws": "^8.2.0",
48
- "@modern-js/prod-server": "2.17.1",
49
- "@modern-js/server-utils": "2.17.1",
50
- "@modern-js/types": "2.17.1",
51
- "@modern-js/utils": "2.17.1"
48
+ "@modern-js/prod-server": "2.18.0",
49
+ "@modern-js/server-utils": "2.18.0",
50
+ "@modern-js/types": "2.18.0",
51
+ "@modern-js/utils": "2.18.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/connect-history-api-fallback": "^1.3.5",
@@ -63,9 +63,9 @@
63
63
  "typescript": "^4",
64
64
  "webpack": "^5.76.2",
65
65
  "websocket": "^1",
66
- "@modern-js/server-core": "2.17.1",
67
- "@scripts/build": "2.17.1",
68
- "@scripts/jest-config": "2.17.1"
66
+ "@modern-js/server-core": "2.18.0",
67
+ "@scripts/build": "2.18.0",
68
+ "@scripts/jest-config": "2.18.0"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "devcert": "^1.0.0",