@capawesome/cli 3.5.0-dev.595a31d.1764251829 → 3.6.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 +7 -0
- package/README.md +22 -0
- package/dist/utils/http-client.js +10 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.6.0](https://github.com/capawesome-team/cli/compare/v3.5.0...v3.6.0) (2025-11-29)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add proxy support for HTTP and HTTPS requests ([#99](https://github.com/capawesome-team/cli/issues/99)) ([5a6e627](https://github.com/capawesome-team/cli/commit/5a6e627a85634628ea9c365d4e7b25cc69fbe11d))
|
|
11
|
+
|
|
5
12
|
## [3.5.0](https://github.com/capawesome-team/cli/compare/v3.4.2...v3.5.0) (2025-11-24)
|
|
6
13
|
|
|
7
14
|
|
package/README.md
CHANGED
|
@@ -34,6 +34,8 @@ npx @capawesome/cli --help
|
|
|
34
34
|
|
|
35
35
|
## Development
|
|
36
36
|
|
|
37
|
+
### Getting Started
|
|
38
|
+
|
|
37
39
|
Run the following commands to get started with development:
|
|
38
40
|
|
|
39
41
|
1. Clone the repository:
|
|
@@ -57,6 +59,26 @@ Run the following commands to get started with development:
|
|
|
57
59
|
|
|
58
60
|
**Note:** The `--` is required to pass arguments to the script.
|
|
59
61
|
|
|
62
|
+
### Testing Proxy Support
|
|
63
|
+
|
|
64
|
+
To test HTTP/HTTPS proxy functionality locally:
|
|
65
|
+
|
|
66
|
+
1. Start Squid proxy in a separate terminal:
|
|
67
|
+
```bash
|
|
68
|
+
docker run --rm --name squid-proxy -p 3128:3128 -v $(pwd)/squid.conf:/etc/squid/squid.conf:ro sameersbn/squid:latest
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
2. Set proxy environment variables and run the CLI:
|
|
72
|
+
```bash
|
|
73
|
+
export https_proxy=http://localhost:3128
|
|
74
|
+
npm run build && node ./dist/index.js login
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
3. To see debug output:
|
|
78
|
+
```bash
|
|
79
|
+
DEBUG=https-proxy-agent node ./dist/index.js login
|
|
80
|
+
```
|
|
81
|
+
|
|
60
82
|
## Changelog
|
|
61
83
|
|
|
62
84
|
See [CHANGELOG](./CHANGELOG.md).
|
|
@@ -43,8 +43,8 @@ class HttpClientImpl {
|
|
|
43
43
|
const axiosConfig = {
|
|
44
44
|
...config,
|
|
45
45
|
headers: { ...this.baseHeaders, ...config?.headers },
|
|
46
|
-
...(proxyAgent && urlWithHost.startsWith('https://') ? { httpsAgent: proxyAgent } : {}),
|
|
47
|
-
...(proxyAgent && urlWithHost.startsWith('http://') ? { httpAgent: proxyAgent } : {}),
|
|
46
|
+
...(proxyAgent && urlWithHost.startsWith('https://') ? { httpsAgent: proxyAgent, proxy: false } : {}),
|
|
47
|
+
...(proxyAgent && urlWithHost.startsWith('http://') ? { httpAgent: proxyAgent, proxy: false } : {}),
|
|
48
48
|
};
|
|
49
49
|
return axios.delete(urlWithHost, axiosConfig);
|
|
50
50
|
}
|
|
@@ -55,8 +55,8 @@ class HttpClientImpl {
|
|
|
55
55
|
const axiosConfig = {
|
|
56
56
|
...config,
|
|
57
57
|
headers: { ...this.baseHeaders, ...config?.headers },
|
|
58
|
-
...(proxyAgent && urlWithHost.startsWith('https://') ? { httpsAgent: proxyAgent } : {}),
|
|
59
|
-
...(proxyAgent && urlWithHost.startsWith('http://') ? { httpAgent: proxyAgent } : {}),
|
|
58
|
+
...(proxyAgent && urlWithHost.startsWith('https://') ? { httpsAgent: proxyAgent, proxy: false } : {}),
|
|
59
|
+
...(proxyAgent && urlWithHost.startsWith('http://') ? { httpAgent: proxyAgent, proxy: false } : {}),
|
|
60
60
|
};
|
|
61
61
|
return axios.get(urlWithHost, axiosConfig);
|
|
62
62
|
}
|
|
@@ -67,8 +67,8 @@ class HttpClientImpl {
|
|
|
67
67
|
const axiosConfig = {
|
|
68
68
|
...config,
|
|
69
69
|
headers: { ...this.baseHeaders, ...config?.headers },
|
|
70
|
-
...(proxyAgent && urlWithHost.startsWith('https://') ? { httpsAgent: proxyAgent } : {}),
|
|
71
|
-
...(proxyAgent && urlWithHost.startsWith('http://') ? { httpAgent: proxyAgent } : {}),
|
|
70
|
+
...(proxyAgent && urlWithHost.startsWith('https://') ? { httpsAgent: proxyAgent, proxy: false } : {}),
|
|
71
|
+
...(proxyAgent && urlWithHost.startsWith('http://') ? { httpAgent: proxyAgent, proxy: false } : {}),
|
|
72
72
|
};
|
|
73
73
|
return axios.patch(urlWithHost, data, axiosConfig);
|
|
74
74
|
}
|
|
@@ -79,8 +79,8 @@ class HttpClientImpl {
|
|
|
79
79
|
const axiosConfig = {
|
|
80
80
|
...config,
|
|
81
81
|
headers: { ...this.baseHeaders, ...config?.headers },
|
|
82
|
-
...(proxyAgent && urlWithHost.startsWith('https://') ? { httpsAgent: proxyAgent } : {}),
|
|
83
|
-
...(proxyAgent && urlWithHost.startsWith('http://') ? { httpAgent: proxyAgent } : {}),
|
|
82
|
+
...(proxyAgent && urlWithHost.startsWith('https://') ? { httpsAgent: proxyAgent, proxy: false } : {}),
|
|
83
|
+
...(proxyAgent && urlWithHost.startsWith('http://') ? { httpAgent: proxyAgent, proxy: false } : {}),
|
|
84
84
|
};
|
|
85
85
|
return axios.post(urlWithHost, data, axiosConfig);
|
|
86
86
|
}
|
|
@@ -91,8 +91,8 @@ class HttpClientImpl {
|
|
|
91
91
|
const axiosConfig = {
|
|
92
92
|
...config,
|
|
93
93
|
headers: { ...this.baseHeaders, ...config?.headers },
|
|
94
|
-
...(proxyAgent && urlWithHost.startsWith('https://') ? { httpsAgent: proxyAgent } : {}),
|
|
95
|
-
...(proxyAgent && urlWithHost.startsWith('http://') ? { httpAgent: proxyAgent } : {}),
|
|
94
|
+
...(proxyAgent && urlWithHost.startsWith('https://') ? { httpsAgent: proxyAgent, proxy: false } : {}),
|
|
95
|
+
...(proxyAgent && urlWithHost.startsWith('http://') ? { httpAgent: proxyAgent, proxy: false } : {}),
|
|
96
96
|
};
|
|
97
97
|
return axios.put(urlWithHost, data, axiosConfig);
|
|
98
98
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capawesome/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "The Capawesome Cloud Command Line Interface (CLI) to manage Live Updates and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"fmt": "npm run prettier -- --write",
|
|
14
14
|
"prettier": "prettier \"**/*.{css,html,ts,js}\"",
|
|
15
15
|
"sentry:releases:new": "sentry-cli releases new capawesome-team-cli@$npm_package_version --org genz-it-solutions-gmbh --project capawesome-team-cli",
|
|
16
|
-
"sentry:releases:set-commits": "sentry-cli releases set-commits capawesome-team-cli@$npm_package_version --auto --org genz-it-solutions-gmbh --project capawesome-team-cli",
|
|
16
|
+
"sentry:releases:set-commits": "sentry-cli releases set-commits capawesome-team-cli@$npm_package_version --auto --org genz-it-solutions-gmbh --project capawesome-team-cli --ignore-missing",
|
|
17
17
|
"sentry:releases:finalize": "sentry-cli releases finalize capawesome-team-cli@$npm_package_version --org genz-it-solutions-gmbh --project capawesome-team-cli",
|
|
18
18
|
"release": "commit-and-tag-version",
|
|
19
19
|
"prepublishOnly": "npm run build && npm run sentry:releases:new && npm run sentry:releases:set-commits",
|