-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
joybox
committed
Mar 1, 2022
1 parent
be5a97a
commit 173aadc
Showing
97 changed files
with
26,867 additions
and
5,018 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/javascript-node/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Node.js version: 16, 14, 12 | ||
ARG VARIANT="16-buster" | ||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> | ||
|
||
# [Optional] Uncomment if you want to install an additional version of node using nvm | ||
# ARG EXTRA_NODE_VERSION=10 | ||
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" | ||
|
||
# [Optional] Uncomment if you want to install more global node modules | ||
# RUN su node -c "npm install -g <your-package-list-here>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/javascript-node | ||
{ | ||
"name": "Node.js", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
// Update 'VARIANT' to pick a Node version: 12, 14, 16 | ||
"args": { "VARIANT": "16" } | ||
}, | ||
"forwardPorts": [3000], | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": {}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint" | ||
], | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "yarn install", | ||
|
||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "node" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[*.{js,jsx,ts,tsx,vue}] | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true | ||
}, | ||
extends: [ | ||
'plugin:vue/essential', | ||
'@vue/standard', | ||
'@vue/typescript/recommended' | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2020 | ||
}, | ||
rules: { | ||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
"semi": ["error", "always"], | ||
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}], | ||
"operator-linebreak": ["error", "after"], | ||
"indent": "off", | ||
'@typescript-eslint/indent': [ | ||
'error', | ||
2 | ||
], | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"no-empty-function": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"no-useless-constructor": "off", | ||
"no-unused-expressions": "off", | ||
"promise/param-names": "off", | ||
"@typescript-eslint/no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }], | ||
"prefer-promise-reject-errors": ["error", {"allowEmptyReject": true}], | ||
"@typescript-eslint/no-non-null-assertion": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,4 @@ yarn-error.log* | |
/backend/out/ | ||
/src/**/*.js | ||
/src/**/*.js.map | ||
/client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,121 +1,147 @@ | ||
export type Exact<T, D> = T extends D ? | ||
Exclude<keyof T, keyof D> extends never ? | ||
Exclude<keyof T, keyof D> extends never ? | ||
T : never : never; | ||
|
||
export interface Plugin { | ||
id: number; | ||
name: string; | ||
enabled: boolean; | ||
id: number; | ||
name: string; | ||
enabled: boolean; | ||
} | ||
|
||
export type PluginState = [number, boolean]; | ||
export type ReorderPluginInfo = [number, number]; | ||
export type ReorderObservablePluginInfo = [string, number, number]; | ||
export type ArchiveTagAction = [string, string]; | ||
export type UpdateObservableDownload = [string, number]; | ||
export type UpdateObservableValidity = [string, boolean]; | ||
|
||
export interface Stream { | ||
uri: string; | ||
lastSeen: number; | ||
plugins: Plugin[]; | ||
uri: string; | ||
lastSeen: number; | ||
download: number; | ||
valid: boolean; | ||
plugins: Plugin[]; | ||
} | ||
|
||
export interface RecordingProgressId { | ||
label: string; | ||
label: string; | ||
} | ||
|
||
export interface RecordingProgressInit extends RecordingProgressId { | ||
streamUrl: string; | ||
streamUrl: string; | ||
} | ||
|
||
export interface RecordingProgressUpdate extends RecordingProgressId { | ||
time: number; | ||
bitrate: number; | ||
size: number; | ||
paused: boolean; | ||
time: number; | ||
bitrate: number; | ||
size: number; | ||
paused: boolean; | ||
} | ||
|
||
export interface RecordingProgressInfo extends RecordingProgressUpdate, RecordingProgressInit { } | ||
|
||
export interface Streamer { | ||
uri: string; | ||
lastSeen: number; | ||
plugins: string[]; | ||
uri: string; | ||
lastSeen: number; | ||
download: number; | ||
valid: boolean; | ||
plugins: string[]; | ||
} | ||
|
||
export interface ArchiveRecord { | ||
title: string; | ||
source: string; | ||
timestamp: number; | ||
duration: number; | ||
size: number; | ||
filename: string; | ||
locked: boolean; | ||
tags: Set<string>; | ||
title: string; | ||
source: string; | ||
timestamp: number; | ||
duration: number; | ||
size: number; | ||
reencoded: boolean; | ||
filename: string; | ||
locked: boolean; | ||
tags: Set<string>; | ||
} | ||
|
||
export type SerializedArchiveRecord = Omit<ArchiveRecord, 'tags'> & { tags: string[] }; | ||
|
||
export type SerializedFileRecord = Omit<FileRecord, 'tags'> & { tags: string[] }; | ||
type second = number; | ||
|
||
export interface SystemMonitorInfo { | ||
cpu: number; | ||
rss: number; | ||
hdd: number; | ||
export interface PlaylistSegment { | ||
filename: string; | ||
begin: second; | ||
end: second; | ||
loop: number; | ||
} | ||
|
||
export interface AppStateSnapshot { | ||
observables: Streamer[]; | ||
plugins: Plugin[]; | ||
archiveFilters: Filter[]; | ||
observablesFilters: Filter[]; | ||
archive: SerializedArchiveRecord[]; | ||
clipProgress: ClipProgressState[]; | ||
activeRecords: RecordingProgressInfo[]; | ||
systemResources: SystemMonitorInfo; | ||
startTime: number; | ||
defaultAccess: AppAccessType; | ||
storageQuota: number; | ||
instanceQuota: number; | ||
downloadSpeedQuota: number; | ||
export interface Playlist { | ||
id: number; | ||
title: string; | ||
timestamp: number; | ||
segments: PlaylistSegment[]; | ||
} | ||
|
||
export interface FileRecord extends ArchiveRecord { | ||
thumbnail: string; | ||
thumbnail: string; | ||
} | ||
|
||
export type SerializedArchiveRecord = Omit<ArchiveRecord, 'tags'> & { tags: string[] }; | ||
|
||
export type SerializedFileRecord = Omit<FileRecord, 'tags'> & { tags: string[] }; | ||
|
||
export interface SystemMonitorInfo { | ||
cpu: number; | ||
rss: number; | ||
hdd: number; | ||
} | ||
|
||
export interface ClipProgressInit { | ||
label: string; | ||
duration: number; // seconds | ||
label: string; | ||
duration: number; // seconds | ||
} | ||
|
||
export interface ClipProgress { | ||
label: string; | ||
progress: number; | ||
eta: number; | ||
label: string; | ||
progress: number; | ||
eta: number; | ||
} | ||
|
||
export type ClipProgressState = ClipProgressInit & ClipProgress; | ||
|
||
export interface LastSeenInfo { | ||
url: string; | ||
lastSeen: number; | ||
url: string; | ||
lastSeen: number; | ||
} | ||
|
||
export interface SystemInfo { | ||
cpu: number; | ||
rss: number; | ||
hdd: number; | ||
cpu: number; | ||
rss: number; | ||
hdd: number; | ||
} | ||
|
||
export interface LogItem { | ||
timestamp: number; | ||
message: string; | ||
timestamp: number; | ||
message: string; | ||
} | ||
|
||
export enum AppAccessType { NO_ACCESS, VIEW_ACCESS, FULL_ACCESS } | ||
|
||
export interface Filter { | ||
id: number; | ||
name: string; | ||
query: string; | ||
id: number; | ||
name: string; | ||
query: string; | ||
} | ||
|
||
export interface AppStateSnapshot { | ||
observables: Streamer[]; | ||
plugins: Plugin[]; | ||
archiveFilters: Filter[]; | ||
observablesFilters: Filter[]; | ||
archive: SerializedArchiveRecord[]; | ||
playlists: Playlist[]; | ||
clipProgress: ClipProgressState[]; | ||
activeRecords: RecordingProgressInfo[]; | ||
systemResources: SystemMonitorInfo; | ||
startTime: number; | ||
defaultAccess: AppAccessType; | ||
storageQuota: number; | ||
instanceQuota: number; | ||
downloadSpeedQuota: number; | ||
} | ||
|
||
export enum NotificationType { NewRecord, SizeQuota } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.