@rsdoctor/core 1.5.15 → 1.5.16

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.
@@ -118,7 +118,7 @@ function normalizeUserConfig(config = {}) {
118
118
  ...config,
119
119
  output: outputConfig
120
120
  };
121
- const { linter = {}, features = {}, loaderInterceptorOptions = {}, disableClientServer: userDisableClientServer = false, sdkInstance, innerClientPath = '', output = outputConfig, supports = getDefaultSupports(), port, printLog = {
121
+ const { linter = {}, features = {}, loaderInterceptorOptions = {}, disableClientServer: userDisableClientServer = false, sdkInstance, innerClientPath = '', output = outputConfig, supports = getDefaultSupports(), port, server: userServer = {}, printLog = {
122
122
  serverUrls: true
123
123
  }, mode, brief } = normalizedConfig;
124
124
  const disableClientServer = 'true' === process.env.RSTEST ? false : process.env.CI ? true : userDisableClientServer;
@@ -126,6 +126,12 @@ function normalizeUserConfig(config = {}) {
126
126
  external_assert_default()('object' == typeof features || Array.isArray(features));
127
127
  external_assert_default()('object' == typeof loaderInterceptorOptions);
128
128
  external_assert_default()('boolean' == typeof disableClientServer);
129
+ external_assert_default()(void 0 === port || 'number' == typeof port);
130
+ external_assert_default()('object' == typeof userServer && null !== userServer);
131
+ const server = {
132
+ ...userServer
133
+ };
134
+ if (void 0 === server.port && void 0 !== port) server.port = port;
129
135
  let finalMode = ('mode' in output && isValidMode(output.mode) ? 'lite' === output.mode ? types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.normal] : output.mode : void 0) || mode || types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.normal];
130
136
  if (mode) logger_namespaceObject.logger.info(logger_namespaceObject.chalk.yellow("The 'mode' configuration will be deprecated in a future version. Please use 'output.mode' instead."));
131
137
  const _features = normalizeFeatures(features, finalMode);
@@ -151,6 +157,7 @@ function normalizeUserConfig(config = {}) {
151
157
  innerClientPath,
152
158
  supports,
153
159
  port,
160
+ server,
154
161
  printLog
155
162
  };
156
163
  if (void 0 !== output.compressData) logger_namespaceObject.logger.info(logger_namespaceObject.chalk.yellow("The 'compressData' configuration will be deprecated in a future version."));
@@ -79,7 +79,7 @@ function normalizeUserConfig(config = {}) {
79
79
  ...config,
80
80
  output: outputConfig
81
81
  };
82
- const { linter = {}, features = {}, loaderInterceptorOptions = {}, disableClientServer: userDisableClientServer = false, sdkInstance, innerClientPath = '', output = outputConfig, supports = getDefaultSupports(), port, printLog = {
82
+ const { linter = {}, features = {}, loaderInterceptorOptions = {}, disableClientServer: userDisableClientServer = false, sdkInstance, innerClientPath = '', output = outputConfig, supports = getDefaultSupports(), port, server: userServer = {}, printLog = {
83
83
  serverUrls: true
84
84
  }, mode, brief } = normalizedConfig;
85
85
  const disableClientServer = 'true' === process.env.RSTEST ? false : process.env.CI ? true : userDisableClientServer;
@@ -87,6 +87,12 @@ function normalizeUserConfig(config = {}) {
87
87
  assert('object' == typeof features || Array.isArray(features));
88
88
  assert('object' == typeof loaderInterceptorOptions);
89
89
  assert('boolean' == typeof disableClientServer);
90
+ assert(void 0 === port || 'number' == typeof port);
91
+ assert('object' == typeof userServer && null !== userServer);
92
+ const server = {
93
+ ...userServer
94
+ };
95
+ if (void 0 === server.port && void 0 !== port) server.port = port;
90
96
  let finalMode = ('mode' in output && isValidMode(output.mode) ? 'lite' === output.mode ? SDK.IMode[SDK.IMode.normal] : output.mode : void 0) || mode || SDK.IMode[SDK.IMode.normal];
91
97
  if (mode) logger.info(chalk.yellow("The 'mode' configuration will be deprecated in a future version. Please use 'output.mode' instead."));
92
98
  const _features = normalizeFeatures(features, finalMode);
@@ -112,6 +118,7 @@ function normalizeUserConfig(config = {}) {
112
118
  innerClientPath,
113
119
  supports,
114
120
  port,
121
+ server,
115
122
  printLog
116
123
  };
117
124
  if (void 0 !== output.compressData) logger.info(chalk.yellow("The 'compressData' configuration will be deprecated in a future version."));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/core",
3
- "version": "1.5.15",
3
+ "version": "1.5.16",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
@@ -94,10 +94,10 @@
94
94
  "fs-extra": "^11.1.1",
95
95
  "semver": "^7.7.4",
96
96
  "source-map": "^0.7.6",
97
- "@rsdoctor/graph": "1.5.15",
98
- "@rsdoctor/sdk": "1.5.15",
99
- "@rsdoctor/types": "1.5.15",
100
- "@rsdoctor/utils": "1.5.15"
97
+ "@rsdoctor/graph": "1.5.16",
98
+ "@rsdoctor/types": "1.5.16",
99
+ "@rsdoctor/utils": "1.5.16",
100
+ "@rsdoctor/sdk": "1.5.16"
101
101
  },
102
102
  "devDependencies": {
103
103
  "@rspack/core": "^2.0.5",