@rsdoctor/core 1.5.15 → 1.5.17

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,14 +118,24 @@ 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: userSupports = {}, port, server: userServer = {}, printLog = {
122
122
  serverUrls: true
123
123
  }, mode, brief } = normalizedConfig;
124
+ const supports = {
125
+ ...getDefaultSupports(),
126
+ ...userSupports
127
+ };
124
128
  const disableClientServer = 'true' === process.env.RSTEST ? false : process.env.CI ? true : userDisableClientServer;
125
129
  external_assert_default()('object' == typeof linter);
126
130
  external_assert_default()('object' == typeof features || Array.isArray(features));
127
131
  external_assert_default()('object' == typeof loaderInterceptorOptions);
128
132
  external_assert_default()('boolean' == typeof disableClientServer);
133
+ external_assert_default()(void 0 === port || 'number' == typeof port);
134
+ external_assert_default()('object' == typeof userServer && null !== userServer);
135
+ const server = {
136
+ ...userServer
137
+ };
138
+ if (void 0 === server.port && void 0 !== port) server.port = port;
129
139
  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
140
  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
141
  const _features = normalizeFeatures(features, finalMode);
@@ -151,6 +161,7 @@ function normalizeUserConfig(config = {}) {
151
161
  innerClientPath,
152
162
  supports,
153
163
  port,
164
+ server,
154
165
  printLog
155
166
  };
156
167
  if (void 0 !== output.compressData) logger_namespaceObject.logger.info(logger_namespaceObject.chalk.yellow("The 'compressData' configuration will be deprecated in a future version."));
@@ -79,14 +79,24 @@ 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: userSupports = {}, port, server: userServer = {}, printLog = {
83
83
  serverUrls: true
84
84
  }, mode, brief } = normalizedConfig;
85
+ const supports = {
86
+ ...getDefaultSupports(),
87
+ ...userSupports
88
+ };
85
89
  const disableClientServer = 'true' === process.env.RSTEST ? false : process.env.CI ? true : userDisableClientServer;
86
90
  assert('object' == typeof linter);
87
91
  assert('object' == typeof features || Array.isArray(features));
88
92
  assert('object' == typeof loaderInterceptorOptions);
89
93
  assert('boolean' == typeof disableClientServer);
94
+ assert(void 0 === port || 'number' == typeof port);
95
+ assert('object' == typeof userServer && null !== userServer);
96
+ const server = {
97
+ ...userServer
98
+ };
99
+ if (void 0 === server.port && void 0 !== port) server.port = port;
90
100
  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
101
  if (mode) logger.info(chalk.yellow("The 'mode' configuration will be deprecated in a future version. Please use 'output.mode' instead."));
92
102
  const _features = normalizeFeatures(features, finalMode);
@@ -112,6 +122,7 @@ function normalizeUserConfig(config = {}) {
112
122
  innerClientPath,
113
123
  supports,
114
124
  port,
125
+ server,
115
126
  printLog
116
127
  };
117
128
  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.17",
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/types": "1.5.17",
98
+ "@rsdoctor/utils": "1.5.17",
99
+ "@rsdoctor/sdk": "1.5.17",
100
+ "@rsdoctor/graph": "1.5.17"
101
101
  },
102
102
  "devDependencies": {
103
103
  "@rspack/core": "^2.0.5",