diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d98bad3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: Build + +on: + pull_request: + push: + branches: + - master + +jobs: + continuous-integration: + runs-on: ubuntu-latest + name: continuous-integration/github + steps: + - name: checkout + uses: actions/checkout@a14471d83 + - name: build + run: "./build.sh" + env: + MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index ae7b6e4..cbe7fa6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM microsoft/dotnet:2.2.102-sdk-stretch as version +FROM mcr.microsoft.com/dotnet/core/sdk:2.2.401-stretch as version WORKDIR /src COPY .git ./ -RUN dotnet tool install -g minver-cli --version 1.0.0-beta.2 && \ +RUN dotnet tool install -g minver-cli --version 1.0.0 && \ /root/.dotnet/tools/minver > .version FROM node:10.12.0-alpine AS build @@ -33,4 +33,4 @@ RUN \ echo "@sqlstreamstore:registry=https://www.myget.org/F/sqlstreamstore/npm/" >> .npmrc && \ yarn publish --new-version $(cat .version) --no-git-tag-version ;\ else echo "No API key found, skipping publishing..." ;\ - fi \ No newline at end of file + fi diff --git a/package.json b/package.json index 589225c..3c58202 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "format": "prettier --write \"src/**/*.js\" \"src/**/*.ts\" \"src/**/*.tsx\" && tslint --project ./ --fix", "lint": "prettier --list-different \"src/**/*.js\" \"src/**/*.ts\" \"src/**/*.tsx\" && tslint --project ./" }, + "homepage": ".", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ @@ -63,7 +64,6 @@ "react-remarkable": "1.1.3", "react-schema-form": "0.6.2", "rxjs": "5.4.3", - "uri-js": "4.2.2", "uri-template": "1.0.1", "uuid": "3.3.2" }, diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..ea3cf71 Binary files /dev/null and b/public/favicon.ico differ diff --git a/src/SqlStreamStoreBrowser.tsx b/src/SqlStreamStoreBrowser.tsx index 50493ac..c96fd63 100644 --- a/src/SqlStreamStoreBrowser.tsx +++ b/src/SqlStreamStoreBrowser.tsx @@ -33,7 +33,7 @@ const getSelfAlias = (links: HalLinks) => .flatMap(rel => links[rel]) .filter(({ rel }) => rel && rel.indexOf('streamStore:') === 0) .filter( - ({ rel, href }) => + ({ href }) => !!links.self.filter(link => link.href === href).length, ) .map(({ rel }) => rel); @@ -58,7 +58,7 @@ const state$ = createState( store.hal$.links$.map(links => ['_links', () => links]), store.hal$.forms$.map(forms => ['forms', () => forms]), store.hal$.loading$.map(loading => ['loading', () => loading]), - store.hal$.mediaType$.map(mediaType => ['mediaType', () => mediaType]), + store.mediaType$.map(mediaType => ['mediaType', () => mediaType]), themes.theme$.map(theme => ['theme', () => theme]), ), obs.of({ diff --git a/src/components/AuthorizationProvider.tsx b/src/components/AuthorizationProvider.tsx index b91f950..fe7866d 100644 --- a/src/components/AuthorizationProvider.tsx +++ b/src/components/AuthorizationProvider.tsx @@ -1,4 +1,4 @@ -import React, { ComponentType, ReactNode, StatelessComponent } from 'react'; +import React, { ComponentType, FunctionComponent, ReactNode } from 'react'; import { AuthorizationProps } from 'types'; import getDisplayName from './getDisplayName'; @@ -6,7 +6,7 @@ const { Consumer, Provider } = React.createContext( undefined, ); -const AuthorizationProvider: StatelessComponent< +const AuthorizationProvider: FunctionComponent< AuthorizationProps & { children: ReactNode; } diff --git a/src/components/HyperMediaControls/Dialog.tsx b/src/components/HyperMediaControls/Dialog.tsx index 8926ba3..ef345ba 100644 --- a/src/components/HyperMediaControls/Dialog.tsx +++ b/src/components/HyperMediaControls/Dialog.tsx @@ -11,7 +11,7 @@ import { } from '@material-ui/core'; import { SlideProps } from '@material-ui/core/Slide'; import RelIcon from 'components/RelIcon'; -import React, { FormEvent, PureComponent, StatelessComponent } from 'react'; +import React, { FormEvent, FunctionComponent, PureComponent } from 'react'; import { HalLink } from 'types'; import HelpButton from './HelpButton'; import RelButton from './RelButton'; @@ -22,7 +22,7 @@ const styles = (theme: Theme) => ({ }, }); -const SlideUp: StatelessComponent = props => ( +const SlideUp: FunctionComponent = props => ( ); diff --git a/src/components/HyperMediaControls/RelButton.tsx b/src/components/HyperMediaControls/RelButton.tsx index 02ed47e..88feea8 100644 --- a/src/components/HyperMediaControls/RelButton.tsx +++ b/src/components/HyperMediaControls/RelButton.tsx @@ -1,14 +1,14 @@ import { Button } from '@material-ui/core'; import { ButtonProps } from '@material-ui/core/Button'; import RelIcon from 'components/RelIcon'; -import React, { StatelessComponent } from 'react'; +import React, { FunctionComponent } from 'react'; interface RelButtonProps { rel: string; title?: string; } -const RelButton: StatelessComponent = ({ +const RelButton: FunctionComponent = ({ rel, onClick, title, diff --git a/src/components/NavigationLinks.tsx b/src/components/NavigationLinks.tsx index 825c89c..0fb4266 100644 --- a/src/components/NavigationLinks.tsx +++ b/src/components/NavigationLinks.tsx @@ -2,8 +2,8 @@ import { IconButton } from '@material-ui/core'; import React, { ComponentType, FormEventHandler, + FunctionComponent, PureComponent, - StatelessComponent, } from 'react'; import { navigation } from 'stream-store'; import { HalLink, HalLinks, NavigatableProps } from 'types'; @@ -45,7 +45,7 @@ interface NavigationLinksProps { _links: HalLinks; } -const NavigationLinks: StatelessComponent = ({ +const NavigationLinks: FunctionComponent = ({ _links, }) => (