From 51776d26c283f7897085cb153fbfc78c3bd93159 Mon Sep 17 00:00:00 2001 From: Peter Pan Date: Thu, 26 Nov 2020 17:55:34 +0800 Subject: [PATCH] fix: fix typo (#856) --- frontend/packages/cli/index.ts | 16 ++++++++++++++++ frontend/packages/core/babel.config.js | 2 ++ frontend/packages/core/src/App.tsx | 2 ++ .../packages/core/src/components/Chart.tsx | 8 ++++---- .../core/src/components/ChartToolbox.tsx | 6 +++--- .../src/components/GraphPage/Argument.tsx | 6 +++--- .../GraphPage/NodeDocumentationSidebar.tsx | 2 ++ .../GraphPage/NodePropertiesSidebar.tsx | 6 +++--- .../src/components/GraphPage/Properties.tsx | 8 ++++---- .../src/components/GraphPage/Property.tsx | 6 +++--- .../src/components/GraphPage/Uploader.tsx | 16 ++++++++-------- .../HistogramPage/HistogramChart.tsx | 2 ++ .../packages/core/src/components/Input.tsx | 6 +++--- .../components/SamplePage/ImagePreviewer.tsx | 2 +- .../src/components/SamplePage/SampleChart.tsx | 2 +- .../src/components/SamplePage/StepSlider.tsx | 7 ++++--- .../core/src/components/StackChart.tsx | 2 ++ .../packages/core/src/hooks/useECharts.ts | 2 ++ frontend/packages/core/src/pages/graph.tsx | 4 ++-- .../packages/core/src/resource/graph/types.ts | 2 ++ frontend/packages/core/src/routes/index.ts | 16 ++++++++++++++++ .../packages/core/src/store/graph/actions.ts | 16 ++++++++++++++++ .../packages/core/src/store/graph/reducers.ts | 16 ++++++++++++++++ .../core/src/store/graph/selectors.ts | 16 ++++++++++++++++ .../packages/core/src/store/graph/types.ts | 16 ++++++++++++++++ frontend/packages/core/src/store/index.ts | 16 ++++++++++++++++ .../packages/core/src/store/runs/actions.ts | 16 ++++++++++++++++ .../packages/core/src/store/runs/reducers.ts | 16 ++++++++++++++++ .../packages/core/src/store/runs/selectors.ts | 16 ++++++++++++++++ .../packages/core/src/store/runs/types.ts | 16 ++++++++++++++++ .../packages/core/src/store/theme/actions.ts | 16 ++++++++++++++++ .../packages/core/src/store/theme/reducers.ts | 16 ++++++++++++++++ .../core/src/store/theme/selectors.ts | 16 ++++++++++++++++ .../packages/core/src/store/theme/types.ts | 16 ++++++++++++++++ frontend/packages/core/src/utils/audio.ts | 2 ++ .../packages/core/types/ResizeObserver.d.ts | 18 ++++++++++++++++++ frontend/packages/core/types/echarts.d.ts | 16 ++++++++++++++++ frontend/packages/core/types/global.d.ts | 16 ++++++++++++++++ frontend/packages/core/types/static.d.ts | 16 ++++++++++++++++ frontend/packages/demo/builder/audio.ts | 16 ++++++++++++++++ frontend/packages/demo/builder/common.ts | 16 ++++++++++++++++ frontend/packages/demo/builder/graph.ts | 16 ++++++++++++++++ .../packages/demo/builder/high-dimensional.ts | 16 ++++++++++++++++ frontend/packages/demo/builder/histogram.ts | 16 ++++++++++++++++ frontend/packages/demo/builder/image.ts | 16 ++++++++++++++++ frontend/packages/demo/builder/index.ts | 16 ++++++++++++++++ frontend/packages/demo/builder/io.ts | 16 ++++++++++++++++ frontend/packages/demo/builder/pr-curve.ts | 16 ++++++++++++++++ frontend/packages/demo/builder/scalar.ts | 16 ++++++++++++++++ frontend/packages/demo/builder/types.ts | 16 ++++++++++++++++ frontend/packages/demo/index.ts | 16 ++++++++++++++++ frontend/packages/mock/assets/image/8.jpeg | Bin 0 -> 1583 bytes frontend/packages/mock/data/audio/audio.ts | 16 ++++++++++++++++ frontend/packages/mock/data/audio/list.ts | 16 ++++++++++++++++ frontend/packages/mock/data/audio/tags.ts | 18 ++++++++++++++++++ frontend/packages/mock/data/components.ts | 16 ++++++++++++++++ .../packages/mock/data/embedding/embedding.ts | 16 ++++++++++++++++ frontend/packages/mock/data/embedding/tags.ts | 16 ++++++++++++++++ frontend/packages/mock/data/graph/graph.ts | 18 ++++++++++++++++++ frontend/packages/mock/data/histogram/list.ts | 16 ++++++++++++++++ frontend/packages/mock/data/histogram/tags.ts | 16 ++++++++++++++++ frontend/packages/mock/data/image/image.ts | 18 +++++++++++++++++- frontend/packages/mock/data/image/list.ts | 16 ++++++++++++++++ frontend/packages/mock/data/image/tags.ts | 18 ++++++++++++++++++ frontend/packages/mock/data/pr-curve/list.ts | 16 ++++++++++++++++ frontend/packages/mock/data/pr-curve/steps.ts | 16 ++++++++++++++++ frontend/packages/mock/data/pr-curve/tags.ts | 16 ++++++++++++++++ frontend/packages/mock/data/scalar/list.ts | 16 ++++++++++++++++ frontend/packages/mock/data/scalar/tags.ts | 16 ++++++++++++++++ frontend/packages/mock/index.ts | 16 ++++++++++++++++ frontend/packages/mock/middleware.ts | 16 ++++++++++++++++ frontend/packages/netron/src/index.js | 2 ++ frontend/packages/netron/src/view.js | 6 +++++- .../packages/server/ecosystem.config.d.ts | 18 ++++++++++++++++++ frontend/packages/server/global.d.ts | 16 ++++++++++++++++ frontend/packages/server/index.ts | 16 ++++++++++++++++ 76 files changed, 921 insertions(+), 40 deletions(-) create mode 100644 frontend/packages/mock/assets/image/8.jpeg diff --git a/frontend/packages/cli/index.ts b/frontend/packages/cli/index.ts index e34528e8..a6475a72 100755 --- a/frontend/packages/cli/index.ts +++ b/frontend/packages/cli/index.ts @@ -1,5 +1,21 @@ #!/usr/bin/env node +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable no-console */ diff --git a/frontend/packages/core/babel.config.js b/frontend/packages/core/babel.config.js index 500abba3..bfcac8d3 100644 --- a/frontend/packages/core/babel.config.js +++ b/frontend/packages/core/babel.config.js @@ -14,6 +14,8 @@ * limitations under the License. */ +// cSpell:words esmodules + module.exports = { extends: '@snowpack/app-scripts-react/babel.config.json', presets: [ diff --git a/frontend/packages/core/src/App.tsx b/frontend/packages/core/src/App.tsx index 9891a438..1685fd4b 100644 --- a/frontend/packages/core/src/App.tsx +++ b/frontend/packages/core/src/App.tsx @@ -14,6 +14,8 @@ * limitations under the License. */ +// cSpell:words pageview inited + import React, {FunctionComponent, Suspense, useCallback, useEffect, useMemo, useState} from 'react'; import {Redirect, Route, BrowserRouter as Router, Switch, useLocation} from 'react-router-dom'; import {THEME, matchMedia} from '~/utils/theme'; diff --git a/frontend/packages/core/src/components/Chart.tsx b/frontend/packages/core/src/components/Chart.tsx index ee1998ac..bfab2b74 100644 --- a/frontend/packages/core/src/components/Chart.tsx +++ b/frontend/packages/core/src/components/Chart.tsx @@ -45,7 +45,7 @@ type ChartProps = { const Chart: FunctionComponent = ({cid, width, height, className, children}) => { const [maximized, setMaximized] = useState(false); - const toggleMaximze = useCallback( + const toggleMaximize = useCallback( (id: symbol, value: boolean) => { if (id === cid) { setMaximized(value); @@ -54,11 +54,11 @@ const Chart: FunctionComponent = ({cid, width, height, [cid] ); useEffect(() => { - ee.on('toggle-chart-size', toggleMaximze); + ee.on('toggle-chart-size', toggleMaximize); return () => { - ee.off('toggle-chart-size', toggleMaximze); + ee.off('toggle-chart-size', toggleMaximize); }; - }, [toggleMaximze]); + }, [toggleMaximize]); return (
unknown; } & BaseChartToolboxItem; -export type ChartTooboxItem = NormalChartToolboxItem | ToggleChartToolboxItem; +export type ChartToolboxItem = NormalChartToolboxItem | ToggleChartToolboxItem; type ChartToolboxProps = { - items: ChartTooboxItem[]; + items: ChartToolboxItem[]; reversed?: boolean; tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right'; }; @@ -98,7 +98,7 @@ const ChartToolbox: FunctionComponent = ({ ); const getToolboxItem = useCallback( - (item: ChartTooboxItem, index: number) => ( + (item: ChartToolboxItem, index: number) => ( unknown; + showNodeDocumentation?: () => unknown; }; -const Argument: FunctionComponent = ({value, expand, showNodeDodumentation}) => { +const Argument: FunctionComponent = ({value, expand, showNodeDocumentation}) => { const [expanded, setExpanded] = useState(expand ?? false); const expandable = useMemo(() => { @@ -105,7 +105,7 @@ const Argument: FunctionComponent = ({value, expand, showNodeDodu )} {(value as PropertyType).documentation && ( - showNodeDodumentation?.()}> + showNodeDocumentation?.()}> )} diff --git a/frontend/packages/core/src/components/GraphPage/NodeDocumentationSidebar.tsx b/frontend/packages/core/src/components/GraphPage/NodeDocumentationSidebar.tsx index a9c86525..bf9a0ed1 100644 --- a/frontend/packages/core/src/components/GraphPage/NodeDocumentationSidebar.tsx +++ b/frontend/packages/core/src/components/GraphPage/NodeDocumentationSidebar.tsx @@ -14,6 +14,8 @@ * limitations under the License. */ +// cSpell:words strs + import React, {FunctionComponent, useCallback} from 'react'; import {Trans, useTranslation} from 'react-i18next'; import {borderRadius, em, transitionProps} from '~/utils/style'; diff --git a/frontend/packages/core/src/components/GraphPage/NodePropertiesSidebar.tsx b/frontend/packages/core/src/components/GraphPage/NodePropertiesSidebar.tsx index ac7cd129..930b9125 100644 --- a/frontend/packages/core/src/components/GraphPage/NodePropertiesSidebar.tsx +++ b/frontend/packages/core/src/components/GraphPage/NodePropertiesSidebar.tsx @@ -24,19 +24,19 @@ import {useTranslation} from 'react-i18next'; type NodePropertiesSidebarProps = { data?: PropertiesType | null; onClose?: () => unknown; - showNodeDodumentation?: () => unknown; + showNodeDocumentation?: () => unknown; }; const NodePropertiesSidebar: FunctionComponent = ({ data, onClose, - showNodeDodumentation + showNodeDocumentation }) => { const {t} = useTranslation('graph'); return ( - + ); }; diff --git a/frontend/packages/core/src/components/GraphPage/Properties.tsx b/frontend/packages/core/src/components/GraphPage/Properties.tsx index ac719bdf..da9b3de6 100644 --- a/frontend/packages/core/src/components/GraphPage/Properties.tsx +++ b/frontend/packages/core/src/components/GraphPage/Properties.tsx @@ -30,10 +30,10 @@ const Header = styled.div` type PropertiesProps = PropertiesType & { expand?: boolean; - showNodeDodumentation?: () => unknown; + showNodeDocumentation?: () => unknown; }; -const Properties: FunctionComponent = ({properties, groups, expand, showNodeDodumentation}) => { +const Properties: FunctionComponent = ({properties, groups, expand, showNodeDocumentation}) => { const {t} = useTranslation('graph'); return ( @@ -43,7 +43,7 @@ const Properties: FunctionComponent = ({properties, groups, exp name={t(`graph:properties.${property.name}`)} values={property.values} key={index} - showNodeDodumentation={showNodeDodumentation} + showNodeDocumentation={showNodeDocumentation} /> ))} {groups?.map((group, index) => ( @@ -54,7 +54,7 @@ const Properties: FunctionComponent = ({properties, groups, exp {...property} key={anotherIndex} expand={expand} - showNodeDodumentation={showNodeDodumentation} + showNodeDocumentation={showNodeDocumentation} /> ))} diff --git a/frontend/packages/core/src/components/GraphPage/Property.tsx b/frontend/packages/core/src/components/GraphPage/Property.tsx index 00648d26..cdbffb57 100644 --- a/frontend/packages/core/src/components/GraphPage/Property.tsx +++ b/frontend/packages/core/src/components/GraphPage/Property.tsx @@ -49,10 +49,10 @@ const Wrapper = styled.div` type PropertyProps = NameValues & { expand?: boolean; - showNodeDodumentation?: () => unknown; + showNodeDocumentation?: () => unknown; }; -const Property: FunctionComponent = ({name, values, expand, showNodeDodumentation}) => { +const Property: FunctionComponent = ({name, values, expand, showNodeDocumentation}) => { return (
{values.map((value, index) => ( - + ))}
diff --git a/frontend/packages/core/src/components/GraphPage/Uploader.tsx b/frontend/packages/core/src/components/GraphPage/Uploader.tsx index 27986a6d..b82445da 100644 --- a/frontend/packages/core/src/components/GraphPage/Uploader.tsx +++ b/frontend/packages/core/src/components/GraphPage/Uploader.tsx @@ -22,16 +22,16 @@ import Icon from '~/components/Icon'; import styled from 'styled-components'; import {useTranslation} from 'react-i18next'; -const DropZone = styled.div<{actived: boolean}>` +const DropZone = styled.div<{active: boolean}>` ${props => sameBorder({ width: '1px', type: 'dashed', radius: em(16), - color: props.actived ? 'var(--primary-color)' : undefined + color: props.active ? 'var(--primary-color)' : undefined })} background-color: ${props => - props.actived ? 'var(--graph-uploader-active-background-color)' : 'var(--graph-uploader-background-color)'}; + props.active ? 'var(--graph-uploader-active-background-color)' : 'var(--graph-uploader-background-color)'}; ${size('43.2%', '68%')} display: flex; flex-direction: column; @@ -82,12 +82,12 @@ type UploaderProps = { const Uploader: FunctionComponent = ({onClickUpload, onDropFiles}) => { const {t} = useTranslation('graph'); - const [actived, setActived] = useState(false); + const [active, setActive] = useState(false); const onClick = useCallback(() => onClickUpload?.(), [onClickUpload]); const onDrop = useCallback( (e: React.DragEvent) => { e.preventDefault(); - setActived(false); + setActive(false); if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length) { onDropFiles?.(e.dataTransfer.files); } @@ -99,16 +99,16 @@ const Uploader: FunctionComponent = ({onClickUpload, onDropFiles} if (e.currentTarget.contains(e.relatedTarget as Node | null)) { return; } - setActived(false); + setActive(false); }, []); return ( <> e.preventDefault()} - onDragEnter={() => setActived(true)} + onDragEnter={() => setActive(true)} onDragLeave={onDragLeave} > diff --git a/frontend/packages/core/src/components/HistogramPage/HistogramChart.tsx b/frontend/packages/core/src/components/HistogramPage/HistogramChart.tsx index 5f437157..59eeaef3 100644 --- a/frontend/packages/core/src/components/HistogramPage/HistogramChart.tsx +++ b/frontend/packages/core/src/components/HistogramPage/HistogramChart.tsx @@ -14,6 +14,8 @@ * limitations under the License. */ +// cSpell:words npts + import type {EChartOption, ECharts, EChartsConvertFinder} from 'echarts'; import type {HistogramData, OffsetData, OverlayData, OverlayDataItem} from '~/resource/histogram'; import LineChart, {LineChartRef} from '~/components/LineChart'; diff --git a/frontend/packages/core/src/components/Input.tsx b/frontend/packages/core/src/components/Input.tsx index 20c2d5ac..8385e20a 100644 --- a/frontend/packages/core/src/components/Input.tsx +++ b/frontend/packages/core/src/components/Input.tsx @@ -45,14 +45,14 @@ const StyledInput = styled.input<{rounded?: boolean}>` } `; -type CustomeInputProps = { +type CustomInputProps = { rounded?: boolean; value?: string; onChange?: (value: string) => unknown; }; -export type InputProps = Omit, keyof CustomeInputProps | 'type' | 'className'> & - CustomeInputProps; +export type InputProps = Omit, keyof CustomInputProps | 'type' | 'className'> & + CustomInputProps; const Input = React.forwardRef( ({rounded, value, onChange, className, ...props}, ref) => ( diff --git a/frontend/packages/core/src/components/SamplePage/ImagePreviewer.tsx b/frontend/packages/core/src/components/SamplePage/ImagePreviewer.tsx index bcbb19f5..ee529f6e 100644 --- a/frontend/packages/core/src/components/SamplePage/ImagePreviewer.tsx +++ b/frontend/packages/core/src/components/SamplePage/ImagePreviewer.tsx @@ -61,7 +61,7 @@ const Header = styled.div` font-size: ${em(10)}; > a { - display: inline-blcok; + display: inline-block; line-height: 1; height: ${em(14)}; diff --git a/frontend/packages/core/src/components/SamplePage/SampleChart.tsx b/frontend/packages/core/src/components/SamplePage/SampleChart.tsx index 5ae1363d..6f613a9a 100644 --- a/frontend/packages/core/src/components/SamplePage/SampleChart.tsx +++ b/frontend/packages/core/src/components/SamplePage/SampleChart.tsx @@ -301,7 +301,7 @@ const SampleChart: FunctionComponent = ({ return null; }, [viewed, loading, error, data, step, entityProps, t, content]); - const Previewer = useMemo(() => { + const Previewer = useMemo(() => { if (!previewer) { return null; } diff --git a/frontend/packages/core/src/components/SamplePage/StepSlider.tsx b/frontend/packages/core/src/components/SamplePage/StepSlider.tsx index 3eadba2e..d622142a 100644 --- a/frontend/packages/core/src/components/SamplePage/StepSlider.tsx +++ b/frontend/packages/core/src/components/SamplePage/StepSlider.tsx @@ -47,7 +47,8 @@ const Label = styled.div` font-size: ${em(10)}; > a { - display: inline-blcok; + display: inline-block; + cursor: pointer; line-height: 1; height: ${em(14)}; @@ -112,10 +113,10 @@ const StepSlider: FunctionComponent = ({onChange, onChangeCompl
{`${t('sample:step')}: ${steps[step] ?? '...'}`}
diff --git a/frontend/packages/core/src/components/StackChart.tsx b/frontend/packages/core/src/components/StackChart.tsx index 9675a909..f858e22c 100644 --- a/frontend/packages/core/src/components/StackChart.tsx +++ b/frontend/packages/core/src/components/StackChart.tsx @@ -14,6 +14,8 @@ * limitations under the License. */ +// cSpell:words coord zlevel + import * as chart from '~/utils/chart'; import type {EChartOption, ECharts, EChartsConvertFinder} from 'echarts'; diff --git a/frontend/packages/core/src/hooks/useECharts.ts b/frontend/packages/core/src/hooks/useECharts.ts index a0fe7d70..ef228e23 100644 --- a/frontend/packages/core/src/hooks/useECharts.ts +++ b/frontend/packages/core/src/hooks/useECharts.ts @@ -14,6 +14,8 @@ * limitations under the License. */ +// cSpell:words zlevel + import {MutableRefObject, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react'; import {position, primaryColor, size} from '~/utils/style'; diff --git a/frontend/packages/core/src/pages/graph.tsx b/frontend/packages/core/src/pages/graph.tsx index c4e2f23a..7efdd1e3 100644 --- a/frontend/packages/core/src/pages/graph.tsx +++ b/frontend/packages/core/src/pages/graph.tsx @@ -115,7 +115,7 @@ const Graph: FunctionComponent = () => { useEffect(() => { if (data?.data.size) { - setFiles([new File([data.data], data.filename || 'unknwon_model')]); + setFiles([new File([data.data], data.filename || 'unknown_model')]); } }, [data]); @@ -185,7 +185,7 @@ const Graph: FunctionComponent = () => { setNodeData(null)} - showNodeDodumentation={() => graph.current?.showNodeDocumentation(nodeData)} + showNodeDocumentation={() => graph.current?.showNodeDocumentation(nodeData)} /> ); diff --git a/frontend/packages/core/src/resource/graph/types.ts b/frontend/packages/core/src/resource/graph/types.ts index fd9bfaee..94efd8c5 100644 --- a/frontend/packages/core/src/resource/graph/types.ts +++ b/frontend/packages/core/src/resource/graph/types.ts @@ -14,6 +14,8 @@ * limitations under the License. */ +// cSpell:words strs + export type Property = { name?: string; value: string; diff --git a/frontend/packages/core/src/routes/index.ts b/frontend/packages/core/src/routes/index.ts index 9113405d..a4b5c3f2 100644 --- a/frontend/packages/core/src/routes/index.ts +++ b/frontend/packages/core/src/routes/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import React, {FunctionComponent, LazyExoticComponent} from 'react'; export enum Pages { diff --git a/frontend/packages/core/src/store/graph/actions.ts b/frontend/packages/core/src/store/graph/actions.ts index e48ec4a0..1c52c895 100644 --- a/frontend/packages/core/src/store/graph/actions.ts +++ b/frontend/packages/core/src/store/graph/actions.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {ActionTypes} from './types'; import type {Model} from './types'; diff --git a/frontend/packages/core/src/store/graph/reducers.ts b/frontend/packages/core/src/store/graph/reducers.ts index 215d2d67..1c9d0f79 100644 --- a/frontend/packages/core/src/store/graph/reducers.ts +++ b/frontend/packages/core/src/store/graph/reducers.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {GraphActionTypes, GraphState} from './types'; import {ActionTypes} from './types'; diff --git a/frontend/packages/core/src/store/graph/selectors.ts b/frontend/packages/core/src/store/graph/selectors.ts index ce48d420..98b113b1 100644 --- a/frontend/packages/core/src/store/graph/selectors.ts +++ b/frontend/packages/core/src/store/graph/selectors.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {RootState} from '../index'; export const model = (state: RootState) => state.graph.model; diff --git a/frontend/packages/core/src/store/graph/types.ts b/frontend/packages/core/src/store/graph/types.ts index 006281ce..52b2801b 100644 --- a/frontend/packages/core/src/store/graph/types.ts +++ b/frontend/packages/core/src/store/graph/types.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export type Model = FileList | File[] | null; export enum ActionTypes { diff --git a/frontend/packages/core/src/store/index.ts b/frontend/packages/core/src/store/index.ts index 2d7440bb..ff176b42 100644 --- a/frontend/packages/core/src/store/index.ts +++ b/frontend/packages/core/src/store/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import * as graphActions from './graph/actions'; import * as graphSelectors from './graph/selectors'; import * as runsActions from './runs/actions'; diff --git a/frontend/packages/core/src/store/runs/actions.ts b/frontend/packages/core/src/store/runs/actions.ts index e80d8920..278ba5e1 100644 --- a/frontend/packages/core/src/store/runs/actions.ts +++ b/frontend/packages/core/src/store/runs/actions.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Page, Runs} from './types'; import {ActionTypes} from './types'; diff --git a/frontend/packages/core/src/store/runs/reducers.ts b/frontend/packages/core/src/store/runs/reducers.ts index 02c52a89..a8ac1789 100644 --- a/frontend/packages/core/src/store/runs/reducers.ts +++ b/frontend/packages/core/src/store/runs/reducers.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {RunsActionTypes, RunsState} from './types'; import {ActionTypes} from './types'; diff --git a/frontend/packages/core/src/store/runs/selectors.ts b/frontend/packages/core/src/store/runs/selectors.ts index 1a27219e..e9510312 100644 --- a/frontend/packages/core/src/store/runs/selectors.ts +++ b/frontend/packages/core/src/store/runs/selectors.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Page} from './types'; import type {RootState} from '../index'; diff --git a/frontend/packages/core/src/store/runs/types.ts b/frontend/packages/core/src/store/runs/types.ts index ae24045b..bff16a95 100644 --- a/frontend/packages/core/src/store/runs/types.ts +++ b/frontend/packages/core/src/store/runs/types.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export type Runs = string[]; export enum ActionTypes { diff --git a/frontend/packages/core/src/store/theme/actions.ts b/frontend/packages/core/src/store/theme/actions.ts index a1537dd9..35696886 100644 --- a/frontend/packages/core/src/store/theme/actions.ts +++ b/frontend/packages/core/src/store/theme/actions.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {ActionTypes} from './types'; import type {Theme} from './types'; diff --git a/frontend/packages/core/src/store/theme/reducers.ts b/frontend/packages/core/src/store/theme/reducers.ts index 290e9dd2..35b644c8 100644 --- a/frontend/packages/core/src/store/theme/reducers.ts +++ b/frontend/packages/core/src/store/theme/reducers.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {THEME, autoTheme} from '~/utils/theme'; import type {ThemeActionTypes, ThemeState} from './types'; diff --git a/frontend/packages/core/src/store/theme/selectors.ts b/frontend/packages/core/src/store/theme/selectors.ts index e4eca40d..95191d02 100644 --- a/frontend/packages/core/src/store/theme/selectors.ts +++ b/frontend/packages/core/src/store/theme/selectors.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {RootState} from '../index'; export const theme = (state: RootState) => state.theme.theme; diff --git a/frontend/packages/core/src/store/theme/types.ts b/frontend/packages/core/src/store/theme/types.ts index 7f81881b..3decc3bb 100644 --- a/frontend/packages/core/src/store/theme/types.ts +++ b/frontend/packages/core/src/store/theme/types.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Theme} from '~/utils/theme'; export type {Theme} from '~/utils/theme'; diff --git a/frontend/packages/core/src/utils/audio.ts b/frontend/packages/core/src/utils/audio.ts index 259b2dae..40aa7c20 100644 --- a/frontend/packages/core/src/utils/audio.ts +++ b/frontend/packages/core/src/utils/audio.ts @@ -14,6 +14,8 @@ * limitations under the License. */ +// cSpell:words mpga + interface AudioPlayerOptions { context?: AudioContext; volume?: number; diff --git a/frontend/packages/core/types/ResizeObserver.d.ts b/frontend/packages/core/types/ResizeObserver.d.ts index 2399bba5..09f9fb15 100644 --- a/frontend/packages/core/types/ResizeObserver.d.ts +++ b/frontend/packages/core/types/ResizeObserver.d.ts @@ -1,3 +1,21 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// cSpell:words unobserves + /** * The **ResizeObserver** interface reports changes to the dimensions of an * [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)'s content diff --git a/frontend/packages/core/types/echarts.d.ts b/frontend/packages/core/types/echarts.d.ts index 03a1cc6e..4e441fcc 100644 --- a/frontend/packages/core/types/echarts.d.ts +++ b/frontend/packages/core/types/echarts.d.ts @@ -1 +1,17 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + declare module 'echarts-gl'; diff --git a/frontend/packages/core/types/global.d.ts b/frontend/packages/core/types/global.d.ts index 5281f474..56955d40 100644 --- a/frontend/packages/core/types/global.d.ts +++ b/frontend/packages/core/types/global.d.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + declare global { interface Window { webkitAudioContext: AudioContext; diff --git a/frontend/packages/core/types/static.d.ts b/frontend/packages/core/types/static.d.ts index fccc9a9d..1f883c73 100644 --- a/frontend/packages/core/types/static.d.ts +++ b/frontend/packages/core/types/static.d.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /* Use this file to declare any custom file extensions for importing */ /* Use this folder to also add/extend a package d.ts file, if needed. */ diff --git a/frontend/packages/demo/builder/audio.ts b/frontend/packages/demo/builder/audio.ts index 6665ce61..e48e0e4b 100644 --- a/frontend/packages/demo/builder/audio.ts +++ b/frontend/packages/demo/builder/audio.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Data, Worker} from './types'; interface Audio { diff --git a/frontend/packages/demo/builder/common.ts b/frontend/packages/demo/builder/common.ts index 550c65d7..f6f95783 100644 --- a/frontend/packages/demo/builder/common.ts +++ b/frontend/packages/demo/builder/common.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Worker} from './types'; const worker: Worker = async io => { diff --git a/frontend/packages/demo/builder/graph.ts b/frontend/packages/demo/builder/graph.ts index fbbfc264..9eb0e292 100644 --- a/frontend/packages/demo/builder/graph.ts +++ b/frontend/packages/demo/builder/graph.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Worker} from './types'; const worker: Worker = async io => { diff --git a/frontend/packages/demo/builder/high-dimensional.ts b/frontend/packages/demo/builder/high-dimensional.ts index 9cee830a..91767a57 100644 --- a/frontend/packages/demo/builder/high-dimensional.ts +++ b/frontend/packages/demo/builder/high-dimensional.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Worker} from './types'; const worker: Worker = async io => { diff --git a/frontend/packages/demo/builder/histogram.ts b/frontend/packages/demo/builder/histogram.ts index ba6875f9..90456fbd 100644 --- a/frontend/packages/demo/builder/histogram.ts +++ b/frontend/packages/demo/builder/histogram.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Data, Worker} from './types'; const worker: Worker = async io => { diff --git a/frontend/packages/demo/builder/image.ts b/frontend/packages/demo/builder/image.ts index 0dd0fcb1..dcf03c0f 100644 --- a/frontend/packages/demo/builder/image.ts +++ b/frontend/packages/demo/builder/image.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Data, Worker} from './types'; interface Image { diff --git a/frontend/packages/demo/builder/index.ts b/frontend/packages/demo/builder/index.ts index e3acea49..42731ba5 100644 --- a/frontend/packages/demo/builder/index.ts +++ b/frontend/packages/demo/builder/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /* eslint-disable no-console */ import IO from './io'; diff --git a/frontend/packages/demo/builder/io.ts b/frontend/packages/demo/builder/io.ts index 75d48734..13cc54a0 100644 --- a/frontend/packages/demo/builder/io.ts +++ b/frontend/packages/demo/builder/io.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /* eslint-disable no-console */ import crypto, {BinaryLike} from 'crypto'; diff --git a/frontend/packages/demo/builder/pr-curve.ts b/frontend/packages/demo/builder/pr-curve.ts index 4663e180..1ac77d9e 100644 --- a/frontend/packages/demo/builder/pr-curve.ts +++ b/frontend/packages/demo/builder/pr-curve.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Data, Worker} from './types'; const worker: Worker = async io => { diff --git a/frontend/packages/demo/builder/scalar.ts b/frontend/packages/demo/builder/scalar.ts index 118a10cc..4ab584db 100644 --- a/frontend/packages/demo/builder/scalar.ts +++ b/frontend/packages/demo/builder/scalar.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Data, Worker} from './types'; const worker: Worker = async io => { diff --git a/frontend/packages/demo/builder/types.ts b/frontend/packages/demo/builder/types.ts index 360b533e..529bf092 100644 --- a/frontend/packages/demo/builder/types.ts +++ b/frontend/packages/demo/builder/types.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type IO from './io'; export type Worker = (io: IO) => Promise; diff --git a/frontend/packages/demo/index.ts b/frontend/packages/demo/index.ts index da4eeb49..21f635d9 100644 --- a/frontend/packages/demo/index.ts +++ b/frontend/packages/demo/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {Request, Response} from 'express'; import IO from './builder/io'; diff --git a/frontend/packages/mock/assets/image/8.jpeg b/frontend/packages/mock/assets/image/8.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..da1615aa19a35c7b0aa3bcc5721da95498a13785 GIT binary patch literal 1583 zcmex=kR1VRQz zDF#+Bn}NZLQ5wz;V$^`DVPart&tzbMs)+*9AOJKOq#H^zFJMHNxPS?++F=1Rf(_F4 z|1E<>Kt_H^esM;Afr7D~0fU8;r!Nc0bRYn;Rl!VwE3!Q|`x!Q|ylmi{@#cq9-Twm& zf*cGE3=YhUN(@YbjLd?J|Bo=p16{$&2nJwnK!TBpnT3^&or9B$8>nEb00R>vGcywl zGb<~|8pc|nJOhg$tB|6hBb#twBD+$dh*9Ijg&fLG8xM*GUHqV8oK)1r$t5N(At|M* zrmmr>WnyY(ZeeNV?BeR??&0Yb91<+v*#~fzWVs-^OvvRzW@073*;|gctX4dBq2US^OqpdUra14%q;96e=#zZgFG(C z!m4P(ZXWYowZ;xuvL#)F*7#z7xMlZq~KiK&=8RQ(9@8rWyVd8~;npTRwb z@YihyX9gZ%#Bj3naB*_+^6>Bp$_fh#2nZ@mN{h;Bsp@EJs%mKHnK)VK8QL3ZXju7K z*}J%Vd3))a2ZjfFggJS7x&H?m!pOtRE66XXBrL4tZlGb{PBQp^7nm$r{@-HYVP*s- zCT2kfdxo!G8Y|YNe#*V)vqH<_?qw761l6;OrSW?X)cO_~Z`;#zJuu7PCc5p1oT|^d z${P+RY>#=q?610H7C3o2>-p6(*JXWz`VXzkm$Eq6NT~+nQ@7J8)^8YV;zEitm-8C)Jgu;l+sQ6^C1(Hh zy!S7*o{u_~$}nBoW?pu;xLvgJa(o@~zFGB2~&B$7g%r*e-lKis$Ajx9Ax&J?L=JgzD>>)g0S)PrH|LS7hgdFA85p5BIb_T6*KvVcVGMSqpzG)sOJ3 zEnLpKJyZ4Ug5TQ>*F6h-snl2h!1?3R=+6*dsyN>L*~)o-@eBdf4a3~LbUweVx_lfavjU(ANlxo&8?hEhTesjJ)db$ zJaKnx?Z<C&BhyEwuHj`p!Tu$G=OTfw}wYKBzJ#-evckDiw; zzVZLkSFhzOBiyUmu03qOoA0&Ll{d!B;^ws1{*!Y~-H?^73ay;(zsGvrnz!k8>xCxA z?wRPW_3(5zxKMMLvUpU_ zYy~&2s+}*RKfDMNl<8=+`&wr)NpYJgm+gu+HuF7q4@E5h7TUEdZN6*|WB4@t%Dq`{ d6;( { diff --git a/frontend/packages/mock/data/embedding/tags.ts b/frontend/packages/mock/data/embedding/tags.ts index a439d1ad..e79e9fe2 100644 --- a/frontend/packages/mock/data/embedding/tags.ts +++ b/frontend/packages/mock/data/embedding/tags.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default { runs: ['train', 'test'], tags: [ diff --git a/frontend/packages/mock/data/graph/graph.ts b/frontend/packages/mock/data/graph/graph.ts index d1f6f9a8..9b92e264 100644 --- a/frontend/packages/mock/data/graph/graph.ts +++ b/frontend/packages/mock/data/graph/graph.ts @@ -1,3 +1,21 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// cSpell:disable + import {Request, Response} from 'express'; import fetch from 'isomorphic-unfetch'; diff --git a/frontend/packages/mock/data/histogram/list.ts b/frontend/packages/mock/data/histogram/list.ts index adbabff8..2954ea69 100644 --- a/frontend/packages/mock/data/histogram/list.ts +++ b/frontend/packages/mock/data/histogram/list.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default [ [ 1515224840945.252, diff --git a/frontend/packages/mock/data/histogram/tags.ts b/frontend/packages/mock/data/histogram/tags.ts index 8645d5ed..54538f02 100644 --- a/frontend/packages/mock/data/histogram/tags.ts +++ b/frontend/packages/mock/data/histogram/tags.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default { runs: ['train', 'test'], tags: [ diff --git a/frontend/packages/mock/data/image/image.ts b/frontend/packages/mock/data/image/image.ts index b77837c8..9ef121a6 100644 --- a/frontend/packages/mock/data/image/image.ts +++ b/frontend/packages/mock/data/image/image.ts @@ -1,10 +1,26 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {Request, Response} from 'express'; import fs from 'fs/promises'; import mime from 'mime-types'; import path from 'path'; -const images = ['1.jpeg', '2.jpeg', '3.jpeg', '4.jpeg', '5.gif', '6.gif', '7.gif']; +const images = ['1.jpeg', '2.jpeg', '3.jpeg', '4.jpeg', '5.gif', '6.gif', '7.gif', '8.jpeg']; export default async (req: Request, res: Response) => { const index = (+req.query.index ?? 0) % images.length; diff --git a/frontend/packages/mock/data/image/list.ts b/frontend/packages/mock/data/image/list.ts index e521a586..5e12bd2b 100644 --- a/frontend/packages/mock/data/image/list.ts +++ b/frontend/packages/mock/data/image/list.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default [ { wallTime: 1512549785061.623, diff --git a/frontend/packages/mock/data/image/tags.ts b/frontend/packages/mock/data/image/tags.ts index eb149ac5..ac792039 100644 --- a/frontend/packages/mock/data/image/tags.ts +++ b/frontend/packages/mock/data/image/tags.ts @@ -1,3 +1,21 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// cSpell:disable + export default { runs: ['train', 'test'], tags: [ diff --git a/frontend/packages/mock/data/pr-curve/list.ts b/frontend/packages/mock/data/pr-curve/list.ts index 3ddb98d8..e8955006 100644 --- a/frontend/packages/mock/data/pr-curve/list.ts +++ b/frontend/packages/mock/data/pr-curve/list.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {Request} from 'express'; export default (request: Request) => { diff --git a/frontend/packages/mock/data/pr-curve/steps.ts b/frontend/packages/mock/data/pr-curve/steps.ts index e5632b6a..2c324d6b 100644 --- a/frontend/packages/mock/data/pr-curve/steps.ts +++ b/frontend/packages/mock/data/pr-curve/steps.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {Request} from 'express'; export default (request: Request) => { diff --git a/frontend/packages/mock/data/pr-curve/tags.ts b/frontend/packages/mock/data/pr-curve/tags.ts index a439d1ad..e79e9fe2 100644 --- a/frontend/packages/mock/data/pr-curve/tags.ts +++ b/frontend/packages/mock/data/pr-curve/tags.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default { runs: ['train', 'test'], tags: [ diff --git a/frontend/packages/mock/data/scalar/list.ts b/frontend/packages/mock/data/scalar/list.ts index 39f10ccc..50a34e50 100644 --- a/frontend/packages/mock/data/scalar/list.ts +++ b/frontend/packages/mock/data/scalar/list.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {Request} from 'express'; export default (request: Request) => { diff --git a/frontend/packages/mock/data/scalar/tags.ts b/frontend/packages/mock/data/scalar/tags.ts index a439d1ad..e79e9fe2 100644 --- a/frontend/packages/mock/data/scalar/tags.ts +++ b/frontend/packages/mock/data/scalar/tags.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default { runs: ['train', 'test'], tags: [ diff --git a/frontend/packages/mock/index.ts b/frontend/packages/mock/index.ts index dc8d3ad8..09b65f36 100644 --- a/frontend/packages/mock/index.ts +++ b/frontend/packages/mock/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /* eslint-disable no-console */ import express from 'express'; diff --git a/frontend/packages/mock/middleware.ts b/frontend/packages/mock/middleware.ts index f9fd9e34..38641900 100644 --- a/frontend/packages/mock/middleware.ts +++ b/frontend/packages/mock/middleware.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {Request, Response} from 'express'; import faker from 'faker'; diff --git a/frontend/packages/netron/src/index.js b/frontend/packages/netron/src/index.js index 278060a0..64ca6850 100644 --- a/frontend/packages/netron/src/index.js +++ b/frontend/packages/netron/src/index.js @@ -14,6 +14,8 @@ * limitations under the License. */ +// cSpell:words actived nextcode + const view = require('./view'); const host = {}; diff --git a/frontend/packages/netron/src/view.js b/frontend/packages/netron/src/view.js index 6505068f..7ad3c509 100644 --- a/frontend/packages/netron/src/view.js +++ b/frontend/packages/netron/src/view.js @@ -14,6 +14,8 @@ * limitations under the License. */ +// cSpell:words grapher selectall nodesep ranksep rankdir pbtxt + const zip = require('netron/src/zip'); const gzip = require('netron/src/gzip'); const tar = require('netron/src/tar'); @@ -1337,7 +1339,7 @@ view.ModelFactoryService = class { _filter(context) { const identifier = context.identifier.toLowerCase(); - const list = this._extensions.filter(entry => identifier.endsWith(entry.extension)).map(extry => extry.id); + const list = this._extensions.filter(entry => identifier.endsWith(entry.extension)).map(entry => entry.id); return Array.from(new Set(list)); } @@ -1347,6 +1349,7 @@ view.ModelFactoryService = class { return Promise.reject(new ModelError('File has no content.', true)); } const list = [ + // cSpell:disable {name: 'ELF executable', value: /^\x7FELF/}, {name: 'Git LFS header', value: /^version https:\/\/git-lfs.github.com\/spec\/v1\n/}, {name: 'Git LFS header', value: /^oid sha256:/}, @@ -1358,6 +1361,7 @@ view.ModelFactoryService = class { {name: 'StringIntLabelMapProto data', value: /^item\s*{\r?\n\s*id:/}, {name: 'StringIntLabelMapProto data', value: /^item\s*{\r?\n\s*name:/}, {name: 'Python source code', value: /^\s*import sys, types, os;/} + // cSpell:enable ]; const text = new TextDecoder().decode(buffer.subarray(0, Math.min(1024, buffer.length))); for (const item of list) { diff --git a/frontend/packages/server/ecosystem.config.d.ts b/frontend/packages/server/ecosystem.config.d.ts index 2421a133..4c8eb09f 100644 --- a/frontend/packages/server/ecosystem.config.d.ts +++ b/frontend/packages/server/ecosystem.config.d.ts @@ -1,3 +1,21 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// cSpell:words autorestart + declare type App = { name: string; script: string; diff --git a/frontend/packages/server/global.d.ts b/frontend/packages/server/global.d.ts index 1f082efa..55892e60 100644 --- a/frontend/packages/server/global.d.ts +++ b/frontend/packages/server/global.d.ts @@ -1 +1,17 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + declare module '@visualdl/core/builder/environment'; diff --git a/frontend/packages/server/index.ts b/frontend/packages/server/index.ts index 88b19491..76f6caab 100644 --- a/frontend/packages/server/index.ts +++ b/frontend/packages/server/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Baidu Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /* eslint-disable no-console */ import {config} from 'dotenv'; -- GitLab