@ovh-ux/manager-dev-server-config 1.0.0 → 3.0.0
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 +52 -0
- package/README.md +2 -2
- package/package.json +2 -2
- package/src/proxy/dev/index.js +3 -4
- package/src/proxy/index.js +2 -0
- package/src/proxy/registry/index.js +16 -0
- package/src/sso/index.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
+
# [3.0.0](https://github.com/ovh/manager/compare/@ovh-ux/manager-dev-server-config@2.0.0...@ovh-ux/manager-dev-server-config@3.0.0) (2021-11-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Build System
|
|
5
|
+
|
|
6
|
+
* require Node.js 14 ([f1ec93e](https://github.com/ovh/manager/commit/f1ec93ef1156184dda02762eb62c0d838be495b6))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* require Node.js 14
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# [2.0.0](https://github.com/ovh/manager/compare/@ovh-ux/manager-dev-server-config@1.1.1...@ovh-ux/manager-dev-server-config@2.0.0) (2021-01-13)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **proxy:** fix registry proxy path rewrite ([#4234](https://github.com/ovh/manager/issues/4234)) ([a42b53a](https://github.com/ovh/manager/commit/a42b53a99fba7ad4c8d770587a661e42b15d30d3))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* allow to rewrite path and headers when using dev proxy ([2a71352](https://github.com/ovh/manager/commit/2a71352a5500e897b740a0ec47b9834eeb3eb3cc))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### BREAKING CHANGES
|
|
29
|
+
|
|
30
|
+
* nic property is removed in favor of headers to allow more customization
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [1.1.1](https://github.com/ovh/manager/compare/@ovh-ux/manager-dev-server-config@1.1.0...@ovh-ux/manager-dev-server-config@1.1.1) (2020-12-08)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* **sso:** avoid region config error ([#4140](https://github.com/ovh/manager/issues/4140)) ([3eb55c5](https://github.com/ovh/manager/commit/3eb55c5453d131557a7dee28efbe69994610e22d))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# [1.1.0](https://github.com/ovh/manager/compare/@ovh-ux/manager-dev-server-config@1.0.0...@ovh-ux/manager-dev-server-config@1.1.0) (2020-11-16)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Features
|
|
47
|
+
|
|
48
|
+
* **dev-server-config:** add registry proxy config ([bd61f39](https://github.com/ovh/manager/commit/bd61f396cea43c8c11a1e9c7dc0afb14bf924f89))
|
|
49
|
+
* **dev-server-config:** add registryUrl in registry proxy config ([6809a49](https://github.com/ovh/manager/commit/6809a491d88446ae3f843ba115ebb4c14843f99a))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
1
53
|
# [1.0.0](https://github.com/ovh/manager/compare/@ovh-ux/manager-dev-server-config@0.0.0...@ovh-ux/manager-dev-server-config@1.0.0) (2020-07-08)
|
|
2
54
|
|
|
3
55
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Dev server configuration for OVHcloud Manager.
|
|
4
4
|
|
|
5
|
-
[](https://npmjs.com/package/@ovh-ux/manager-dev-server-config) [](https://npmjs.com/package/@ovh-ux/manager-dev-server-config?activeTab=dependencies) [](https://npmjs.com/package/@ovh-ux/manager-dev-server-config?activeTab=dependencies)
|
|
5
|
+
[](https://npmjs.com/package/@ovh-ux/manager-dev-server-config) [](https://npmjs.com/package/@ovh-ux/manager-dev-server-config?activeTab=dependencies) [](https://npmjs.com/package/@ovh-ux/manager-dev-server-config?activeTab=dependencies)
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ yarn add @ovh-ux/manager-dev-server-config
|
|
|
12
12
|
|
|
13
13
|
## Related
|
|
14
14
|
|
|
15
|
-
* [dev-server](https://github.com/ovh
|
|
15
|
+
* [dev-server](https://github.com/ovh/manager/tree/master/packages/manager/tools/dev-server) - OVHcloud manager dev server
|
|
16
16
|
|
|
17
17
|
## Contributing
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ovh-ux/manager-dev-server-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Provide OVHcloud Manager dev server config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"request": "^2.88.0"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": "
|
|
24
|
+
"node": "^14 || ^16",
|
|
25
25
|
"yarn": ">=1.21.1"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/proxy/dev/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports = ({ context,
|
|
1
|
+
module.exports = ({ context, target, pathRewrite, headers }) => ({
|
|
2
2
|
target,
|
|
3
3
|
context,
|
|
4
4
|
changeOrigin: true,
|
|
@@ -7,10 +7,9 @@ module.exports = ({ context, nic, target }) => ({
|
|
|
7
7
|
'^/apiv6/': '/',
|
|
8
8
|
'^/engine/api/': '/',
|
|
9
9
|
'^/engine/apiv6/': '/',
|
|
10
|
+
...(pathRewrite || {}),
|
|
10
11
|
},
|
|
11
|
-
headers
|
|
12
|
-
'X-Ovh-Nic': nic,
|
|
13
|
-
},
|
|
12
|
+
headers,
|
|
14
13
|
secure: false,
|
|
15
14
|
logLevel: 'debug',
|
|
16
15
|
});
|
package/src/proxy/index.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const TARGET = {
|
|
2
|
+
eu: 'https://www.ovh.com/manager/fragments',
|
|
3
|
+
ca: 'https://ca.ovh.com/manager/fragments',
|
|
4
|
+
us: 'https://us.ovhcloud.com/manager/fragments',
|
|
5
|
+
local: 'http://localhost:8888',
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
module.exports = (region, { local = false, registryUrl }) => ({
|
|
9
|
+
target: registryUrl || TARGET[local ? 'local' : region.toLowerCase()],
|
|
10
|
+
context: '/manager/fragments',
|
|
11
|
+
pathRewrite: {
|
|
12
|
+
'^/manager/fragments/': '/',
|
|
13
|
+
},
|
|
14
|
+
changeOrigin: true,
|
|
15
|
+
logLevel: 'silent',
|
|
16
|
+
});
|