Update packages, fix pupetter, resolve some TypeScript warnings

This commit is contained in:
Alicia Sykes
2023-07-22 15:44:03 +01:00
parent dd0be7ed05
commit 049fb8da95
8 changed files with 29 additions and 21 deletions

View File

@ -1,6 +1,6 @@
import { Card } from 'components/Form/Card';
import Row, { ExpandableRow, RowProps } from 'components/Form/Row';
import Row, { RowProps } from 'components/Form/Row';
const cardStyles = '';

View File

@ -1,6 +1,5 @@
import { Card } from 'components/Form/Card';
import Heading from 'components/Form/Heading';
import Row, { ExpandableRow } from 'components/Form/Row';
import colors from 'styles/colors';

View File

@ -2,7 +2,6 @@
import styled from 'styled-components';
import { Card } from 'components/Form/Card';
import Heading from 'components/Form/Heading';
import Row, { ExpandableRow, RowProps } from 'components/Form/Row';
import colors from 'styles/colors';
const cardStyles = `

View File

@ -32,8 +32,8 @@ const MapChart = (location: Props) => {
stroke={colors.primary}
strokeWidth={0.5}
>
{({ geographies }) =>
geographies.map((geo) => (
{({ geographies }: any) =>
geographies.map((geo: any) => (
<Geography key={geo.rsmKey} geography={geo} />
))
}

View File

@ -18,7 +18,6 @@ import ServerLocationCard from 'components/Results/ServerLocation';
import ServerInfoCard from 'components/Results/ServerInfo';
import HostNamesCard from 'components/Results/HostNames';
import WhoIsCard from 'components/Results/WhoIs';
import BuiltWithCard from 'components/Results/BuiltWith';
import LighthouseCard from 'components/Results/Lighthouse';
import ScreenshotCard from 'components/Results/Screenshot';
import SslCertCard from 'components/Results/SslCert';
@ -51,7 +50,6 @@ import useMotherHook from 'hooks/motherOfAllHooks';
import {
getLocation, ServerLocation,
makeTechnologies, TechnologyGroup,
parseCookies, Cookie,
parseRobotsTxt,
applyWhoIsResults, Whois,
@ -157,7 +155,9 @@ const Results = (): JSX.Element => {
response.json()
.then(data => resolve(data))
.catch(error => resolve(
{ error: `Failed to process response, likely due to Netlify's 10-sec limit on lambda functions. Error: ${error}`}
{ error: `Failed to get a valid response 😢.
This is likely due the target not exposing the required data, or limitations in how Netlify executes lambda functions, such as the 10-sec timeout.
Error info: ${error}`}
));
});
};
@ -247,7 +247,6 @@ const Results = (): JSX.Element => {
.then(res => getLocation(res)),
});
// Get hostnames and associated domains from Shodan
const [shoadnResults, updateShodanResults] = useMotherHook<ShodanResults>({
jobId: 'hosts',
@ -258,7 +257,6 @@ const Results = (): JSX.Element => {
.then(res => parseShodanResults(res)),
});
// Check for open ports
const [portsResults, updatePortsResults] = useMotherHook({
jobId: 'ports',
@ -432,7 +430,6 @@ const Results = (): JSX.Element => {
{ id: 'status', title: 'Server Status', result: serverStatusResults, Component: ServerStatusCard, refresh: updateServerStatusResults },
{ id: 'ports', title: 'Open Ports', result: portsResults, Component: OpenPortsCard, refresh: updatePortsResults },
{ id: 'screenshot', title: 'Screenshot', result: screenshotResult || lighthouseResults?.fullPageScreenshot?.screenshot, Component: ScreenshotCard, refresh: updateScreenshotResult },
// { id: 'screenshot', title: 'Screenshot', result: lighthouseResults?.fullPageScreenshot?.screenshot, Component: ScreenshotCard, refresh: updateLighthouseResults },
{ id: 'txt-records', title: 'TXT Records', result: txtRecordResults, Component: TxtRecordCard, refresh: updateTxtRecordResults },
{ id: 'hsts', title: 'HSTS Check', result: hstsResults, Component: HstsCard, refresh: updateHstsResults },
{ id: 'whois', title: 'Domain Info', result: whoIsResults, Component: WhoIsCard, refresh: updateWhoIsResults },

1
src/typings/react-simple-maps.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare module 'react-simple-maps';