@ovh-ux/manager-webpack-dev-server 2.7.1 → 2.8.3
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 +37 -0
- package/README.md +1 -1
- package/package.json +3 -22
- package/src/config.js +58 -0
- package/src/index.js +11 -0
- package/dist/config.js +0 -44
- package/dist/index.js +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
## [2.8.3](https://github.com/ovh/manager/compare/@ovh-ux/manager-webpack-dev-server@2.8.2...@ovh-ux/manager-webpack-dev-server@2.8.3) (2021-11-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** upgrade `ovh-ux/manager-dev-server-config` to `v3.0.0` ([#6045](https://github.com/ovh/manager/issues/6045)) ([93d9d3a](https://github.com/ovh/manager/commit/93d9d3ae1e836432f86d825866526cbe2a3293ba))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [2.8.2](https://github.com/ovh/manager/compare/@ovh-ux/manager-webpack-dev-server@2.8.1...@ovh-ux/manager-webpack-dev-server@2.8.2) (2021-06-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Performance Improvements
|
|
14
|
+
|
|
15
|
+
* rename `*.ts` files into `*.js` ([036fdc9](https://github.com/ovh/manager/commit/036fdc985bf6f590e057ee2b32e6cf1a341f7bef))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [2.8.1](https://github.com/ovh/manager/compare/@ovh-ux/manager-webpack-dev-server@2.8.0...@ovh-ux/manager-webpack-dev-server@2.8.1) (2021-01-13)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* update manager-dev-server-config usage ([0f729fe](https://github.com/ovh/manager/commit/0f729fe9c26be55825cb63ee39f1586b7dd82847))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# [2.8.0](https://github.com/ovh/manager/compare/@ovh-ux/manager-webpack-dev-server@2.7.1...@ovh-ux/manager-webpack-dev-server@2.8.0) (2020-11-16)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **webpack-dev-server:** add registry proxy and option ([4095bf6](https://github.com/ovh/manager/commit/4095bf668328a81165e2db671a55ee5219036193))
|
|
34
|
+
* **webpack-dev-server:** allow to give registryUrl in ([e52142e](https://github.com/ovh/manager/commit/e52142e86dc712a2722c4a1e702f4022cb10c805))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
1
38
|
## [2.7.1](https://github.com/ovh/manager/compare/@ovh-ux/manager-webpack-dev-server@2.7.0...@ovh-ux/manager-webpack-dev-server@2.7.1) (2020-10-28)
|
|
2
39
|
|
|
3
40
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> OVH manager webpack development server configuration.
|
|
4
4
|
|
|
5
|
-
[](https://npmjs.com/package/@ovh-ux/manager-webpack-dev-server) [](https://npmjs.com/package/@ovh-ux/manager-webpack-dev-server?activeTab=dependencies) [](https://npmjs.com/package/@ovh-ux/manager-webpack-dev-server?activeTab=dependencies)
|
|
5
|
+
[](https://npmjs.com/package/@ovh-ux/manager-webpack-dev-server) [](https://npmjs.com/package/@ovh-ux/manager-webpack-dev-server?activeTab=dependencies) [](https://npmjs.com/package/@ovh-ux/manager-webpack-dev-server?activeTab=dependencies)
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ovh-ux/manager-webpack-dev-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.3",
|
|
4
4
|
"description": "OVHcloud manager webpack development server configuration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -13,31 +13,12 @@
|
|
|
13
13
|
},
|
|
14
14
|
"license": "BSD-3-Clause",
|
|
15
15
|
"author": "OVH SAS",
|
|
16
|
-
"main": "
|
|
17
|
-
"files": [
|
|
18
|
-
"dist"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"build": "tsc",
|
|
22
|
-
"dev": "yarn run build",
|
|
23
|
-
"dev:watch": "tsc -w",
|
|
24
|
-
"lint": "eslint --quiet --fix src",
|
|
25
|
-
"prepare": "yarn run build",
|
|
26
|
-
"test": "eslint --quiet src"
|
|
27
|
-
},
|
|
16
|
+
"main": "src/index.js",
|
|
28
17
|
"dependencies": {
|
|
29
|
-
"@ovh-ux/manager-dev-server-config": "^
|
|
18
|
+
"@ovh-ux/manager-dev-server-config": "^3.0.0",
|
|
30
19
|
"duplicate-package-checker-webpack-plugin": "^3.0.0",
|
|
31
20
|
"friendly-errors-webpack-plugin": "^1.7.0",
|
|
32
21
|
"webpack-dev-server": "^3.11.0",
|
|
33
22
|
"yn": "^4.0.0"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^2.11.0",
|
|
37
|
-
"@typescript-eslint/parser": "^2.11.0",
|
|
38
|
-
"eslint": "^6.7.2",
|
|
39
|
-
"eslint-config-airbnb-base": "^14.0.0",
|
|
40
|
-
"eslint-plugin-import": "^2.19.1",
|
|
41
|
-
"typescript": "^3.7.3"
|
|
42
23
|
}
|
|
43
24
|
}
|
package/src/config.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const devServerConfig = require('@ovh-ux/manager-dev-server-config');
|
|
2
|
+
const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
|
|
3
|
+
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin');
|
|
4
|
+
const yn = require('yn');
|
|
5
|
+
|
|
6
|
+
const serverProxy = { ...devServerConfig.proxy };
|
|
7
|
+
const Sso = Object.assign(devServerConfig.sso);
|
|
8
|
+
|
|
9
|
+
module.exports = (env) => {
|
|
10
|
+
const region = (
|
|
11
|
+
env.region ||
|
|
12
|
+
process.env.REGION ||
|
|
13
|
+
process.env.npm_package_config_region ||
|
|
14
|
+
'eu'
|
|
15
|
+
).toLowerCase();
|
|
16
|
+
const proxy = [
|
|
17
|
+
serverProxy.v6(region),
|
|
18
|
+
serverProxy.registry(region, {
|
|
19
|
+
local:
|
|
20
|
+
yn(env.localRegistry) ||
|
|
21
|
+
yn(process.env.npm_package_config_localRegistry),
|
|
22
|
+
registryUrl:
|
|
23
|
+
env.registryUrl || process.env.npm_package_config_registryUrl,
|
|
24
|
+
}),
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const sso = new Sso(region);
|
|
28
|
+
|
|
29
|
+
if (yn(env.local2API) || yn(process.env.npm_package_config_local2API)) {
|
|
30
|
+
proxy.unshift(serverProxy.aapi);
|
|
31
|
+
}
|
|
32
|
+
if (env.dev) {
|
|
33
|
+
proxy.unshift(...env.dev.map((config) => serverProxy.dev(config)));
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
mode: 'development',
|
|
37
|
+
plugins: [
|
|
38
|
+
new DuplicatePackageCheckerPlugin(),
|
|
39
|
+
new FriendlyErrorsWebpackPlugin(),
|
|
40
|
+
],
|
|
41
|
+
devServer: {
|
|
42
|
+
before(app) {
|
|
43
|
+
app.get('/auth', sso.auth.bind(sso));
|
|
44
|
+
app.get('/auth/check', sso.checkAuth.bind(sso));
|
|
45
|
+
},
|
|
46
|
+
clientLogLevel: 'none',
|
|
47
|
+
logLevel: 'silent',
|
|
48
|
+
host: env.host || process.env.npm_package_config_host || 'localhost',
|
|
49
|
+
https: env.https || yn(process.env.npm_package_config_https) || false,
|
|
50
|
+
overlay: true,
|
|
51
|
+
port:
|
|
52
|
+
env.port ||
|
|
53
|
+
Number.parseInt(process.env.npm_package_config_port, 10) ||
|
|
54
|
+
9000,
|
|
55
|
+
proxy,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
};
|
package/src/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const devServerConfig = require('@ovh-ux/manager-dev-server-config');
|
|
2
|
+
const config = require('./config');
|
|
3
|
+
|
|
4
|
+
const sso = Object.assign(devServerConfig.sso);
|
|
5
|
+
const proxy = { ...devServerConfig.proxy };
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
sso,
|
|
9
|
+
proxy,
|
|
10
|
+
config,
|
|
11
|
+
};
|
package/dist/config.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
var manager_dev_server_config_1 = require("@ovh-ux/manager-dev-server-config");
|
|
6
|
-
var duplicate_package_checker_webpack_plugin_1 = __importDefault(require("duplicate-package-checker-webpack-plugin"));
|
|
7
|
-
var friendly_errors_webpack_plugin_1 = __importDefault(require("friendly-errors-webpack-plugin"));
|
|
8
|
-
var yn_1 = __importDefault(require("yn"));
|
|
9
|
-
module.exports = function (env) {
|
|
10
|
-
var region = (env.region ||
|
|
11
|
-
process.env.REGION ||
|
|
12
|
-
process.env.npm_package_config_region ||
|
|
13
|
-
'eu').toLowerCase();
|
|
14
|
-
var proxy = [manager_dev_server_config_1.proxy.v6(region)];
|
|
15
|
-
var sso = new manager_dev_server_config_1.sso(region);
|
|
16
|
-
if (yn_1.default(env.local2API) || yn_1.default(process.env.npm_package_config_local2API)) {
|
|
17
|
-
proxy.unshift(manager_dev_server_config_1.proxy.aapi);
|
|
18
|
-
}
|
|
19
|
-
if (env.dev) {
|
|
20
|
-
proxy.unshift.apply(proxy, env.dev.map(function (config) { return manager_dev_server_config_1.proxy.dev(config); }));
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
mode: 'development',
|
|
24
|
-
plugins: [
|
|
25
|
-
new duplicate_package_checker_webpack_plugin_1.default(),
|
|
26
|
-
new friendly_errors_webpack_plugin_1.default(),
|
|
27
|
-
],
|
|
28
|
-
devServer: {
|
|
29
|
-
before: function (app) {
|
|
30
|
-
app.get('/auth', sso.auth.bind(sso));
|
|
31
|
-
app.get('/auth/check', sso.checkAuth.bind(sso));
|
|
32
|
-
},
|
|
33
|
-
clientLogLevel: 'none',
|
|
34
|
-
logLevel: 'silent',
|
|
35
|
-
host: env.host || process.env.npm_package_config_host || 'localhost',
|
|
36
|
-
https: env.https || yn_1.default(process.env.npm_package_config_https) || false,
|
|
37
|
-
overlay: true,
|
|
38
|
-
port: env.port ||
|
|
39
|
-
Number.parseInt(process.env.npm_package_config_port, 10) ||
|
|
40
|
-
9000,
|
|
41
|
-
proxy: proxy,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
};
|
package/dist/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
var manager_dev_server_config_1 = require("@ovh-ux/manager-dev-server-config");
|
|
6
|
-
var config_1 = __importDefault(require("./config"));
|
|
7
|
-
module.exports = {
|
|
8
|
-
sso: manager_dev_server_config_1.sso,
|
|
9
|
-
proxy: manager_dev_server_config_1.proxy,
|
|
10
|
-
config: config_1.default,
|
|
11
|
-
};
|