Skip to content

Commit 4f0152a

Browse files
committed
fix: audit
1 parent e47d88a commit 4f0152a

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

electron/utils.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { URL } from "url";
1+
import { URL } from 'url';
22

33
interface ValidURLCheckResult {
44
isValid: boolean;
@@ -8,16 +8,15 @@ interface ValidURLCheckResult {
88
export function isValidURL(str: string): ValidURLCheckResult {
99
try {
1010
if (!str.startsWith('https://') && !str.startsWith('http://')) {
11-
str = 'https://' + str
12-
11+
str = 'https://' + str;
1312
}
14-
const parsedUrl = new URL(str)
15-
const regex = /^([a-zA-Z0-9-_.:]+)+$/
13+
const parsedUrl = new URL(str);
14+
const regex = /^([a-zA-Z0-9-_.:]+)+$/;
1615
return {
1716
isValid: regex.test(parsedUrl.host),
1817
finalURL: str
19-
}
18+
};
2019
} catch (e) {
21-
return { isValid: false, finalURL: str }
20+
return { isValid: false, finalURL: str };
2221
}
2322
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"main": "build/electron/main.js",
1010
"private": true,
1111
"scripts": {
12-
"run-audit": "yarn audit-ci --high -a 1094574 1096494 1096640",
12+
"run-audit": "yarn audit-ci --high -a 1094574 1096494 1096698",
1313
"start": "node scripts/start.js",
1414
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 && yarn clean-builds && node scripts/build.js",
1515
"test": "node scripts/test.js --watchAll=false",

0 commit comments

Comments
 (0)