Skip to content

Commit aaccec6

Browse files
authored
Merge pull request #114 from marcellourbani/optional-https-agent---partially-fixes-#106
2 parents 9ded0b2 + 348f811 commit aaccec6

6 files changed

Lines changed: 12 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.9.0 (06-06-2025)
2+
3+
- validate TLS connections by default (rejectUnauthorized=true)
4+
- improved proxy support (use custom agent only when not validating TLS connections)
5+
16
## 1.8.2 (16-04-2025)
27

38
- fix parser config handler

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Default `package.json` or `rc` file config looks as follows:
7777
// Source for standard library metadata preload
7878
"dataSource": "https://ui5.sap.com/",
7979
// For HTTP requests to dataSource
80-
"rejectUnauthorized": false,
80+
"rejectUnauthorized": true,
8181
// List of libraries to be loaded
8282
"libsToLoad": [
8383
"sap.m",

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ui5plugin-parser",
3-
"version": "1.8.2",
3+
"version": "1.9.0",
44
"description": "UI5 Class parser",
55
"main": "dist/index.js",
66
"scripts": {
@@ -67,4 +67,4 @@
6767
"rc-config-loader": "^4.1.3",
6868
"ts-morph": "^25.0.1"
6969
}
70-
}
70+
}

src/classes/config/PackageParserConfigHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export class PackageParserConfigHandler implements IParserConfigHandler {
152152
return (
153153
this._config?.ui5?.ui5parser?.rejectUnauthorized ??
154154
PackageParserConfigHandler._globalConfig?.ui5?.ui5parser?.rejectUnauthorized ??
155-
false
155+
true
156156
);
157157
}
158158

src/classes/http/HTTPHandler.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export class HTTPHandler {
1212
let data = {};
1313

1414
const rejectUnauthorized = this.configHandler.getRejectUnauthorized();
15-
const agent = new https.Agent({
16-
rejectUnauthorized: !!rejectUnauthorized
17-
});
18-
options.httpsAgent = agent;
15+
if (!rejectUnauthorized) options.httpsAgent = new https.Agent({ rejectUnauthorized: !!rejectUnauthorized });
1916

2017
try {
2118
if (HTTPHandler._requests[uri]) {

0 commit comments

Comments
 (0)