diff --git a/package.json b/package.json index 7bd730b..fccbd61 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "start:backend": "scripts/start-backend.sh", "build:backend": "scripts/build-backend.sh", "check:backend": "tsc -p packages/backend --noEmit", - "build:shared": "tsc -p packages/shared", - "check:shared": "tsc -p packages/shared --noEmit" + "build:common": "tsc -p packages/common", + "check:common": "tsc -p packages/common --noEmit" } } diff --git a/packages/backend/src/aggregator.ts b/packages/backend/src/aggregator.ts index 1995156..d743211 100644 --- a/packages/backend/src/aggregator.ts +++ b/packages/backend/src/aggregator.ts @@ -1,11 +1,12 @@ import * as EventEmitter from 'events'; import Node from './node'; -import Feed, { FeedData } from './feed'; -import { Types, IdSet } from '@dotstats/common'; +import Feed from './feed'; +import { Types, IdSet, FeedMessage } from '@dotstats/common'; export default class Aggregator extends EventEmitter { private nodes = new IdSet(); private feeds = new IdSet(); + private messages: Array = []; public height = 0 as Types.BlockNumber; @@ -33,12 +34,14 @@ export default class Aggregator extends EventEmitter { public addFeed(feed: Feed) { this.feeds.add(feed); - feed.send(Feed.bestBlock(this.height)); + const messages = [Feed.bestBlock(this.height)]; for (const node of this.nodes.values()) { - feed.send(Feed.addedNode(node)); + messages.push(Feed.addedNode(node)); } + feed.sendMessages(messages); + feed.once('disconnect', () => { this.feeds.remove(feed); }); @@ -48,9 +51,20 @@ export default class Aggregator extends EventEmitter { return this.nodes.values(); } - private broadcast(data: FeedData) { - for (const feed of this.feeds.values()) { - feed.send(data); + private broadcast(message: FeedMessage.Message) { + const queue = this.messages.length === 0; + + this.messages.push(message); + + if (queue) { + process.nextTick(() => { + const data = FeedMessage.serialize(this.messages); + this.messages = []; + + for (const feed of this.feeds.values()) { + feed.sendData(data); + } + }); } } diff --git a/packages/backend/src/feed.ts b/packages/backend/src/feed.ts index b5b02e9..18a7fd2 100644 --- a/packages/backend/src/feed.ts +++ b/packages/backend/src/feed.ts @@ -1,20 +1,10 @@ import * as WebSocket from 'ws'; import * as EventEmitter from 'events'; import Node from './node'; -import { Opaque, Types, idGenerator } from '@dotstats/common'; +import { Opaque, FeedMessage, Types, idGenerator } from '@dotstats/common'; const nextId = idGenerator(); - -/** - * Opaque data type to be sent to the feed. Passing through - * strings means we can only serialize once, no matter how - * many feed clients are listening in. - */ -export type FeedData = Opaque; - -function serialize(msg: Types.FeedMessage): FeedData { - return JSON.stringify(msg) as FeedData; -} +const { Actions } = FeedMessage; export default class Feed extends EventEmitter { public id: Types.FeedId; @@ -31,45 +21,49 @@ export default class Feed extends EventEmitter { socket.on('close', () => this.disconnect()); } - public static bestBlock(height: Types.BlockNumber): FeedData { - return serialize({ - action: 'best', + public static bestBlock(height: Types.BlockNumber): FeedMessage.Message { + return { + action: Actions.BestBlock, payload: height - }); + }; } - public static addedNode(node: Node): FeedData { - return serialize({ - action: 'added', + public static addedNode(node: Node): FeedMessage.Message { + return { + action: Actions.AddedNode, payload: [node.id, node.nodeDetails(), node.nodeStats(), node.blockDetails()] - }) + }; } - public static removedNode(node: Node): FeedData { - return serialize({ - action: 'removed', + public static removedNode(node: Node): FeedMessage.Message { + return { + action: Actions.RemovedNode, payload: node.id - }); + }; } - public static imported(node: Node): FeedData { - return serialize({ - action: 'imported', + public static imported(node: Node): FeedMessage.Message { + return { + action: Actions.ImportedBlock, payload: [node.id, node.blockDetails()] - }); + }; } - public static stats(node: Node): FeedData { - return serialize({ - action: 'stats', + public static stats(node: Node): FeedMessage.Message { + return { + action: Actions.NodeStats, payload: [node.id, node.nodeStats()] - }); + }; } - public send(data: FeedData) { + public sendData(data: FeedMessage.Data) { this.socket.send(data); } + public sendMessages(messages: Array) { + this.socket.send(FeedMessage.serialize(messages)) + } + private disconnect() { this.socket.removeAllListeners(); this.socket.close(); diff --git a/packages/common/package.json b/packages/common/package.json index 929e261..faf3f3e 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -5,6 +5,7 @@ "license": "GPL-3.0", "description": "Shared utils and types for backend and frontend", "main": "build/index.js", + "types": "build/index.d.ts", "engines": { "node": ">=9.5" }, diff --git a/packages/common/src/feed.ts b/packages/common/src/feed.ts new file mode 100644 index 0000000..9cadcc5 --- /dev/null +++ b/packages/common/src/feed.ts @@ -0,0 +1,100 @@ +import { Opaque } from './helpers'; +import { NodeId, NodeDetails, NodeStats, BlockNumber, BlockDetails } from './types'; + +export const Actions = { + BestBlock: 0 as 0, + AddedNode: 1 as 1, + RemovedNode: 2 as 2, + ImportedBlock: 3 as 3, + NodeStats: 4 as 4, +}; + +export type Action = typeof Actions[keyof typeof Actions]; +export type Payload = Message['payload']; + +export namespace Variants { + export interface MessageBase { + action: Action; + } + + export interface BestBlockMessage extends MessageBase { + action: typeof Actions.BestBlock; + payload: BlockNumber; + } + + export interface AddedNodeMessage extends MessageBase { + action: typeof Actions.AddedNode; + payload: [NodeId, NodeDetails, NodeStats, BlockDetails]; + } + + export interface RemovedNodeMessage extends MessageBase { + action: typeof Actions.RemovedNode; + payload: NodeId; + } + + export interface ImportedBlockMessage extends MessageBase { + action: typeof Actions.ImportedBlock; + payload: [NodeId, BlockDetails]; + } + + export interface NodeStatsMessage extends MessageBase { + action: typeof Actions.NodeStats; + payload: [NodeId, NodeStats]; + }; +} + +export type Message = + | Variants.BestBlockMessage + | Variants.AddedNodeMessage + | Variants.RemovedNodeMessage + | Variants.ImportedBlockMessage + | Variants.NodeStatsMessage; + +/** + * Opaque data type to be sent to the feed. Passing through + * strings means we can only serialize once, no matter how + * many feed clients are listening in. + */ +export type Data = Opaque; + +/** + * Serialize an array of `Message`s to a single JSON string. + * + * All messages are squashed into a single array of alternating opcodes and payloads. + * + * Action `string`s are converted to opcodes using the `actionToCode` mapping. + */ +export function serialize(messages: Array): Data { + const squashed = new Array(messages.length * 2); + let index = 0; + + messages.forEach((message) => { + const { action, payload } = message; + + squashed[index++] = action; + squashed[index++] = payload; + }) + + return JSON.stringify(squashed) as Data; +} + +/** + * Deserialize data to an array of `Message`s. + */ +export function deserialize(data: Data): Array { + const json: Array = JSON.parse(data); + + if (!Array.isArray(json) || json.length === 0 || json.length % 2 !== 0) { + throw new Error('Invalid FeedMessage.Data'); + } + + const messages: Array = new Array(json.length / 2); + + for (const index of messages.keys()) { + const [ action, payload ] = json.slice(index * 2); + + messages[index] = { action, payload } as Message; + } + + return messages; +} diff --git a/packages/common/src/helpers.ts b/packages/common/src/helpers.ts index 458cd80..8eeea7c 100644 --- a/packages/common/src/helpers.ts +++ b/packages/common/src/helpers.ts @@ -1,8 +1,10 @@ +import { Milliseconds } from './types'; + /** * PhantomData akin to Rust, because sometimes you need to be smarter than * the compiler. */ -export class PhantomData

{ private __PHANTOM__: P } +export abstract class PhantomData

{ private __PHANTOM__: P } /** * Opaque type, similar to `opaque type` in Flow, or new types in Rust/C. @@ -20,3 +22,12 @@ export type Opaque = T & PhantomData

; * Just a readable shorthand for null-ish-able types, akin to `T?` in Flow. */ export type Maybe = T | null | undefined; + +/** + * Asynchronous sleep + */ +export function sleep(time: Milliseconds): Promise { + return new Promise((resolve, _reject) => { + setTimeout(() => resolve(), time); + }); +} diff --git a/packages/common/src/index.ts b/packages/common/src/index.ts index f556d89..cee17ac 100644 --- a/packages/common/src/index.ts +++ b/packages/common/src/index.ts @@ -3,5 +3,6 @@ export * from './helpers'; export * from './id'; import * as Types from './types'; +import * as FeedMessage from './feed'; -export { Types }; +export { Types, FeedMessage }; diff --git a/packages/common/src/types.ts b/packages/common/src/types.ts index 7ecaa97..d5e49c6 100644 --- a/packages/common/src/types.ts +++ b/packages/common/src/types.ts @@ -15,30 +15,3 @@ export type TransactionCount = Opaque; export type BlockDetails = [BlockNumber, BlockHash, Milliseconds]; export type NodeDetails = [NodeName, NodeImplementation, NodeVersion]; export type NodeStats = [PeerCount, TransactionCount]; - -interface BestBlock { - action: 'best'; - payload: BlockNumber; -} - -interface AddedNode { - action: 'added'; - payload: [NodeId, NodeDetails, NodeStats, BlockDetails]; -} - -interface RemovedNode { - action: 'removed'; - payload: NodeId; -} - -interface Imported { - action: 'imported'; - payload: [NodeId, BlockDetails]; -} - -interface Stats { - action: 'stats'; - payload: [NodeId, NodeStats]; -} - -export type FeedMessage = BestBlock | AddedNode | RemovedNode | Imported | Stats; diff --git a/packages/common/tsconfig.json b/packages/common/tsconfig.json index ece6e20..56c3895 100644 --- a/packages/common/tsconfig.json +++ b/packages/common/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../../tsconfig", "compilerOptions": { - "outDir": "build" + "outDir": "build", + "declaration": true }, "include": [ "src/**/*.ts" diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 703a7aa..6e23c32 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -5,9 +5,10 @@ "license": "GPL-3.0", "description": "Polkadot Telemetry frontend", "dependencies": { - "react": "^16.4.0", - "react-dom": "^16.4.0", - "react-scripts-ts": "2.16.0" + "react": "16.4.0", + "react-dom": "16.4.0", + "react-scripts-ts": "2.16.0", + "react-svg": "^4.1.1" }, "scripts": { "start": "react-scripts-ts start", @@ -20,6 +21,7 @@ "@types/node": "^10.3.2", "@types/react": "^16.3.17", "@types/react-dom": "^16.0.6", + "@types/react-svg": "^3.0.0", "typescript": "^2.9.2" } } diff --git a/packages/frontend/public/favicon.ico b/packages/frontend/public/favicon.ico deleted file mode 100644 index a11777c..0000000 Binary files a/packages/frontend/public/favicon.ico and /dev/null differ diff --git a/packages/frontend/public/index.html b/packages/frontend/public/index.html index ed0ebaf..d71ca30 100644 --- a/packages/frontend/public/index.html +++ b/packages/frontend/public/index.html @@ -4,37 +4,13 @@ - - - - - React App + + Polkadot Telemetry

- diff --git a/packages/frontend/public/manifest.json b/packages/frontend/public/manifest.json deleted file mode 100644 index ef19ec2..0000000 --- a/packages/frontend/public/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - } - ], - "start_url": "./index.html", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/packages/frontend/src/App.css b/packages/frontend/src/App.css index c5c6e8a..2ca0359 100644 --- a/packages/frontend/src/App.css +++ b/packages/frontend/src/App.css @@ -1,5 +1,8 @@ .App { text-align: center; + background: #fff; + color: #000; + font-family: monospace, sans-serif; } .App-logo { @@ -8,18 +11,18 @@ } .App-header { - background-color: #222; - height: 150px; + font-size: 3em; padding: 20px; - color: white; + text-align: left; } -.App-title { - font-size: 1.5em; +.App-list { + padding: 20px; } -.App-intro { - font-size: large; +.App-list th, .App-list td { + text-align: left; + padding: 0.2em 0.5em; } @keyframes App-logo-spin { diff --git a/packages/frontend/src/App.tsx b/packages/frontend/src/App.tsx index 372bd1d..a3e1716 100644 --- a/packages/frontend/src/App.tsx +++ b/packages/frontend/src/App.tsx @@ -1,17 +1,18 @@ import * as React from 'react'; -import './App.css'; import { Types } from '@dotstats/common'; +import { Node } from './Node'; +import { Icon } from './Icon'; +import { Connection } from './message'; +import { State } from './state'; +import { formatNumber } from './utils'; -interface Node { - nodeDetails: Types.NodeDetails, - nodeStats: Types.NodeStats, - blockDetails: Types.BlockDetails, -} - -interface State { - best: Types.BlockNumber, - nodes: Map -} +import './App.css'; +import nodeIcon from './icons/broadcast.svg'; +import nodeTypeIcon from './icons/device-desktop.svg'; +import peersIcon from './icons/organization.svg'; +import transactionsIcon from './icons/inbox.svg'; +import blockIcon from './icons/package.svg'; +import blockTimeIcon from './icons/history.svg'; export default class App extends React.Component<{}, State> { public state: State = { @@ -22,41 +23,29 @@ export default class App extends React.Component<{}, State> { constructor(props: {}) { super(props); - const socket = new WebSocket(`ws://${window.location.hostname}:8080`); - - socket.addEventListener('message', ({ data }) => { - this.onMessage(JSON.parse(data)); - }); + this.connect(); } public render() { return (
-

Best block: {this.state.best}

- +
+ #{formatNumber(this.state.best)} +
+
- + + + + + + { - this.nodes().map(([ id, node ]) => { - const [name, implementation, version] = node.nodeDetails; - const [height, hash, blockTime] = node.blockDetails; - const [peers, txcount] = node.nodeStats; - - return ( - - - - - - - - - ); - }) + this.nodes().map((props) => ) }
Node NameNode TypePeersTransactionsLast BlockBlock Time Node Type Last Block
{name}{implementation} v{version}{peers}{txcount}{height} {hash}{blockTime / 1000}s
@@ -64,57 +53,17 @@ export default class App extends React.Component<{}, State> { ); } - private nodes(): Array<[Types.NodeId, Node]> { - return Array.from(this.state.nodes.entries()); + private async connect() { + Connection.create((changes) => { + if (changes) { + this.setState(changes); + } + + return this.state; + }); } - private onMessage(message: Types.FeedMessage) { - const { nodes } = this.state; - - switch (message.action) { - case 'best': { - this.setState({ best: message.payload }); - } - return; - case 'added': { - const [id, nodeDetails, nodeStats, blockDetails] = message.payload; - const node = { nodeDetails, nodeStats, blockDetails }; - - nodes.set(id, node); - } - break; - case 'removed': { - nodes.delete(message.payload); - } - break; - case 'imported': { - const [id, blockDetails] = message.payload; - - const node = nodes.get(id); - - if (!node) { - return; - } - - node.blockDetails = blockDetails; - } - break; - case 'stats': { - const [id, nodeStats] = message.payload; - - const node = nodes.get(id); - - if (!node) { - return; - } - - node.nodeStats = nodeStats; - } - break; - default: - return; - } - - this.setState({ nodes }); + private nodes(): Node.Props[] { + return Array.from(this.state.nodes.values()); } } diff --git a/packages/frontend/src/Icon.css b/packages/frontend/src/Icon.css new file mode 100644 index 0000000..38da8fe --- /dev/null +++ b/packages/frontend/src/Icon.css @@ -0,0 +1,11 @@ +.Icon { + fill: currentColor; + height: 1em; + vertical-align: middle; + display: inline-block; +} + +.Icon svg { + width: auto; + height: 1em; +} diff --git a/packages/frontend/src/Icon.tsx b/packages/frontend/src/Icon.tsx new file mode 100644 index 0000000..d20a30c --- /dev/null +++ b/packages/frontend/src/Icon.tsx @@ -0,0 +1,12 @@ +import * as React from 'react'; +import ReactSVG from 'react-svg'; +import './Icon.css'; + +export interface Props { + src: string, + className?: string, +}; + +export function Icon(props: Props) { + return ; +} diff --git a/packages/frontend/src/Node.tsx b/packages/frontend/src/Node.tsx new file mode 100644 index 0000000..b71e9f1 --- /dev/null +++ b/packages/frontend/src/Node.tsx @@ -0,0 +1,29 @@ +import * as React from 'react'; +import { formatNumber, trimHash } from './utils'; +import { Types } from '@dotstats/common'; + +export namespace Node { + export interface Props { + id: Types.NodeId, + nodeDetails: Types.NodeDetails, + nodeStats: Types.NodeStats, + blockDetails: Types.BlockDetails, + } +} + +export function Node(props: Node.Props) { + const [name, implementation, version] = props.nodeDetails; + const [height, hash, blockTime] = props.blockDetails; + const [peers, txcount] = props.nodeStats; + + return ( + + {name} + {implementation} v{version} + {peers} + {txcount} + #{formatNumber(height)} / {trimHash(hash, 16)} + {blockTime / 1000}s + + ); +} diff --git a/packages/frontend/src/icons/alert.svg b/packages/frontend/src/icons/alert.svg new file mode 100644 index 0000000..ca50ea8 --- /dev/null +++ b/packages/frontend/src/icons/alert.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/archive.svg b/packages/frontend/src/icons/archive.svg new file mode 100644 index 0000000..d1eaa21 --- /dev/null +++ b/packages/frontend/src/icons/archive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/arrow-down.svg b/packages/frontend/src/icons/arrow-down.svg new file mode 100644 index 0000000..c1acf0a --- /dev/null +++ b/packages/frontend/src/icons/arrow-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/arrow-left.svg b/packages/frontend/src/icons/arrow-left.svg new file mode 100644 index 0000000..f3cda4f --- /dev/null +++ b/packages/frontend/src/icons/arrow-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/arrow-right.svg b/packages/frontend/src/icons/arrow-right.svg new file mode 100644 index 0000000..04a4fbf --- /dev/null +++ b/packages/frontend/src/icons/arrow-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/arrow-small-down.svg b/packages/frontend/src/icons/arrow-small-down.svg new file mode 100644 index 0000000..57c1ee8 --- /dev/null +++ b/packages/frontend/src/icons/arrow-small-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/arrow-small-left.svg b/packages/frontend/src/icons/arrow-small-left.svg new file mode 100644 index 0000000..9fa227e --- /dev/null +++ b/packages/frontend/src/icons/arrow-small-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/arrow-small-right.svg b/packages/frontend/src/icons/arrow-small-right.svg new file mode 100644 index 0000000..bca6847 --- /dev/null +++ b/packages/frontend/src/icons/arrow-small-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/arrow-small-up.svg b/packages/frontend/src/icons/arrow-small-up.svg new file mode 100644 index 0000000..6c132f1 --- /dev/null +++ b/packages/frontend/src/icons/arrow-small-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/arrow-up.svg b/packages/frontend/src/icons/arrow-up.svg new file mode 100644 index 0000000..63be890 --- /dev/null +++ b/packages/frontend/src/icons/arrow-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/assets.d.ts b/packages/frontend/src/icons/assets.d.ts new file mode 100644 index 0000000..dd4ab7e --- /dev/null +++ b/packages/frontend/src/icons/assets.d.ts @@ -0,0 +1 @@ +declare module "*.svg"; diff --git a/packages/frontend/src/icons/beaker.svg b/packages/frontend/src/icons/beaker.svg new file mode 100644 index 0000000..0997bb0 --- /dev/null +++ b/packages/frontend/src/icons/beaker.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/bell.svg b/packages/frontend/src/icons/bell.svg new file mode 100644 index 0000000..171f84f --- /dev/null +++ b/packages/frontend/src/icons/bell.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/bold.svg b/packages/frontend/src/icons/bold.svg new file mode 100644 index 0000000..d2f2995 --- /dev/null +++ b/packages/frontend/src/icons/bold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/book.svg b/packages/frontend/src/icons/book.svg new file mode 100644 index 0000000..d21fa56 --- /dev/null +++ b/packages/frontend/src/icons/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/bookmark.svg b/packages/frontend/src/icons/bookmark.svg new file mode 100644 index 0000000..de64157 --- /dev/null +++ b/packages/frontend/src/icons/bookmark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/briefcase.svg b/packages/frontend/src/icons/briefcase.svg new file mode 100644 index 0000000..5104b81 --- /dev/null +++ b/packages/frontend/src/icons/briefcase.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/broadcast.svg b/packages/frontend/src/icons/broadcast.svg new file mode 100644 index 0000000..ddc1458 --- /dev/null +++ b/packages/frontend/src/icons/broadcast.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/browser.svg b/packages/frontend/src/icons/browser.svg new file mode 100644 index 0000000..00f512a --- /dev/null +++ b/packages/frontend/src/icons/browser.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/bug.svg b/packages/frontend/src/icons/bug.svg new file mode 100644 index 0000000..7518829 --- /dev/null +++ b/packages/frontend/src/icons/bug.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/calendar.svg b/packages/frontend/src/icons/calendar.svg new file mode 100644 index 0000000..fede886 --- /dev/null +++ b/packages/frontend/src/icons/calendar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/check.svg b/packages/frontend/src/icons/check.svg new file mode 100644 index 0000000..2df5dee --- /dev/null +++ b/packages/frontend/src/icons/check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/checklist.svg b/packages/frontend/src/icons/checklist.svg new file mode 100644 index 0000000..671aa3b --- /dev/null +++ b/packages/frontend/src/icons/checklist.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/chevron-down.svg b/packages/frontend/src/icons/chevron-down.svg new file mode 100644 index 0000000..32eab7b --- /dev/null +++ b/packages/frontend/src/icons/chevron-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/chevron-left.svg b/packages/frontend/src/icons/chevron-left.svg new file mode 100644 index 0000000..680c9a0 --- /dev/null +++ b/packages/frontend/src/icons/chevron-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/chevron-right.svg b/packages/frontend/src/icons/chevron-right.svg new file mode 100644 index 0000000..a5dadc6 --- /dev/null +++ b/packages/frontend/src/icons/chevron-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/chevron-up.svg b/packages/frontend/src/icons/chevron-up.svg new file mode 100644 index 0000000..19db9dd --- /dev/null +++ b/packages/frontend/src/icons/chevron-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/circle-slash.svg b/packages/frontend/src/icons/circle-slash.svg new file mode 100644 index 0000000..edfb3d8 --- /dev/null +++ b/packages/frontend/src/icons/circle-slash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/circuit-board.svg b/packages/frontend/src/icons/circuit-board.svg new file mode 100644 index 0000000..f9a4c7e --- /dev/null +++ b/packages/frontend/src/icons/circuit-board.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/clippy.svg b/packages/frontend/src/icons/clippy.svg new file mode 100644 index 0000000..9cb6337 --- /dev/null +++ b/packages/frontend/src/icons/clippy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/clock.svg b/packages/frontend/src/icons/clock.svg new file mode 100644 index 0000000..4bb89e0 --- /dev/null +++ b/packages/frontend/src/icons/clock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/cloud-download.svg b/packages/frontend/src/icons/cloud-download.svg new file mode 100644 index 0000000..8cc3d0f --- /dev/null +++ b/packages/frontend/src/icons/cloud-download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/cloud-upload.svg b/packages/frontend/src/icons/cloud-upload.svg new file mode 100644 index 0000000..c17e1d3 --- /dev/null +++ b/packages/frontend/src/icons/cloud-upload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/code.svg b/packages/frontend/src/icons/code.svg new file mode 100644 index 0000000..6e6560e --- /dev/null +++ b/packages/frontend/src/icons/code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/comment-discussion.svg b/packages/frontend/src/icons/comment-discussion.svg new file mode 100644 index 0000000..c155b88 --- /dev/null +++ b/packages/frontend/src/icons/comment-discussion.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/comment.svg b/packages/frontend/src/icons/comment.svg new file mode 100644 index 0000000..2c6d88c --- /dev/null +++ b/packages/frontend/src/icons/comment.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/credit-card.svg b/packages/frontend/src/icons/credit-card.svg new file mode 100644 index 0000000..7da9f29 --- /dev/null +++ b/packages/frontend/src/icons/credit-card.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/dash.svg b/packages/frontend/src/icons/dash.svg new file mode 100644 index 0000000..b9a28fe --- /dev/null +++ b/packages/frontend/src/icons/dash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/dashboard.svg b/packages/frontend/src/icons/dashboard.svg new file mode 100644 index 0000000..dad1fd7 --- /dev/null +++ b/packages/frontend/src/icons/dashboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/database.svg b/packages/frontend/src/icons/database.svg new file mode 100644 index 0000000..e686d98 --- /dev/null +++ b/packages/frontend/src/icons/database.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/desktop-download.svg b/packages/frontend/src/icons/desktop-download.svg new file mode 100644 index 0000000..74b2c7d --- /dev/null +++ b/packages/frontend/src/icons/desktop-download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/device-camera-video.svg b/packages/frontend/src/icons/device-camera-video.svg new file mode 100644 index 0000000..dc0e55e --- /dev/null +++ b/packages/frontend/src/icons/device-camera-video.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/device-camera.svg b/packages/frontend/src/icons/device-camera.svg new file mode 100644 index 0000000..609be0e --- /dev/null +++ b/packages/frontend/src/icons/device-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/device-desktop.svg b/packages/frontend/src/icons/device-desktop.svg new file mode 100644 index 0000000..3671fd0 --- /dev/null +++ b/packages/frontend/src/icons/device-desktop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/device-mobile.svg b/packages/frontend/src/icons/device-mobile.svg new file mode 100644 index 0000000..84559ca --- /dev/null +++ b/packages/frontend/src/icons/device-mobile.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/diff-added.svg b/packages/frontend/src/icons/diff-added.svg new file mode 100644 index 0000000..8394151 --- /dev/null +++ b/packages/frontend/src/icons/diff-added.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/diff-ignored.svg b/packages/frontend/src/icons/diff-ignored.svg new file mode 100644 index 0000000..eaa2bee --- /dev/null +++ b/packages/frontend/src/icons/diff-ignored.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/diff-modified.svg b/packages/frontend/src/icons/diff-modified.svg new file mode 100644 index 0000000..6a17dc3 --- /dev/null +++ b/packages/frontend/src/icons/diff-modified.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/diff-removed.svg b/packages/frontend/src/icons/diff-removed.svg new file mode 100644 index 0000000..2dfe2a1 --- /dev/null +++ b/packages/frontend/src/icons/diff-removed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/diff-renamed.svg b/packages/frontend/src/icons/diff-renamed.svg new file mode 100644 index 0000000..c1f0982 --- /dev/null +++ b/packages/frontend/src/icons/diff-renamed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/diff.svg b/packages/frontend/src/icons/diff.svg new file mode 100644 index 0000000..cbaa51f --- /dev/null +++ b/packages/frontend/src/icons/diff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/ellipsis.svg b/packages/frontend/src/icons/ellipsis.svg new file mode 100644 index 0000000..7d4b9d8 --- /dev/null +++ b/packages/frontend/src/icons/ellipsis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/eye.svg b/packages/frontend/src/icons/eye.svg new file mode 100644 index 0000000..4f43a09 --- /dev/null +++ b/packages/frontend/src/icons/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/file-binary.svg b/packages/frontend/src/icons/file-binary.svg new file mode 100644 index 0000000..93d0f54 --- /dev/null +++ b/packages/frontend/src/icons/file-binary.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/file-code.svg b/packages/frontend/src/icons/file-code.svg new file mode 100644 index 0000000..5b4b199 --- /dev/null +++ b/packages/frontend/src/icons/file-code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/file-directory.svg b/packages/frontend/src/icons/file-directory.svg new file mode 100644 index 0000000..4bf1f1c --- /dev/null +++ b/packages/frontend/src/icons/file-directory.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/file-media.svg b/packages/frontend/src/icons/file-media.svg new file mode 100644 index 0000000..018e533 --- /dev/null +++ b/packages/frontend/src/icons/file-media.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/file-pdf.svg b/packages/frontend/src/icons/file-pdf.svg new file mode 100644 index 0000000..1b1703e --- /dev/null +++ b/packages/frontend/src/icons/file-pdf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/file-submodule.svg b/packages/frontend/src/icons/file-submodule.svg new file mode 100644 index 0000000..355a905 --- /dev/null +++ b/packages/frontend/src/icons/file-submodule.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/file-symlink-directory.svg b/packages/frontend/src/icons/file-symlink-directory.svg new file mode 100644 index 0000000..4b6263a --- /dev/null +++ b/packages/frontend/src/icons/file-symlink-directory.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/file-symlink-file.svg b/packages/frontend/src/icons/file-symlink-file.svg new file mode 100644 index 0000000..b2aaf24 --- /dev/null +++ b/packages/frontend/src/icons/file-symlink-file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/file-zip.svg b/packages/frontend/src/icons/file-zip.svg new file mode 100644 index 0000000..e2bb5b0 --- /dev/null +++ b/packages/frontend/src/icons/file-zip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/file.svg b/packages/frontend/src/icons/file.svg new file mode 100644 index 0000000..0997406 --- /dev/null +++ b/packages/frontend/src/icons/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/flame.svg b/packages/frontend/src/icons/flame.svg new file mode 100644 index 0000000..1fcb94b --- /dev/null +++ b/packages/frontend/src/icons/flame.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/fold.svg b/packages/frontend/src/icons/fold.svg new file mode 100644 index 0000000..1b0b399 --- /dev/null +++ b/packages/frontend/src/icons/fold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/gear.svg b/packages/frontend/src/icons/gear.svg new file mode 100644 index 0000000..bf82007 --- /dev/null +++ b/packages/frontend/src/icons/gear.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/gift.svg b/packages/frontend/src/icons/gift.svg new file mode 100644 index 0000000..4539ce6 --- /dev/null +++ b/packages/frontend/src/icons/gift.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/gist-secret.svg b/packages/frontend/src/icons/gist-secret.svg new file mode 100644 index 0000000..6495281 --- /dev/null +++ b/packages/frontend/src/icons/gist-secret.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/gist.svg b/packages/frontend/src/icons/gist.svg new file mode 100644 index 0000000..9584460 --- /dev/null +++ b/packages/frontend/src/icons/gist.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/git-branch.svg b/packages/frontend/src/icons/git-branch.svg new file mode 100644 index 0000000..21ca8d8 --- /dev/null +++ b/packages/frontend/src/icons/git-branch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/git-commit.svg b/packages/frontend/src/icons/git-commit.svg new file mode 100644 index 0000000..3cc2e82 --- /dev/null +++ b/packages/frontend/src/icons/git-commit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/git-compare.svg b/packages/frontend/src/icons/git-compare.svg new file mode 100644 index 0000000..4737499 --- /dev/null +++ b/packages/frontend/src/icons/git-compare.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/git-merge.svg b/packages/frontend/src/icons/git-merge.svg new file mode 100644 index 0000000..63c43f7 --- /dev/null +++ b/packages/frontend/src/icons/git-merge.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/git-pull-request.svg b/packages/frontend/src/icons/git-pull-request.svg new file mode 100644 index 0000000..4f59759 --- /dev/null +++ b/packages/frontend/src/icons/git-pull-request.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/globe.svg b/packages/frontend/src/icons/globe.svg new file mode 100644 index 0000000..990554c --- /dev/null +++ b/packages/frontend/src/icons/globe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/grabber.svg b/packages/frontend/src/icons/grabber.svg new file mode 100644 index 0000000..1a41fd0 --- /dev/null +++ b/packages/frontend/src/icons/grabber.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/graph.svg b/packages/frontend/src/icons/graph.svg new file mode 100644 index 0000000..cd3909e --- /dev/null +++ b/packages/frontend/src/icons/graph.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/heart.svg b/packages/frontend/src/icons/heart.svg new file mode 100644 index 0000000..e9407b5 --- /dev/null +++ b/packages/frontend/src/icons/heart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/history.svg b/packages/frontend/src/icons/history.svg new file mode 100644 index 0000000..ee4d9fb --- /dev/null +++ b/packages/frontend/src/icons/history.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/home.svg b/packages/frontend/src/icons/home.svg new file mode 100644 index 0000000..f3d3138 --- /dev/null +++ b/packages/frontend/src/icons/home.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/horizontal-rule.svg b/packages/frontend/src/icons/horizontal-rule.svg new file mode 100644 index 0000000..9a05c30 --- /dev/null +++ b/packages/frontend/src/icons/horizontal-rule.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/hubot.svg b/packages/frontend/src/icons/hubot.svg new file mode 100644 index 0000000..fea9f4b --- /dev/null +++ b/packages/frontend/src/icons/hubot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/inbox.svg b/packages/frontend/src/icons/inbox.svg new file mode 100644 index 0000000..f9cfec2 --- /dev/null +++ b/packages/frontend/src/icons/inbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/info.svg b/packages/frontend/src/icons/info.svg new file mode 100644 index 0000000..26db463 --- /dev/null +++ b/packages/frontend/src/icons/info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/issue-closed.svg b/packages/frontend/src/icons/issue-closed.svg new file mode 100644 index 0000000..0a7819a --- /dev/null +++ b/packages/frontend/src/icons/issue-closed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/issue-opened.svg b/packages/frontend/src/icons/issue-opened.svg new file mode 100644 index 0000000..a88cbcc --- /dev/null +++ b/packages/frontend/src/icons/issue-opened.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/issue-reopened.svg b/packages/frontend/src/icons/issue-reopened.svg new file mode 100644 index 0000000..789e18b --- /dev/null +++ b/packages/frontend/src/icons/issue-reopened.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/italic.svg b/packages/frontend/src/icons/italic.svg new file mode 100644 index 0000000..51d65f1 --- /dev/null +++ b/packages/frontend/src/icons/italic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/jersey.svg b/packages/frontend/src/icons/jersey.svg new file mode 100644 index 0000000..776e456 --- /dev/null +++ b/packages/frontend/src/icons/jersey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/kebab-horizontal.svg b/packages/frontend/src/icons/kebab-horizontal.svg new file mode 100644 index 0000000..7c472d3 --- /dev/null +++ b/packages/frontend/src/icons/kebab-horizontal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/kebab-vertical.svg b/packages/frontend/src/icons/kebab-vertical.svg new file mode 100644 index 0000000..2aaee60 --- /dev/null +++ b/packages/frontend/src/icons/kebab-vertical.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/key.svg b/packages/frontend/src/icons/key.svg new file mode 100644 index 0000000..ac8badc --- /dev/null +++ b/packages/frontend/src/icons/key.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/keyboard.svg b/packages/frontend/src/icons/keyboard.svg new file mode 100644 index 0000000..89712ad --- /dev/null +++ b/packages/frontend/src/icons/keyboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/law.svg b/packages/frontend/src/icons/law.svg new file mode 100644 index 0000000..5ccc464 --- /dev/null +++ b/packages/frontend/src/icons/law.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/light-bulb.svg b/packages/frontend/src/icons/light-bulb.svg new file mode 100644 index 0000000..d2ff74c --- /dev/null +++ b/packages/frontend/src/icons/light-bulb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/link-external.svg b/packages/frontend/src/icons/link-external.svg new file mode 100644 index 0000000..70b569d --- /dev/null +++ b/packages/frontend/src/icons/link-external.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/link.svg b/packages/frontend/src/icons/link.svg new file mode 100644 index 0000000..820aef7 --- /dev/null +++ b/packages/frontend/src/icons/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/list-ordered.svg b/packages/frontend/src/icons/list-ordered.svg new file mode 100644 index 0000000..c0e8304 --- /dev/null +++ b/packages/frontend/src/icons/list-ordered.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/list-unordered.svg b/packages/frontend/src/icons/list-unordered.svg new file mode 100644 index 0000000..0b43536 --- /dev/null +++ b/packages/frontend/src/icons/list-unordered.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/location.svg b/packages/frontend/src/icons/location.svg new file mode 100644 index 0000000..f6372a3 --- /dev/null +++ b/packages/frontend/src/icons/location.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/lock.svg b/packages/frontend/src/icons/lock.svg new file mode 100644 index 0000000..5587064 --- /dev/null +++ b/packages/frontend/src/icons/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/logo-gist.svg b/packages/frontend/src/icons/logo-gist.svg new file mode 100644 index 0000000..29f2213 --- /dev/null +++ b/packages/frontend/src/icons/logo-gist.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/logo-github.svg b/packages/frontend/src/icons/logo-github.svg new file mode 100644 index 0000000..0da3476 --- /dev/null +++ b/packages/frontend/src/icons/logo-github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/mail-read.svg b/packages/frontend/src/icons/mail-read.svg new file mode 100644 index 0000000..bf4deaf --- /dev/null +++ b/packages/frontend/src/icons/mail-read.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/mail.svg b/packages/frontend/src/icons/mail.svg new file mode 100644 index 0000000..9fca68b --- /dev/null +++ b/packages/frontend/src/icons/mail.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/mark-github.svg b/packages/frontend/src/icons/mark-github.svg new file mode 100644 index 0000000..af1bfa1 --- /dev/null +++ b/packages/frontend/src/icons/mark-github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/markdown.svg b/packages/frontend/src/icons/markdown.svg new file mode 100644 index 0000000..999110e --- /dev/null +++ b/packages/frontend/src/icons/markdown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/megaphone.svg b/packages/frontend/src/icons/megaphone.svg new file mode 100644 index 0000000..a62f82d --- /dev/null +++ b/packages/frontend/src/icons/megaphone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/mention.svg b/packages/frontend/src/icons/mention.svg new file mode 100644 index 0000000..c09499b --- /dev/null +++ b/packages/frontend/src/icons/mention.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/milestone.svg b/packages/frontend/src/icons/milestone.svg new file mode 100644 index 0000000..803465b --- /dev/null +++ b/packages/frontend/src/icons/milestone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/mirror.svg b/packages/frontend/src/icons/mirror.svg new file mode 100644 index 0000000..76e0c37 --- /dev/null +++ b/packages/frontend/src/icons/mirror.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/mortar-board.svg b/packages/frontend/src/icons/mortar-board.svg new file mode 100644 index 0000000..869f9ae --- /dev/null +++ b/packages/frontend/src/icons/mortar-board.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/mute.svg b/packages/frontend/src/icons/mute.svg new file mode 100644 index 0000000..e448808 --- /dev/null +++ b/packages/frontend/src/icons/mute.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/no-newline.svg b/packages/frontend/src/icons/no-newline.svg new file mode 100644 index 0000000..2a8fb94 --- /dev/null +++ b/packages/frontend/src/icons/no-newline.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/note.svg b/packages/frontend/src/icons/note.svg new file mode 100644 index 0000000..cbf7963 --- /dev/null +++ b/packages/frontend/src/icons/note.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/octoface.svg b/packages/frontend/src/icons/octoface.svg new file mode 100644 index 0000000..bb1a40d --- /dev/null +++ b/packages/frontend/src/icons/octoface.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/organization.svg b/packages/frontend/src/icons/organization.svg new file mode 100644 index 0000000..6bf4ae9 --- /dev/null +++ b/packages/frontend/src/icons/organization.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/package.svg b/packages/frontend/src/icons/package.svg new file mode 100644 index 0000000..2db0351 --- /dev/null +++ b/packages/frontend/src/icons/package.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/paintcan.svg b/packages/frontend/src/icons/paintcan.svg new file mode 100644 index 0000000..08b4a4b --- /dev/null +++ b/packages/frontend/src/icons/paintcan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/pencil.svg b/packages/frontend/src/icons/pencil.svg new file mode 100644 index 0000000..8702f4d --- /dev/null +++ b/packages/frontend/src/icons/pencil.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/person.svg b/packages/frontend/src/icons/person.svg new file mode 100644 index 0000000..5871e2f --- /dev/null +++ b/packages/frontend/src/icons/person.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/pin.svg b/packages/frontend/src/icons/pin.svg new file mode 100644 index 0000000..95405c5 --- /dev/null +++ b/packages/frontend/src/icons/pin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/plug.svg b/packages/frontend/src/icons/plug.svg new file mode 100644 index 0000000..42865d5 --- /dev/null +++ b/packages/frontend/src/icons/plug.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/plus-small.svg b/packages/frontend/src/icons/plus-small.svg new file mode 100644 index 0000000..5e093a4 --- /dev/null +++ b/packages/frontend/src/icons/plus-small.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/plus.svg b/packages/frontend/src/icons/plus.svg new file mode 100644 index 0000000..23c27d8 --- /dev/null +++ b/packages/frontend/src/icons/plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/primitive-dot.svg b/packages/frontend/src/icons/primitive-dot.svg new file mode 100644 index 0000000..6f465da --- /dev/null +++ b/packages/frontend/src/icons/primitive-dot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/primitive-square.svg b/packages/frontend/src/icons/primitive-square.svg new file mode 100644 index 0000000..9d4058b --- /dev/null +++ b/packages/frontend/src/icons/primitive-square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/project.svg b/packages/frontend/src/icons/project.svg new file mode 100644 index 0000000..a728f74 --- /dev/null +++ b/packages/frontend/src/icons/project.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/pulse.svg b/packages/frontend/src/icons/pulse.svg new file mode 100644 index 0000000..4ec57ba --- /dev/null +++ b/packages/frontend/src/icons/pulse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/question.svg b/packages/frontend/src/icons/question.svg new file mode 100644 index 0000000..a6fc753 --- /dev/null +++ b/packages/frontend/src/icons/question.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/quote.svg b/packages/frontend/src/icons/quote.svg new file mode 100644 index 0000000..da5c2b2 --- /dev/null +++ b/packages/frontend/src/icons/quote.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/radio-tower.svg b/packages/frontend/src/icons/radio-tower.svg new file mode 100644 index 0000000..f89a705 --- /dev/null +++ b/packages/frontend/src/icons/radio-tower.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/reply.svg b/packages/frontend/src/icons/reply.svg new file mode 100644 index 0000000..12717db --- /dev/null +++ b/packages/frontend/src/icons/reply.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/repo-clone.svg b/packages/frontend/src/icons/repo-clone.svg new file mode 100644 index 0000000..32b86e8 --- /dev/null +++ b/packages/frontend/src/icons/repo-clone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/repo-force-push.svg b/packages/frontend/src/icons/repo-force-push.svg new file mode 100644 index 0000000..0aece33 --- /dev/null +++ b/packages/frontend/src/icons/repo-force-push.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/repo-forked.svg b/packages/frontend/src/icons/repo-forked.svg new file mode 100644 index 0000000..cc5e46a --- /dev/null +++ b/packages/frontend/src/icons/repo-forked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/repo-pull.svg b/packages/frontend/src/icons/repo-pull.svg new file mode 100644 index 0000000..dfe8e6c --- /dev/null +++ b/packages/frontend/src/icons/repo-pull.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/repo-push.svg b/packages/frontend/src/icons/repo-push.svg new file mode 100644 index 0000000..408dca6 --- /dev/null +++ b/packages/frontend/src/icons/repo-push.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/repo.svg b/packages/frontend/src/icons/repo.svg new file mode 100644 index 0000000..e653d4e --- /dev/null +++ b/packages/frontend/src/icons/repo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/report.svg b/packages/frontend/src/icons/report.svg new file mode 100644 index 0000000..3f93ee4 --- /dev/null +++ b/packages/frontend/src/icons/report.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/rocket.svg b/packages/frontend/src/icons/rocket.svg new file mode 100644 index 0000000..98303f8 --- /dev/null +++ b/packages/frontend/src/icons/rocket.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/rss.svg b/packages/frontend/src/icons/rss.svg new file mode 100644 index 0000000..3b2705d --- /dev/null +++ b/packages/frontend/src/icons/rss.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/ruby.svg b/packages/frontend/src/icons/ruby.svg new file mode 100644 index 0000000..8463908 --- /dev/null +++ b/packages/frontend/src/icons/ruby.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/screen-full.svg b/packages/frontend/src/icons/screen-full.svg new file mode 100644 index 0000000..e78d371 --- /dev/null +++ b/packages/frontend/src/icons/screen-full.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/screen-normal.svg b/packages/frontend/src/icons/screen-normal.svg new file mode 100644 index 0000000..a884713 --- /dev/null +++ b/packages/frontend/src/icons/screen-normal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/search.svg b/packages/frontend/src/icons/search.svg new file mode 100644 index 0000000..d0304b6 --- /dev/null +++ b/packages/frontend/src/icons/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/server.svg b/packages/frontend/src/icons/server.svg new file mode 100644 index 0000000..78bc79f --- /dev/null +++ b/packages/frontend/src/icons/server.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/settings.svg b/packages/frontend/src/icons/settings.svg new file mode 100644 index 0000000..f22b92e --- /dev/null +++ b/packages/frontend/src/icons/settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/shield.svg b/packages/frontend/src/icons/shield.svg new file mode 100644 index 0000000..087a969 --- /dev/null +++ b/packages/frontend/src/icons/shield.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/sign-in.svg b/packages/frontend/src/icons/sign-in.svg new file mode 100644 index 0000000..91560c6 --- /dev/null +++ b/packages/frontend/src/icons/sign-in.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/sign-out.svg b/packages/frontend/src/icons/sign-out.svg new file mode 100644 index 0000000..e54ca58 --- /dev/null +++ b/packages/frontend/src/icons/sign-out.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/smiley.svg b/packages/frontend/src/icons/smiley.svg new file mode 100644 index 0000000..0d93af5 --- /dev/null +++ b/packages/frontend/src/icons/smiley.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/squirrel.svg b/packages/frontend/src/icons/squirrel.svg new file mode 100644 index 0000000..3e5b51b --- /dev/null +++ b/packages/frontend/src/icons/squirrel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/star.svg b/packages/frontend/src/icons/star.svg new file mode 100644 index 0000000..9444880 --- /dev/null +++ b/packages/frontend/src/icons/star.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/stop.svg b/packages/frontend/src/icons/stop.svg new file mode 100644 index 0000000..6ae8523 --- /dev/null +++ b/packages/frontend/src/icons/stop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/sync.svg b/packages/frontend/src/icons/sync.svg new file mode 100644 index 0000000..692349a --- /dev/null +++ b/packages/frontend/src/icons/sync.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/tag.svg b/packages/frontend/src/icons/tag.svg new file mode 100644 index 0000000..5d2144e --- /dev/null +++ b/packages/frontend/src/icons/tag.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/tasklist.svg b/packages/frontend/src/icons/tasklist.svg new file mode 100644 index 0000000..a0bd560 --- /dev/null +++ b/packages/frontend/src/icons/tasklist.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/telescope.svg b/packages/frontend/src/icons/telescope.svg new file mode 100644 index 0000000..95047dc --- /dev/null +++ b/packages/frontend/src/icons/telescope.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/terminal.svg b/packages/frontend/src/icons/terminal.svg new file mode 100644 index 0000000..d6072fc --- /dev/null +++ b/packages/frontend/src/icons/terminal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/text-size.svg b/packages/frontend/src/icons/text-size.svg new file mode 100644 index 0000000..f83a5f9 --- /dev/null +++ b/packages/frontend/src/icons/text-size.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/three-bars.svg b/packages/frontend/src/icons/three-bars.svg new file mode 100644 index 0000000..bb3b2c8 --- /dev/null +++ b/packages/frontend/src/icons/three-bars.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/thumbsdown.svg b/packages/frontend/src/icons/thumbsdown.svg new file mode 100644 index 0000000..091e2f9 --- /dev/null +++ b/packages/frontend/src/icons/thumbsdown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/thumbsup.svg b/packages/frontend/src/icons/thumbsup.svg new file mode 100644 index 0000000..746c1e9 --- /dev/null +++ b/packages/frontend/src/icons/thumbsup.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/tools.svg b/packages/frontend/src/icons/tools.svg new file mode 100644 index 0000000..67a5984 --- /dev/null +++ b/packages/frontend/src/icons/tools.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/trashcan.svg b/packages/frontend/src/icons/trashcan.svg new file mode 100644 index 0000000..3d8c051 --- /dev/null +++ b/packages/frontend/src/icons/trashcan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/triangle-down.svg b/packages/frontend/src/icons/triangle-down.svg new file mode 100644 index 0000000..faa8896 --- /dev/null +++ b/packages/frontend/src/icons/triangle-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/triangle-left.svg b/packages/frontend/src/icons/triangle-left.svg new file mode 100644 index 0000000..8762036 --- /dev/null +++ b/packages/frontend/src/icons/triangle-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/triangle-right.svg b/packages/frontend/src/icons/triangle-right.svg new file mode 100644 index 0000000..59c2ac6 --- /dev/null +++ b/packages/frontend/src/icons/triangle-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/triangle-up.svg b/packages/frontend/src/icons/triangle-up.svg new file mode 100644 index 0000000..98d0654 --- /dev/null +++ b/packages/frontend/src/icons/triangle-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/unfold.svg b/packages/frontend/src/icons/unfold.svg new file mode 100644 index 0000000..ab04339 --- /dev/null +++ b/packages/frontend/src/icons/unfold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/unmute.svg b/packages/frontend/src/icons/unmute.svg new file mode 100644 index 0000000..5d9a978 --- /dev/null +++ b/packages/frontend/src/icons/unmute.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/unverified.svg b/packages/frontend/src/icons/unverified.svg new file mode 100644 index 0000000..e55595c --- /dev/null +++ b/packages/frontend/src/icons/unverified.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/verified.svg b/packages/frontend/src/icons/verified.svg new file mode 100644 index 0000000..3a2e01d --- /dev/null +++ b/packages/frontend/src/icons/verified.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/versions.svg b/packages/frontend/src/icons/versions.svg new file mode 100644 index 0000000..274bbdb --- /dev/null +++ b/packages/frontend/src/icons/versions.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/watch.svg b/packages/frontend/src/icons/watch.svg new file mode 100644 index 0000000..45b2499 --- /dev/null +++ b/packages/frontend/src/icons/watch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/x.svg b/packages/frontend/src/icons/x.svg new file mode 100644 index 0000000..e377314 --- /dev/null +++ b/packages/frontend/src/icons/x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/icons/zap.svg b/packages/frontend/src/icons/zap.svg new file mode 100644 index 0000000..e778194 --- /dev/null +++ b/packages/frontend/src/icons/zap.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/frontend/src/message.ts b/packages/frontend/src/message.ts new file mode 100644 index 0000000..f05a563 --- /dev/null +++ b/packages/frontend/src/message.ts @@ -0,0 +1,146 @@ +import { FeedMessage, Types, Maybe, sleep } from '@dotstats/common'; +import { State, Update } from './state'; + +const { Actions } = FeedMessage; + +const TIMEOUT_BASE = (1000 * 5) as Types.Milliseconds; // 5 seconds +const TIMEOUT_MAX = (1000 * 60 * 5) as Types.Milliseconds; // 5 minutes + +export class Connection { + public static async create(update: Update): Promise { + return new Connection(await Connection.socket(), update); + } + + private static readonly address = `ws://${window.location.hostname}:8080`; + + + private static async socket(): Promise { + let socket = await Connection.trySocket(); + let timeout = TIMEOUT_BASE; + + while (!socket) { + await sleep(timeout); + + timeout = Math.max(timeout * 2, TIMEOUT_MAX) as Types.Milliseconds; + socket = await Connection.trySocket(); + } + + return socket; + } + + private static async trySocket(): Promise> { + return new Promise>((resolve, _) => { + function clean() { + socket.removeEventListener('open', onSuccess); + socket.removeEventListener('close', onFailure); + socket.removeEventListener('error', onFailure); + } + + function onSuccess() { + clean(); + resolve(socket); + } + + function onFailure() { + clean(); + resolve(null); + } + + const socket = new WebSocket(Connection.address); + + socket.addEventListener('open', onSuccess); + socket.addEventListener('error', onFailure); + socket.addEventListener('close', onFailure); + }); + } + + private socket: WebSocket; + private state: Readonly; + private readonly update: Update; + + constructor(socket: WebSocket, update: Update) { + this.socket = socket; + this.update = update; + this.state = update(null); + this.bindSocket(); + } + + private bindSocket() { + this.socket.addEventListener('message', this.handleMessages); + this.socket.addEventListener('close', this.handleDisconnect); + this.socket.addEventListener('error', this.handleDisconnect); + } + + private clean() { + this.socket.removeEventListener('message', this.handleMessages); + this.socket.removeEventListener('close', this.handleDisconnect); + this.socket.removeEventListener('error', this.handleDisconnect); + } + + private handleMessages = (event: MessageEvent) => { + const data = event.data as FeedMessage.Data; + const nodes = this.state.nodes; + const changes = { nodes }; + + messages: for (const message of FeedMessage.deserialize(data)) { + switch (message.action) { + case Actions.BestBlock: { + this.state = this.update({ best: message.payload }); + + continue messages; + } + case Actions.AddedNode: { + const [id, nodeDetails, nodeStats, blockDetails] = message.payload; + const node = { id, nodeDetails, nodeStats, blockDetails }; + + nodes.set(id, node); + + break; + } + case Actions.RemovedNode: { + nodes.delete(message.payload); + + break; + } + case Actions.ImportedBlock: { + const [id, blockDetails] = message.payload; + + const node = nodes.get(id); + + if (!node) { + return; + } + + node.blockDetails = blockDetails; + + break; + } + case Actions.NodeStats: { + const [id, nodeStats] = message.payload; + + const node = nodes.get(id); + + if (!node) { + return; + } + + node.nodeStats = nodeStats; + + break; + } + default: { + return; + } + } + } + + this.state = this.update(changes); + } + + private handleDisconnect = async () => { + this.clean(); + this.socket.close(); + this.socket = await Connection.socket(); + this.bindSocket(); + } +} diff --git a/packages/frontend/src/state.ts b/packages/frontend/src/state.ts new file mode 100644 index 0000000..b6cb86f --- /dev/null +++ b/packages/frontend/src/state.ts @@ -0,0 +1,9 @@ +import { Types } from '@dotstats/common'; +import { Node } from './Node'; + +export interface State { + best: Types.BlockNumber, + nodes: Map +} + +export type Update = (changes: Pick | null) => Readonly; diff --git a/packages/frontend/src/utils.ts b/packages/frontend/src/utils.ts new file mode 100644 index 0000000..b88c3d7 --- /dev/null +++ b/packages/frontend/src/utils.ts @@ -0,0 +1,25 @@ +export function formatNumber(num: number): string { + const input = num.toString(); + + let output = ''; + let length = input.length; + + while (length > 3) { + output = ',' + input.substr(length - 3, 3) + output; + length -= 3; + } + + output = input.substr(0, length) + output; + + return output; +} + +export function trimHash(hash: string, length: number): string { + if (hash.length < length) { + return hash; + } + + const side = ((length - 2) / 2) | 0; + + return hash.substr(0, side) + '..' + hash.substr(-side, side); +} diff --git a/packages/frontend/tsconfig.json b/packages/frontend/tsconfig.json index 90cc54a..e972877 100644 --- a/packages/frontend/tsconfig.json +++ b/packages/frontend/tsconfig.json @@ -8,10 +8,7 @@ "sourceMap": true, "allowJs": true, "jsx": "react", - "rootDir": "src", - "paths": { - "@dotstats/common": [ "../common/src" ] - } + "rootDir": "src" }, "exclude": [ "node_modules", @@ -24,7 +21,6 @@ ], "include": [ "src/**/*.ts", - "src/**/*.tsx", - "../common/src/**/*.ts" + "src/**/*.tsx" ] } diff --git a/packages/frontend/tslint.json b/packages/frontend/tslint.json index fb9d741..02fdaa5 100644 --- a/packages/frontend/tslint.json +++ b/packages/frontend/tslint.json @@ -9,8 +9,10 @@ "rules": { "ordered-imports": false, "no-console": false, - "interface-name": false, "no-unused-variable": [true, {"ignore-pattern": "^_"}], - "no-empty": false + "no-empty": false, + "no-namespace": false, + "no-bitwise": false, + "interface-name": false } } diff --git a/scripts/start-backend.sh b/scripts/start-backend.sh index 294dcd8..49f4590 100755 --- a/scripts/start-backend.sh +++ b/scripts/start-backend.sh @@ -1,3 +1,3 @@ scripts/build-common.sh scripts/build-backend.sh -node packages/backend/build/backend/src/index.js +node packages/backend/build/index.js diff --git a/tsconfig.json b/tsconfig.json index 263b9a1..b895ea8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,7 @@ "outDir": "build", "sourceMap": true, "moduleResolution": "node", + "allowSyntheticDefaultImports": true, "noEmitOnError": false, "pretty": true, "forceConsistentCasingInFileNames": true, @@ -14,10 +15,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "suppressImplicitAnyIndexErrors": true, - "paths": { - "@dotstats/common": [ "packages/common/src" ] - } + "suppressImplicitAnyIndexErrors": true }, "typeRoots": [ "./node_modules/@types" diff --git a/yarn.lock b/yarn.lock index 418337a..0f16a8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,6 +16,10 @@ esutils "^2.0.2" js-tokens "^3.0.0" +"@tanem/svg-injector@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@tanem/svg-injector/-/svg-injector-1.2.1.tgz#3120e90246d0eb3c4fc6c61586a6f028a3c658ae" + "@types/body-parser@*": version "1.17.0" resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.17.0.tgz#9f5c9d9bd04bb54be32d5eb9fc0d8c974e6cf58c" @@ -72,6 +76,12 @@ "@types/node" "*" "@types/react" "*" +"@types/react-svg@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/react-svg/-/react-svg-3.0.0.tgz#ebbd0a095339ba20d9ba1d8fb3441eef9aeb5d11" + dependencies: + "@types/react" "*" + "@types/react@*", "@types/react@^16.3.17": version "16.4.2" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.4.2.tgz#f1a9cf1ee85221530def2ac26aee20f910a9dac8" @@ -5664,9 +5674,9 @@ react-dev-utils@^5.0.1: strip-ansi "3.0.1" text-table "0.2.0" -react-dom@^16.4.0: - version "16.4.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.4.1.tgz#7f8b0223b3a5fbe205116c56deb85de32685dad6" +react-dom@16.4.0: + version "16.4.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.4.0.tgz#099f067dd5827ce36a29eaf9a6cdc7cbf6216b1e" dependencies: fbjs "^0.8.16" loose-envify "^1.1.0" @@ -5721,9 +5731,15 @@ react-scripts-ts@2.16.0: optionalDependencies: fsevents "^1.1.3" -react@^16.4.0: - version "16.4.1" - resolved "https://registry.yarnpkg.com/react/-/react-16.4.1.tgz#de51ba5764b5dbcd1f9079037b862bd26b82fe32" +react-svg@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/react-svg/-/react-svg-4.1.1.tgz#6151831e6f03e1ef5a090c61b12c30aa48185425" + dependencies: + "@tanem/svg-injector" "^1.2.0" + +react@16.4.0: + version "16.4.0" + resolved "https://registry.yarnpkg.com/react/-/react-16.4.0.tgz#402c2db83335336fba1962c08b98c6272617d585" dependencies: fbjs "^0.8.16" loose-envify "^1.1.0"