Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove obsolete npm deps #732

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,243 changes: 355 additions & 888 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"lodash": "4.17.21",
"mobx": "6.12.0",
"mobx-react": "9.1.0",
"object-hash": "3.0.0",
"pluralize": "8.0.0",
"prop-types": "15.8.1",
"query-string": "8.1.0",
Expand All @@ -50,7 +49,6 @@
"react-router-dom": "6.20.0",
"react-spring": "9.7.3",
"react-window": "1.8.10",
"route-parser": "0.0.5",
"url-parse": "1.5.10"
},
"devDependencies": {
Expand Down Expand Up @@ -88,7 +86,6 @@
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-react": "7.33.2",
"file-loader": "6.2.0",
"fs-extra": "11.1.1",
"html-webpack-plugin": "5.5.3",
"husky": "8.0.3",
Expand All @@ -101,26 +98,22 @@
"npm-check-updates": "16.14.11",
"npm-run-all": "4.1.5",
"patch-package": "8.0.0",
"postcss-loader": "7.3.3",
"prettier": "3.1.0",
"react-test-renderer": "18.2.0",
"sass": "1.69.5",
"sass-loader": "13.3.2",
"servor": "4.0.2",
"source-map-explorer": "2.5.3",
"source-map-loader": "4.0.1",
"style-loader": "3.3.3",
"stylelint": "15.11.0",
"stylelint-config-css-modules": "4.3.0",
"stylelint-config-standard-scss": "11.1.0",
"stylelint-scss": "5.3.1",
"svg-react-loader": "0.4.6",
"ts-jest": "29.1.1",
"ts-loader": "9.5.1",
"ts-protoc-gen": "0.15.0",
"tsconfig-paths-webpack-plugin": "4.1.0",
"typescript": "5.3.2",
"url-loader": "4.1.1",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1"
Expand Down
4 changes: 2 additions & 2 deletions src/api/grpc/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ export const filterEntryWhitelistFilters = (
const pod = filter.podNamespace
? `${filter.podNamespace}/${filter.query}`
: filters.namespace
? `${filters.namespace}/${filter.query}`
: null;
? `${filters.namespace}/${filter.query}`
: null;

if (filter.fromRequired) {
// NOTE: this makes possible to catch flows [outside of ns] -> [ns]
Expand Down
1 change: 0 additions & 1 deletion src/assets/icons/verdict-icon.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/icons/visual-icon.svg

This file was deleted.

18 changes: 18 additions & 0 deletions src/components/Icons/VerdictFiltersIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';

export function VerdictFiltersIcon() {
return (
<svg
width="21"
height="16"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="21" height="16" rx="2" />
<path
d="M14.857 6.393l-4.238-4.238a.538.538 0 00-.76 0L7.74 4.274c-.21.21-.21.55 0 .76l1.494 1.494L8.12 7.642l-.027-.027a.46.46 0 00-.652 0l-3.314 3.314a.46.46 0 000 .652l1.25 1.25c.18.18.472.18.652 0l3.314-3.315a.46.46 0 000-.651l-.027-.028 1.113-1.113 1.549 1.548c.21.21.55.21.76 0l2.119-2.118c.21-.21.21-.551 0-.761zM16.596 12.998H9.682v-1.222c0-.343.278-.622.622-.622h5.67c.344 0 .623.278.623.622v1.222z"
fill="#fff"
/>
</svg>
);
}
18 changes: 18 additions & 0 deletions src/components/Icons/VisualFiltersIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';

export function VisualFiltersIcon() {
return (
<svg
width="21"
height="16"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="21" height="16" rx="2" />
<path
d="M14.857 6.393l-4.238-4.238a.538.538 0 00-.76 0L7.74 4.274c-.21.21-.21.55 0 .76l1.494 1.494L8.12 7.642l-.027-.027a.46.46 0 00-.652 0l-3.314 3.314a.46.46 0 000 .652l1.25 1.25c.18.18.472.18.652 0l3.314-3.315a.46.46 0 000-.651l-.027-.028 1.113-1.113 1.549 1.548c.21.21.55.21.76 0l2.119-2.118c.21-.21.21-.551 0-.761zM16.596 12.998H9.682v-1.222c0-.343.278-.622.622-.622h5.67c.344 0 .623.278.623.622v1.222z"
fill="#fff"
/>
</svg>
);
}
4 changes: 2 additions & 2 deletions src/components/TopBar/NamespaceSelectorDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export const NamespaceSelectorDropdown = memo<Props>(
currentNamespace && namespaces.includes(currentNamespace)
? currentNamespace
: currentNamespace
? `Waiting ${currentNamespace} namespace…`
: 'Choose namespace';
? `Waiting ${currentNamespace} namespace…`
: 'Choose namespace';

return (
<NamespaceSelect
Expand Down
4 changes: 2 additions & 2 deletions src/components/TopBar/VerdictFilterDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import classnames from 'classnames';
import { usePopover } from '~/ui/hooks/usePopover';
import { Verdict } from '~/domain/hubble';

import VerdictIcon from '~/assets/icons/verdict-icon.svg';
import { VerdictFiltersIcon } from '~/components/Icons/VerdictFiltersIcon';
import { FilterIcon } from './FilterIcon';

import css from './styles.scss';
Expand Down Expand Up @@ -65,7 +65,7 @@ export const VerdictFilterDropdown = memo<Props>(
return (
<Popover {...popover.props} content={content}>
<FilterIcon
icon={<VerdictIcon />}
icon={<VerdictFiltersIcon />}
text={getLabel()}
onClick={popover.toggle}
className={classnames({
Expand Down
4 changes: 2 additions & 2 deletions src/components/TopBar/VisualFiltersDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import classnames from 'classnames';

import { usePopover } from '~/ui/hooks/usePopover';

import VisualIcon from '~/assets/icons/visual-icon.svg';
import { VisualFiltersIcon } from '~/components/Icons/VisualFiltersIcon';
import { FilterIcon } from './FilterIcon';

import css from './styles.scss';
Expand Down Expand Up @@ -90,7 +90,7 @@ export const VisualFiltersDropdown = memo<Props>(
return (
<Popover {...popover.props} content={content}>
<FilterIcon
icon={<VisualIcon />}
icon={<VisualFiltersIcon />}
text="Visual"
onClick={popover.toggle}
className={classnames({
Expand Down
4 changes: 2 additions & 2 deletions src/domain/flows/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ export class Flow {
this.l7?.type === L7FlowType.Request
? '->'
: this.l7?.type === L7FlowType.Response
? '<-'
: '??';
? '<-'
: '??';

// TODO: check if this is a correct fingerprints for all but http
return `${direction} ${l7helpers.getEndpointId(l7)}`;
Expand Down
178 changes: 96 additions & 82 deletions src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,91 +6,105 @@ export type Parameter<F, N> = N extends 0
? P
: never
: N extends 1
? F extends (a: any, b: infer P, ...args: any) => any
? P
: never
: N extends 2
? F extends (a: any, b: any, c: infer P, ...args: any) => any
? P
: never
: N extends 3
? F extends (a: any, b: any, c: any, d: infer P, ...args: any) => any
? P
: never
: N extends 4
? F extends (a: any, b: any, c: any, d: any, e: infer P, ...args: any) => any
? P
: never
: N extends 5
? F extends (
a: any,
b: any,
c: any,
d: any,
e: any,
f: infer P,
...args: any
) => any
? P
: never
: N extends 6
? F extends (
a: any,
b: any,
c: any,
d: any,
e: any,
f: any,
g: infer P,
...args: any
) => any
? P
: never
: never;
? F extends (a: any, b: infer P, ...args: any) => any
? P
: never
: N extends 2
? F extends (a: any, b: any, c: infer P, ...args: any) => any
? P
: never
: N extends 3
? F extends (a: any, b: any, c: any, d: infer P, ...args: any) => any
? P
: never
: N extends 4
? F extends (
a: any,
b: any,
c: any,
d: any,
e: infer P,
...args: any
) => any
? P
: never
: N extends 5
? F extends (
a: any,
b: any,
c: any,
d: any,
e: any,
f: infer P,
...args: any
) => any
? P
: never
: N extends 6
? F extends (
a: any,
b: any,
c: any,
d: any,
e: any,
f: any,
g: infer P,
...args: any
) => any
? P
: never
: never;

export type ParametersAfter<F, N> = N extends 0
? F extends (a: any, ...args: infer P) => any
? P
: never
: N extends 1
? F extends (a: any, b: any, ...args: infer P) => any
? P
: never
: N extends 2
? F extends (a: any, b: any, c: any, ...args: infer P) => any
? P
: never
: N extends 3
? F extends (a: any, b: any, c: any, d: any, ...args: infer P) => any
? P
: never
: N extends 4
? F extends (a: any, b: any, c: any, d: any, e: any, ...args: infer P) => any
? P
: never
: N extends 5
? F extends (
a: any,
b: any,
c: any,
d: any,
e: any,
f: any,
...args: infer P
) => any
? P
: never
: N extends 6
? F extends (
a: any,
b: any,
c: any,
d: any,
e: any,
f: any,
g: any,
...args: infer P
) => any
? P
: never
: never;
? F extends (a: any, b: any, ...args: infer P) => any
? P
: never
: N extends 2
? F extends (a: any, b: any, c: any, ...args: infer P) => any
? P
: never
: N extends 3
? F extends (a: any, b: any, c: any, d: any, ...args: infer P) => any
? P
: never
: N extends 4
? F extends (
a: any,
b: any,
c: any,
d: any,
e: any,
...args: infer P
) => any
? P
: never
: N extends 5
? F extends (
a: any,
b: any,
c: any,
d: any,
e: any,
f: any,
...args: infer P
) => any
? P
: never
: N extends 6
? F extends (
a: any,
b: any,
c: any,
d: any,
e: any,
f: any,
g: any,
...args: infer P
) => any
? P
: never
: never;