@modern-js/server 2.12.1-alpha.0 → 2.13.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/dev-tools/dev-middleware/index.js +1 -1
  3. package/dist/esm/dev-tools/dev-middleware/index.js +1 -1
  4. package/dist/esm-node/dev-tools/dev-middleware/index.js +1 -1
  5. package/package.json +8 -8
  6. package/dist/js/modern/constants.js +0 -19
  7. package/dist/js/modern/dev-tools/dev-middleware/hmr-client/createSocketUrl.js +0 -41
  8. package/dist/js/modern/dev-tools/dev-middleware/hmr-client/index.js +0 -143
  9. package/dist/js/modern/dev-tools/dev-middleware/index.js +0 -94
  10. package/dist/js/modern/dev-tools/dev-middleware/socket-server.js +0 -132
  11. package/dist/js/modern/dev-tools/https/index.js +0 -49
  12. package/dist/js/modern/dev-tools/mock/getMockData.js +0 -114
  13. package/dist/js/modern/dev-tools/mock/index.js +0 -54
  14. package/dist/js/modern/dev-tools/register/index.js +0 -111
  15. package/dist/js/modern/dev-tools/watcher/dependency-tree.js +0 -59
  16. package/dist/js/modern/dev-tools/watcher/index.js +0 -106
  17. package/dist/js/modern/dev-tools/watcher/stats-cache.js +0 -58
  18. package/dist/js/modern/index.js +0 -12
  19. package/dist/js/modern/server/dev-server.js +0 -293
  20. package/dist/js/modern/server/index.js +0 -16
  21. package/dist/js/modern/types.js +0 -0
  22. package/dist/js/node/constants.js +0 -42
  23. package/dist/js/node/dev-tools/dev-middleware/hmr-client/createSocketUrl.js +0 -65
  24. package/dist/js/node/dev-tools/dev-middleware/hmr-client/index.js +0 -152
  25. package/dist/js/node/dev-tools/dev-middleware/index.js +0 -119
  26. package/dist/js/node/dev-tools/dev-middleware/socket-server.js +0 -159
  27. package/dist/js/node/dev-tools/https/index.js +0 -72
  28. package/dist/js/node/dev-tools/mock/getMockData.js +0 -135
  29. package/dist/js/node/dev-tools/mock/index.js +0 -83
  30. package/dist/js/node/dev-tools/register/index.js +0 -138
  31. package/dist/js/node/dev-tools/watcher/dependency-tree.js +0 -89
  32. package/dist/js/node/dev-tools/watcher/index.js +0 -135
  33. package/dist/js/node/dev-tools/watcher/stats-cache.js +0 -87
  34. package/dist/js/node/index.js +0 -35
  35. package/dist/js/node/server/dev-server.js +0 -310
  36. package/dist/js/node/server/index.js +0 -39
  37. package/dist/js/node/types.js +0 -15
  38. package/dist/js/treeshaking/constants.js +0 -21
  39. package/dist/js/treeshaking/dev-tools/dev-middleware/hmr-client/createSocketUrl.js +0 -51
  40. package/dist/js/treeshaking/dev-tools/dev-middleware/hmr-client/index.js +0 -157
  41. package/dist/js/treeshaking/dev-tools/dev-middleware/index.js +0 -322
  42. package/dist/js/treeshaking/dev-tools/dev-middleware/socket-server.js +0 -209
  43. package/dist/js/treeshaking/dev-tools/https/index.js +0 -193
  44. package/dist/js/treeshaking/dev-tools/mock/getMockData.js +0 -327
  45. package/dist/js/treeshaking/dev-tools/mock/index.js +0 -191
  46. package/dist/js/treeshaking/dev-tools/register/index.js +0 -153
  47. package/dist/js/treeshaking/dev-tools/watcher/dependency-tree.js +0 -150
  48. package/dist/js/treeshaking/dev-tools/watcher/index.js +0 -200
  49. package/dist/js/treeshaking/dev-tools/watcher/stats-cache.js +0 -128
  50. package/dist/js/treeshaking/index.js +0 -9
  51. package/dist/js/treeshaking/server/dev-server.js +0 -799
  52. package/dist/js/treeshaking/server/index.js +0 -92
  53. package/dist/js/treeshaking/types.js +0 -1
@@ -1,92 +0,0 @@
1
- function _assertThisInitialized(self) {
2
- if (self === void 0) {
3
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
- }
5
- return self;
6
- }
7
- function _classCallCheck(instance, Constructor) {
8
- if (!(instance instanceof Constructor)) {
9
- throw new TypeError("Cannot call a class as a function");
10
- }
11
- }
12
- function _getPrototypeOf(o) {
13
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
14
- return o.__proto__ || Object.getPrototypeOf(o);
15
- };
16
- return _getPrototypeOf(o);
17
- }
18
- function _inherits(subClass, superClass) {
19
- if (typeof superClass !== "function" && superClass !== null) {
20
- throw new TypeError("Super expression must either be null or a function");
21
- }
22
- subClass.prototype = Object.create(superClass && superClass.prototype, {
23
- constructor: {
24
- value: subClass,
25
- writable: true,
26
- configurable: true
27
- }
28
- });
29
- if (superClass) _setPrototypeOf(subClass, superClass);
30
- }
31
- function _possibleConstructorReturn(self, call) {
32
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
33
- return call;
34
- }
35
- return _assertThisInitialized(self);
36
- }
37
- function _setPrototypeOf(o, p) {
38
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
39
- o.__proto__ = p;
40
- return o;
41
- };
42
- return _setPrototypeOf(o, p);
43
- }
44
- var _typeof = function(obj) {
45
- "@swc/helpers - typeof";
46
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
47
- };
48
- function _isNativeReflectConstruct() {
49
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
50
- if (Reflect.construct.sham) return false;
51
- if (typeof Proxy === "function") return true;
52
- try {
53
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
54
- return true;
55
- } catch (e) {
56
- return false;
57
- }
58
- }
59
- function _createSuper(Derived) {
60
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
61
- return function _createSuperInternal() {
62
- var Super = _getPrototypeOf(Derived), result;
63
- if (hasNativeReflectConstruct) {
64
- var NewTarget = _getPrototypeOf(this).constructor;
65
- result = Reflect.construct(Super, arguments, NewTarget);
66
- } else {
67
- result = Super.apply(this, arguments);
68
- }
69
- return _possibleConstructorReturn(this, result);
70
- };
71
- }
72
- import { Server } from "@modern-js/prod-server";
73
- import { ModernDevServer } from "./dev-server";
74
- var createDevServer = function(options) {
75
- return new ModernDevServer(options);
76
- };
77
- var DevServer = /*#__PURE__*/ function(Server) {
78
- "use strict";
79
- _inherits(DevServer, Server);
80
- var _super = _createSuper(DevServer);
81
- function DevServer(options) {
82
- _classCallCheck(this, DevServer);
83
- var _this;
84
- _this = _super.call(this, options);
85
- if (options.dev) {
86
- _this.serverImpl = createDevServer;
87
- }
88
- return _this;
89
- }
90
- return DevServer;
91
- }(Server);
92
- export { DevServer };
@@ -1 +0,0 @@
1
- "use strict";