@automattic/vip 2.17.0 → 2.19.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 +15 -0
- package/dist/bin/vip-config-envvar-delete.js +1 -1
- package/dist/bin/vip-config-envvar-get-all.js +1 -1
- package/dist/bin/vip-config-envvar-get.js +1 -1
- package/dist/bin/vip-config-envvar-list.js +1 -1
- package/dist/bin/vip-config-envvar-set.js +1 -1
- package/dist/bin/vip-config-software-get.js +3 -3
- package/dist/bin/vip-config-software-update.js +3 -3
- package/dist/bin/vip-config-software.js +2 -5
- package/dist/bin/vip-dev-env-create.js +4 -2
- package/dist/bin/vip-dev-env-destroy.js +1 -1
- package/dist/bin/vip-dev-env-exec.js +1 -1
- package/dist/bin/vip-dev-env-import-media.js +1 -1
- package/dist/bin/vip-dev-env-import-sql.js +1 -1
- package/dist/bin/vip-dev-env-info.js +8 -4
- package/dist/bin/vip-dev-env-list.js +1 -1
- package/dist/bin/vip-dev-env-start.js +2 -2
- package/dist/bin/vip-dev-env-stop.js +1 -1
- package/dist/bin/vip-dev-env-update.js +1 -1
- package/dist/bin/vip-wp.js +22 -3
- package/dist/bin/vip.js +11 -3
- package/dist/lib/cli/command.js +1 -5
- package/dist/lib/client-file-uploader.js +2 -5
- package/dist/lib/dev-environment/dev-environment-cli.js +36 -5
- package/dist/lib/dev-environment/dev-environment-core.js +53 -8
- package/dist/lib/http/proxy-agent.js +1 -10
- package/dist/lib/logout.js +27 -0
- package/npm-shrinkwrap.json +2055 -2824
- package/package.json +24 -25
- package/dist/lib/cli/pager.js +0 -52
|
@@ -4,8 +4,6 @@ var _socksProxyAgent = require("socks-proxy-agent");
|
|
|
4
4
|
|
|
5
5
|
var _httpsProxyAgent = require("https-proxy-agent");
|
|
6
6
|
|
|
7
|
-
var _httpProxyAgent = require("http-proxy-agent");
|
|
8
|
-
|
|
9
7
|
var _proxyFromEnv = require("proxy-from-env");
|
|
10
8
|
|
|
11
9
|
var _debug = _interopRequireDefault(require("debug"));
|
|
@@ -27,15 +25,13 @@ const debug = (0, _debug.default)('vip:proxy-agent');
|
|
|
27
25
|
// 2. No applicable variables are set: null is returned (thus, no proxy agent is returned)
|
|
28
26
|
// 3. VIP_USE_SYSTEM_PROXY and SOCKS_PROXY are set: a SOCKS_PROXY is returned
|
|
29
27
|
// 4. VIP_USE_SYSTEM_PROXY and HTTPS_PROXY are set: an HTTPS_PROXY is returned
|
|
30
|
-
// 5. VIP_USE_SYSTEM_PROXY and
|
|
31
|
-
// 6. NO_PROXY is set along with VIP_USE_SYSTEM_PROXY and any system proxy: null is returned if the no proxy applies, otherwise the first active proxy is used
|
|
28
|
+
// 5. NO_PROXY is set along with VIP_USE_SYSTEM_PROXY and any system proxy: null is returned if the no proxy applies, otherwise the first active proxy is used
|
|
32
29
|
// This allows near full customization by the client of what proxy should be used, instead of making assumptions based on the URL string
|
|
33
30
|
|
|
34
31
|
function createProxyAgent(url) {
|
|
35
32
|
const VIP_PROXY = process.env.VIP_PROXY || process.env.vip_proxy || null;
|
|
36
33
|
const SOCKS_PROXY = process.env.SOCKS_PROXY || process.env.socks_proxy || null;
|
|
37
34
|
const HTTPS_PROXY = process.env.HTTPS_PROXY || process.env.https_proxy || null;
|
|
38
|
-
const HTTP_PROXY = process.env.HTTP_PROXY || process.env.http_proxy || null;
|
|
39
35
|
const NO_PROXY = process.env.NO_PROXY || process.env.no_proxy || null; // VIP Socks Proxy should take precedence and should be fully backward compatible
|
|
40
36
|
|
|
41
37
|
if (VIP_PROXY) {
|
|
@@ -54,11 +50,6 @@ function createProxyAgent(url) {
|
|
|
54
50
|
debug(`Enabling HTTPS proxy support using config: ${HTTPS_PROXY}`);
|
|
55
51
|
return new _httpsProxyAgent.HttpsProxyAgent(HTTPS_PROXY);
|
|
56
52
|
}
|
|
57
|
-
|
|
58
|
-
if (HTTP_PROXY) {
|
|
59
|
-
debug(`Enabling HTTP proxy support using config: ${HTTP_PROXY}`);
|
|
60
|
-
return new _httpProxyAgent.HttpProxyAgent(HTTP_PROXY);
|
|
61
|
-
}
|
|
62
53
|
} // If no environment variables are set, the no proxy is in effect, or if the proxy enable is not set return null (equivilant of no Proxy agent)
|
|
63
54
|
|
|
64
55
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _token = _interopRequireDefault(require("./token"));
|
|
9
|
+
|
|
10
|
+
var _tracker = require("./tracker");
|
|
11
|
+
|
|
12
|
+
var _http = _interopRequireDefault(require("./api/http"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Internal dependencies
|
|
18
|
+
*/
|
|
19
|
+
var _default = async () => {
|
|
20
|
+
await (0, _http.default)('/logout', {
|
|
21
|
+
method: 'post'
|
|
22
|
+
});
|
|
23
|
+
await _token.default.purge();
|
|
24
|
+
await (0, _tracker.trackEvent)('logout_command_execute');
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.default = _default;
|