@forge/egress 1.2.6-next.0 → 1.2.6-next.2
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
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @forge/egress
|
|
2
2
|
|
|
3
|
+
## 1.2.6-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 43121bc3: Bumping dependencies via Renovate:
|
|
8
|
+
|
|
9
|
+
- minimatch
|
|
10
|
+
|
|
11
|
+
## 1.2.6-next.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 0fbf747: Bumping dependencies via Renovate:
|
|
16
|
+
|
|
17
|
+
- @types/ignore-walk
|
|
18
|
+
|
|
3
19
|
## 1.2.6-next.0
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EgressFilteringService = void 0;
|
|
4
|
-
const
|
|
5
|
-
const minimatch_1 = tslib_1.__importDefault(require("minimatch"));
|
|
4
|
+
const minimatch_1 = require("minimatch");
|
|
6
5
|
const url_parser_1 = require("./url-parser");
|
|
7
6
|
class EgressFilteringService {
|
|
8
7
|
constructor(allowList) {
|
|
@@ -26,7 +25,7 @@ class EgressFilteringService {
|
|
|
26
25
|
allowedDomain(domain, allowList) {
|
|
27
26
|
return allowList
|
|
28
27
|
.filter((allowed) => allowed.protocol === domain.protocol)
|
|
29
|
-
.some((url) => (0, minimatch_1.
|
|
28
|
+
.some((url) => (0, minimatch_1.minimatch)(domain.hostname, decodeURIComponent(url.hostname)));
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
exports.EgressFilteringService = EgressFilteringService;
|
package/out/egress/utils.js
CHANGED
|
@@ -15,14 +15,14 @@ const sortAndGroupEgressPermissionsByDomain = (egressAddresses) => {
|
|
|
15
15
|
const url = (0, url_parser_1.parseUrl)(itemWithProtocol);
|
|
16
16
|
if (url.hostname.startsWith('*')) {
|
|
17
17
|
domains.add(url.hostname.substring(2));
|
|
18
|
-
wildcardDomains.push(
|
|
18
|
+
wildcardDomains.push(new minimatch_1.Minimatch(url.hostname));
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
21
21
|
domains.add(url.hostname);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
return [...domains].sort().reduce((grouped, domain) => {
|
|
25
|
-
if (!wildcardDomains.some((wcd) => wcd.
|
|
25
|
+
if (!wildcardDomains.some((wcd) => wcd.match(domain))) {
|
|
26
26
|
grouped.push(domain);
|
|
27
27
|
}
|
|
28
28
|
return grouped;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/egress",
|
|
3
|
-
"version": "1.2.6-next.
|
|
3
|
+
"version": "1.2.6-next.2",
|
|
4
4
|
"description": "Helpers and utils for egress implementation in Forge apps",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"author": "Atlassian",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@types/ignore-walk": "^4.0.
|
|
16
|
+
"@types/ignore-walk": "^4.0.1",
|
|
17
17
|
"@types/jest": "^29.5.5",
|
|
18
18
|
"@types/node": "14.18.63"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"minimatch": "^
|
|
21
|
+
"minimatch": "^9.0.3"
|
|
22
22
|
}
|
|
23
23
|
}
|