[MM-51406] Update node-abi, fix some server modal bugs (#2617)

* Update node-abi so tests can run

* [MM-51392] Fix modal ping bugs
This commit is contained in:
Devin Binnie 2023-03-15 09:12:53 -04:00 committed by GitHub
parent 69831bbe13
commit cf8aa6499c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 23 deletions

14
package-lock.json generated
View file

@ -80,7 +80,7 @@
"mocha-circleci-reporter": "0.0.3",
"mochawesome": "7.1.3",
"nan": "2.17.0",
"node-abi": "3.26.0",
"node-abi": "3.33.0",
"node-jq": "2.3.4",
"node-loader": "2.0.0",
"npm-run-all": "4.1.5",
@ -25609,9 +25609,9 @@
"dev": true
},
"node_modules/node-abi": {
"version": "3.26.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.26.0.tgz",
"integrity": "sha512-jRVtMFTChbi2i/jqo/i2iP9634KMe+7K1v35mIdj3Mn59i5q27ZYhn+sW6npISM/PQg7HrP2kwtRBMmh5Uvzdg==",
"version": "3.33.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.33.0.tgz",
"integrity": "sha512-7GGVawqyHF4pfd0YFybhv/eM9JwTtPqx0mAanQ146O3FlSh3pA24zf9IRQTOsfTSqXTNzPSP5iagAJ94jjuVog==",
"dev": true,
"dependencies": {
"semver": "^7.3.5"
@ -53136,9 +53136,9 @@
}
},
"node-abi": {
"version": "3.26.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.26.0.tgz",
"integrity": "sha512-jRVtMFTChbi2i/jqo/i2iP9634KMe+7K1v35mIdj3Mn59i5q27ZYhn+sW6npISM/PQg7HrP2kwtRBMmh5Uvzdg==",
"version": "3.33.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.33.0.tgz",
"integrity": "sha512-7GGVawqyHF4pfd0YFybhv/eM9JwTtPqx0mAanQ146O3FlSh3pA24zf9IRQTOsfTSqXTNzPSP5iagAJ94jjuVog==",
"dev": true,
"requires": {
"semver": "^7.3.5"

View file

@ -198,7 +198,7 @@
"mocha-circleci-reporter": "0.0.3",
"mochawesome": "7.1.3",
"nan": "2.17.0",
"node-abi": "3.26.0",
"node-abi": "3.33.0",
"node-jq": "2.3.4",
"node-loader": "2.0.0",
"npm-run-all": "4.1.5",

View file

@ -76,16 +76,16 @@ function ConfigureServer({
if (urlUtils.startsWithProtocol(checkURL)) {
return Promise.resolve(checkURL);
}
return window.desktop.modals.pingDomain(checkURL).then((result: string | Error) => {
let newURL = checkURL;
if (result instanceof Error) {
console.error(`Could not ping url: ${checkURL}`);
} else {
newURL = `${result}://${checkURL}`;
return window.desktop.modals.pingDomain(checkURL).
then((result: string) => {
const newURL = `${result}://${checkURL}`;
setUrl(newURL);
}
return newURL;
});
return newURL;
}).
catch(() => {
console.error(`Could not ping url: ${checkURL}`);
return checkURL;
});
};
const validateName = () => {

View file

@ -156,13 +156,13 @@ class NewTeamModal extends React.PureComponent<Props, State> {
return Promise.resolve(undefined);
}
return window.desktop.modals.pingDomain(teamUrl).then((result: string | Error) => {
if (result instanceof Error) {
console.error(`Could not ping url: ${teamUrl}`);
} else {
return window.desktop.modals.pingDomain(teamUrl).
then((result: string) => {
this.setState({teamUrl: `${result}://${this.state.teamUrl}`});
}
});
}).
catch(() => {
console.error(`Could not ping url: ${teamUrl}`);
});
}
getError() {