Skip to content

Commit

Permalink
Squashed commit of the following: (#317)
Browse files Browse the repository at this point in the history
commit 5b7044e
Author: waynelwz <[email protected]>
Date:   Thu May 12 19:36:08 2022 +0800

    ci: revert test code

commit 78fd6ae
Author: waynelwz <[email protected]>
Date:   Thu May 12 19:30:20 2022 +0800

    ci: add types

commit 72ab2e4
Author: waynelwz <[email protected]>
Date:   Thu May 12 18:19:53 2022 +0800

    ci: upgrade eslint deps

commit 03a2970
Author: waynelwz <[email protected]>
Date:   Thu May 12 17:49:43 2022 +0800

    ci: test

commit 37d0668
Author: waynelwz <[email protected]>
Date:   Thu May 12 17:00:58 2022 +0800

    ci: test

commit ab2a082
Author: waynelwz <[email protected]>
Date:   Thu May 12 16:50:24 2022 +0800

    ci: test

commit 61d7057
Author: waynelwz <[email protected]>
Date:   Thu May 12 16:45:17 2022 +0800

    ci: test

commit ffa9b2a
Author: waynelwz <[email protected]>
Date:   Thu May 12 16:33:38 2022 +0800

    ci: test

commit b1de3d4
Author: waynelwz <[email protected]>
Date:   Thu May 12 16:32:37 2022 +0800

    ci: test

commit b03b658
Author: waynelwz <[email protected]>
Date:   Thu May 12 16:32:26 2022 +0800

    ci: test

commit 6f28a84
Author: waynelwz <[email protected]>
Date:   Wed May 11 15:38:52 2022 +0800

    fix: sth rong with github action disable for now

commit 6713394
Author: waynelwz <[email protected]>
Date:   Wed May 11 15:35:55 2022 +0800

    fix: tsc check test

commit 6aeb717
Author: waynelwz <[email protected]>
Date:   Wed May 11 15:11:45 2022 +0800

    fix: tsc check test

commit 906983a
Author: waynelwz <[email protected]>
Date:   Wed May 11 15:00:44 2022 +0800

    fix: tsc check error

commit de76e64
Author: waynelwz <[email protected]>
Date:   Wed May 11 14:56:57 2022 +0800

    fix: tsc check error

commit 43cd8a5
Author: waynelwz <[email protected]>
Date:   Wed May 11 14:47:35 2022 +0800

    Squashed commit of the following:

    commit fb6a119
    Author: waynelwz <[email protected]>
    Date:   Wed May 11 14:42:31 2022 +0800

        feat: realtime log proxy

        1. fix realtime log proxy
        2. custom lazylog support onScroll stop following when user scroll

    commit 813c092
    Author: waynelwz <[email protected]>
    Date:   Tue May 10 19:23:53 2022 +0800

        fix: api props changed / ws proxy error /add logo

    commit da19fe7
    Author: waynelwz <[email protected]>
    Date:   Tue May 10 17:56:16 2022 +0800

        fix: lazylog ws not work

    commit 45a7596
    Author: waynelwz <[email protected]>
    Date:   Tue May 10 11:13:43 2022 +0800

        chores: add ico, some kind of warnings

    commit e5dac3c
    Author: waynelwz <[email protected]>
    Date:   Mon May 9 13:47:30 2022 +0800

        chores: add hook deps

    commit 9275eb2
    Author: waynelwz <[email protected]>
    Date:   Mon May 9 11:53:50 2022 +0800

        fix: wrong job actions
  • Loading branch information
waynelwz authored May 13, 2022
1 parent e0b74a3 commit 7dc71b7
Show file tree
Hide file tree
Showing 17 changed files with 369 additions and 20 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/console.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: |
echo "::set-output name=dir::"
yarn cache dir
- name: Install yarn
working-directory: ./console
Expand Down
16 changes: 8 additions & 8 deletions console/craco.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
const path = require('path')
const webpack = require('webpack')
const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin')
const CracoEsbuildPlugin = require('craco-esbuild');
const CracoEsbuildPlugin = require('craco-esbuild')

module.exports = {
plugins: [
{ plugin: CracoEsbuildPlugin },
],
plugins: [{ plugin: CracoEsbuildPlugin }],
webpack: {
alias: {
'@user': path.resolve(__dirname, 'src/domain/user'),
Expand All @@ -21,15 +19,17 @@ module.exports = {
new SimpleProgressWebpackPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
})
'process.env.DEBUG': JSON.stringify(process.env.DEBUG),
'process.env.PROXY': JSON.stringify(process.env.PROXY),
}),
],
configure: (webpackConfig, { env, paths }) => {
// https://github.com/pmndrs/react-spring/issues/1078#issuecomment-752143468
webpackConfig.module.rules.push({
test: /react-spring/,
test: /react-spring/,
sideEffects: true,
})
return webpackConfig
}
}
},
},
}
7 changes: 4 additions & 3 deletions console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"styletron-react": "^6.0.1",
"ts-auto-mock": "^3.5.0",
"tsconfig-paths-webpack-plugin": "^3.5.2",
"typescript": "4.6.4",
"typescript": "^4.6.4",
"uuid": "^8.3.2",
"web-vitals": "^1.0.1",
"xterm": "^4.14.1",
Expand Down Expand Up @@ -129,8 +129,9 @@
"@storybook/addon-links": "^6.4.19",
"@storybook/node-logger": "^6.4.19",
"@storybook/preset-create-react-app": "^3.2.0",
"@typescript-eslint/eslint-plugin": "^4.29.0",
"@typescript-eslint/parser": "^4.29.0",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
"@typescript-eslint/typescript-estree": "^5.23.0",
"babel-eslint": "^10.1.0",
"craco-esbuild": "^0.3.3",
"eslint": "^7.32.0",
Expand Down
3 changes: 2 additions & 1 deletion console/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
"noEmit": true,
"jsx": "react",
"typeRoots": [
"./@types",
"./types",
"./node_modules/@types",
]
},
"include": [
"src",
"types"
],
"exclude": [
"src/stories",
Expand Down
21 changes: 21 additions & 0 deletions console/types/react-lazylog/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
16 changes: 16 additions & 0 deletions console/types/react-lazylog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/react-lazylog`
# Summary
This package contains type definitions for react-lazylog (https://github.com/mozilla-frontend-infra/react-lazylog).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-lazylog.

### Additional Details
* Last updated: Sun, 26 Apr 2020 17:12:32 GMT
* Dependencies: [@types/react](https://npmjs.com/package/@types/react), [@types/immutable](https://npmjs.com/package/@types/immutable)
* Global values: none

# Credits
These definitions were written by [Benjamin Romano](https://github.com/benjaminRomano), and [Adam Bouqdib](https://github.com/abemedia).
17 changes: 17 additions & 0 deletions console/types/react-lazylog/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Type definitions for react-lazylog 4.5
// Project: https://github.com/mozilla-frontend-infra/react-lazylog
// Definitions by: Benjamin Romano <https://github.com/benjaminRomano>
// Adam Bouqdib <https://github.com/abemedia>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

declare module 'react-lazylog' {
export * from 'types/react-lazylog/libs/LazyLog'
export * from 'types/react-lazylog//libs/Line'
export * from 'types/react-lazylog//libs/LineContent'
export * from 'types/react-lazylog//libs/LineNumber'
export * from 'types/react-lazylog//libs/LinePart'
export * from 'types/react-lazylog//libs/Loading'
export * from 'types/react-lazylog//libs/ScrollFollow'
export * from 'types/react-lazylog//libs/SearchBar'
}
50 changes: 50 additions & 0 deletions console/types/react-lazylog/libs/LazyLog.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/* eslint-disable react/static-property-placement */
/* eslint-disable react/prefer-stateless-function */
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Component, ReactNode, CSSProperties } from 'react'
import { Range } from 'immutable'

export interface WebsocketOptions {
onOpen?: (e: Event, socket: WebSocket) => void
onClose?: (e: CloseEvent) => void
onError?: (e: Event) => void
formatMessage?: (message: any) => string
}

export interface LazyLogProps {
caseInsensitive?: boolean
containerStyle?: CSSProperties
enableSearch?: boolean
extraLines?: number
fetchOptions?: RequestInit
follow?: boolean
formatPart?: (text: string) => ReactNode
height?: string | number
highlight?: number | number[]
highlightLineClassName?: string
lineClassName?: string
loadingComponent?: any
onError?: (error: any) => any
onHighlight?: (range: Range) => any
onLoad?: () => any
overscanRowCount?: number
rowHeight?: number
scrollToLine?: number
selectableLines?: boolean
stream?: boolean
style?: CSSProperties
text?: string
url: string
websocket?: boolean
websocketOptions?: WebsocketOptions
width?: string | number
onScroll: (params: { clientHeight: number; scrollHeight: number; scrollTop: number }) => void
}

export class LazyLog extends Component<LazyLogProps> {
static defaultProps: Partial<LazyLogProps>
}

export default LazyLog
26 changes: 26 additions & 0 deletions console/types/react-lazylog/libs/Line.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable react/static-property-placement */
/* eslint-disable react/prefer-stateless-function */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable import/no-extraneous-dependencies */
import { Component, ReactNode, CSSProperties, MouseEventHandler } from 'react'

export interface LineProps {
data: Array<{ text: string }>
number: number
rowHeight: number
highlight?: boolean
selectable?: boolean
style?: CSSProperties
formatPart?: (text: string) => ReactNode
onLineNumberClick?: MouseEventHandler<HTMLAnchorElement>

/**
* This is never called
* https://github.com/mozilla-frontend-infra/react-lazylog/issues/18
*/
onRowClick?: () => any
}

export default class Line extends Component<LineProps> {
static defaultProps: Partial<LineProps>
}
16 changes: 16 additions & 0 deletions console/types/react-lazylog/libs/LineContent.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* eslint-disable react/static-property-placement */
/* eslint-disable react/prefer-stateless-function */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable import/no-extraneous-dependencies */
import { Component, ReactNode, CSSProperties } from 'react'

export interface LineContentProps {
data: Array<{ text: string }>
number: number
formatPart?: (text: string) => ReactNode
style?: CSSProperties
}

export default class LineContent extends Component<LineContentProps> {
static defaultProps: Partial<LineContentProps>
}
17 changes: 17 additions & 0 deletions console/types/react-lazylog/libs/LineNumber.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable react/static-property-placement */
/* eslint-disable react/prefer-stateless-function */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable import/no-extraneous-dependencies */
import { Component, ReactNode, CSSProperties, MouseEventHandler } from 'react'

export interface LineNumberProps {
number: number
highlight?: boolean
onClick?: MouseEventHandler<HTMLAnchorElement>
style?: CSSProperties
}

export default class LinePart extends Component<LineNumberProps> {
static defaultProps: Partial<LineNumberProps>
}
16 changes: 16 additions & 0 deletions console/types/react-lazylog/libs/LinePart.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable react/static-property-placement */
/* eslint-disable react/prefer-stateless-function */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable import/no-extraneous-dependencies */
import { Component, ReactNode, CSSProperties } from 'react'

export interface LinePartProps {
part: { text: string }
format?: (text: string) => ReactNode
style?: CSSProperties
}

export default class LinePart extends Component<LinePartProps> {
static defaultProps: Partial<LinePartProps>
}
8 changes: 8 additions & 0 deletions console/types/react-lazylog/libs/Loading.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable react/static-property-placement */
/* eslint-disable react/prefer-stateless-function */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable import/no-extraneous-dependencies */
import { Component } from 'react'

export default class Loading extends Component {}
22 changes: 22 additions & 0 deletions console/types/react-lazylog/libs/ScrollFollow.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable react/static-property-placement */
/* eslint-disable react/prefer-stateless-function */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable import/no-extraneous-dependencies */
import { Component, ReactNode } from 'react'

export interface ScrollFollowRenderProps {
onScroll: (args: { scrollTop: number; scrollHeight: number; clientHeight: number }) => void
follow: boolean
startFollowing: () => void
stopFollowing: () => void
}

export interface ScrollFollowProps {
render: (props: ScrollFollowRenderProps) => ReactNode
startFollowing?: boolean
}

export class ScrollFollow extends Component<ScrollFollowProps> {}

export default ScrollFollow
19 changes: 19 additions & 0 deletions console/types/react-lazylog/libs/SearchBar.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable react/static-property-placement */
/* eslint-disable react/prefer-stateless-function */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable import/no-extraneous-dependencies */
import { Component, ReactNode, CSSProperties } from 'react'

export interface SearchBarProps {
onSearch?: (keyword: string) => void
onClearSearch?: () => void
onFilterLinesWithMatches?: (isFiltered: boolean) => void
resultsCount?: number
filterActive?: boolean
disabled?: boolean
}

export default class SearchBar extends Component<SearchBarProps> {
static defaultProps: Partial<SearchBarProps>
}
32 changes: 32 additions & 0 deletions console/types/react-lazylog/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@types/react-lazylog",
"version": "4.5.0",
"description": "TypeScript definitions for react-lazylog",
"license": "MIT",
"contributors": [
{
"name": "Benjamin Romano",
"url": "https://github.com/benjaminRomano",
"githubUsername": "benjaminRomano"
},
{
"name": "Adam Bouqdib",
"url": "https://github.com/abemedia",
"githubUsername": "abemedia"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/react-lazylog"
},
"scripts": {},
"dependencies": {
"@types/react": "*",
"immutable": ">=3.8.2"
},
"typesPublisherContentHash": "ae82f9f61b43522629fa73d269f639e3f0dabdc89f14fdb65cdabbe4e91e8faa",
"typeScriptVersion": "2.8"
}
Loading

0 comments on commit 7dc71b7

Please sign in to comment.