ko 6.6.3 → 6.6.4

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.
@@ -9,6 +9,7 @@ const webpack_2 = __importDefault(require("../webpack"));
9
9
  const factory_1 = __importDefault(require("./factory"));
10
10
  const detect_port_1 = __importDefault(require("detect-port"));
11
11
  const inquirer_1 = __importDefault(require("inquirer"));
12
+ const lodash_1 = require("lodash");
12
13
  class Dev extends factory_1.default {
13
14
  constructor(service) {
14
15
  super(service);
@@ -120,10 +121,11 @@ class Dev extends factory_1.default {
120
121
  process.env.NODE_ENV = 'development';
121
122
  this.service.freezeCliOptsWith(cliOpts);
122
123
  const config = await this.generateConfig();
123
- const port = config.devServer?.port;
124
+ const serverConfig = (0, lodash_1.omit)(config.devServer, 'compilationSuccessInfo');
125
+ const port = serverConfig.port;
124
126
  const newPort = (await this.checkPort(port));
125
127
  const compiler = (0, webpack_1.default)(config);
126
- const devServer = new webpack_dev_server_1.default({ ...config.devServer, port: newPort }, compiler);
128
+ const devServer = new webpack_dev_server_1.default({ ...serverConfig, port: newPort }, compiler);
127
129
  await devServer.start();
128
130
  const exitProcess = (callback) => () => {
129
131
  callback && callback();
package/lib/types.d.ts CHANGED
@@ -2,7 +2,19 @@ import { Pattern } from 'copy-webpack-plugin';
2
2
  import { Plugin } from 'postcss';
3
3
  import { IKeys, IOpts } from 'ko-lints';
4
4
  import { IOpts as AutoPolyfillsWebpackPluginOptions } from '@dtinsight/auto-polyfills-webpack-plugin';
5
- import { ClientConfiguration } from 'webpack-dev-server';
5
+ import { ClientConfiguration, Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';
6
+ export interface IServeConfig extends WebpackDevServerConfiguration {
7
+ proxy?: Record<string, any>;
8
+ host: string;
9
+ port: number;
10
+ staticPath?: string;
11
+ client?: boolean | ClientConfiguration | undefined;
12
+ historyApiFallback?: any;
13
+ compilationSuccessInfo?: {
14
+ messages: string[];
15
+ notes?: string[];
16
+ };
17
+ }
6
18
  export type IOptions = {
7
19
  /**
8
20
  * The current working directory.
@@ -83,20 +95,9 @@ export type IOptions = {
83
95
  /**
84
96
  * Options for the development server.
85
97
  * Docs url: https://webpack.js.org/configuration/dev-server/
86
- * @param {{proxy?: Record<string, any>, host: string, port: number, staticPath?: string, historyApiFallback?: any, compilationSuccessInfo?: { messages: string[]; notes?: string[] }}}
87
- */
88
- serve: {
89
- proxy?: Record<string, any>;
90
- host: string;
91
- port: number;
92
- staticPath?: string;
93
- client?: boolean | ClientConfiguration | undefined;
94
- historyApiFallback?: any;
95
- compilationSuccessInfo?: {
96
- messages: string[];
97
- notes?: string[];
98
- };
99
- };
98
+ * @param {IServeConfig}
99
+ */
100
+ serve: IServeConfig;
100
101
  /**
101
102
  * Experimental features to enable.
102
103
  * @param {{speedUp?: boolean, minimizer?: boolean, disableLazyImports?: boolean, enableCssModule?: boolean, compress?: any}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ko",
3
- "version": "6.6.3",
3
+ "version": "6.6.4",
4
4
  "description": "build & lint library",
5
5
  "keywords": [
6
6
  "ko",