-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π add draft of bossfight telemetry viewer (#258)
* π add boilerplate electron app for telemetry https://www.electronjs.org/docs/latest/tutorial/quick-start#scaffold-the-project * β add esbuild for bundling * π§ disable yarn pnp - it just causes problems man * β convert telemetry app to typescript * π¨ convert esbuild to watch script * β¨ decode bossfight root tag * β¨ decode bossfight events * π¨ add rebuild log * π rename `telemetry` -> `telemetry-old` * π add boilerplate electron-vite app - too many frameworks dawg * π update app logo * β¨ render event time ticks * π add dynamic heights to timestamps * π fix multiple timelines on same row - and increase width between ticks * β¨ show event datapoints and convert tick rate to be regular interval * β¨ add inspect on event click - just shows a rect for now * β¨ add inspect toggle * π adjust position of inspect box - top left corner of inspect is centered on event point * β¨ add data object and name on hover to inspect boxes * β»οΈ convert remove toggle check to guard clause * β¨ add color schema for events * β¨ add character icons for events * β¨ add name on hover for event points * πΈ disable opening empty inspect boxes * π add stop event icons - win - death - missing * π add more event icons * β¨ add horizontal zoom in/out * π₯ delete old telemetry dir * π update window title * β°οΈ remove redundant eslintignore entry * π fix root linter not ignoring telemetry dir - it should have its own linting (eventually?)
- Loading branch information
1 parent
9d732e8
commit b4ebb25
Showing
45 changed files
with
6,890 additions
and
15 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Ignore datapack/resourcepack | ||
datapacks | ||
resourcepack | ||
|
||
telemetry |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
|
||
# yarn dependencies | ||
.yarn | ||
.pnp* | ||
node_modules | ||
|
||
# auto-ajexport related | ||
**/last_exported_hashes.json | ||
|
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,3 +1,5 @@ | ||
# Ignore datapack/resourcepack | ||
datapacks | ||
resourcepack | ||
|
||
telemetry |
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,8 +1,5 @@ | ||
{ | ||
"search.exclude": { | ||
"**/.yarn": true, | ||
"**/.pnp.*": true | ||
}, | ||
"eslint.nodePath": ".yarn/sdks", | ||
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs" | ||
"**/.yarn": 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# save exact npm package by default when running `yarn add` | ||
defaultSemverRangePrefix: '' | ||
nodeLinker: node-modules |
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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = 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,4 @@ | ||
node_modules | ||
dist | ||
out | ||
.gitignore |
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,23 @@ | ||
module.exports = { | ||
parserOptions: { | ||
extraFileExtensions: ['.svelte'] | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:svelte/recommended', | ||
'@electron-toolkit/eslint-config-ts/recommended', | ||
'@electron-toolkit/eslint-config-prettier' | ||
], | ||
overrides: [ | ||
{ | ||
files: ['*.svelte'], | ||
parser: 'svelte-eslint-parser', | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser' | ||
} | ||
} | ||
], | ||
rules: { | ||
'svelte/no-unused-svelte-ignore': '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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
dist | ||
out | ||
.DS_Store | ||
*.log* |
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,6 @@ | ||
out | ||
dist | ||
pnpm-lock.yaml | ||
LICENSE.md | ||
tsconfig.json | ||
tsconfig.*.json |
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,10 @@ | ||
singleQuote: true | ||
semi: false | ||
printWidth: 100 | ||
trailingComma: none | ||
plugins: | ||
- prettier-plugin-svelte | ||
overrides: | ||
- files: '*.svelte' | ||
options: | ||
parser: svelte |
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,3 @@ | ||
{ | ||
"recommendations": ["dbaeumer.vscode-eslint"] | ||
} |
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,39 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug Main Process", | ||
"type": "node", | ||
"request": "launch", | ||
"cwd": "${workspaceRoot}", | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite", | ||
"windows": { | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd" | ||
}, | ||
"runtimeArgs": ["--sourcemap"], | ||
"env": { | ||
"REMOTE_DEBUGGING_PORT": "9222" | ||
} | ||
}, | ||
{ | ||
"name": "Debug Renderer Process", | ||
"port": 9222, | ||
"request": "attach", | ||
"type": "chrome", | ||
"webRoot": "${workspaceFolder}/src/renderer", | ||
"timeout": 60000, | ||
"presentation": { | ||
"hidden": true | ||
} | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Debug All", | ||
"configurations": ["Debug Main Process", "Debug Renderer Process"], | ||
"presentation": { | ||
"order": 1 | ||
} | ||
} | ||
] | ||
} |
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,20 @@ | ||
{ | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[svelte]": { | ||
"editor.defaultFormatter": "svelte.svelte-vscode" | ||
}, | ||
"svelte.enable-ts-plugin": true, | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"svelte" | ||
] | ||
} |
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,34 @@ | ||
# telemetry | ||
|
||
An Electron application with Svelte and TypeScript | ||
|
||
## Recommended IDE Setup | ||
|
||
- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) | ||
|
||
## Project Setup | ||
|
||
### Install | ||
|
||
```bash | ||
$ yarn | ||
``` | ||
|
||
### Development | ||
|
||
```bash | ||
$ yarn dev | ||
``` | ||
|
||
### Build | ||
|
||
```bash | ||
# For windows | ||
$ yarn build:win | ||
|
||
# For macOS | ||
$ yarn build:mac | ||
|
||
# For Linux | ||
$ yarn build:linux | ||
``` |
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,43 @@ | ||
appId: com.electron.app | ||
productName: telemetry | ||
directories: | ||
buildResources: build | ||
files: | ||
- '!**/.vscode/*' | ||
- '!src/*' | ||
- '!electron.vite.config.{js,ts,mjs,cjs}' | ||
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}' | ||
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}' | ||
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}' | ||
asarUnpack: | ||
- resources/** | ||
win: | ||
executableName: telemetry | ||
nsis: | ||
artifactName: ${name}-${version}-setup.${ext} | ||
shortcutName: ${productName} | ||
uninstallDisplayName: ${productName} | ||
createDesktopShortcut: always | ||
mac: | ||
entitlementsInherit: build/entitlements.mac.plist | ||
extendInfo: | ||
- NSCameraUsageDescription: Application requests access to the device's camera. | ||
- NSMicrophoneUsageDescription: Application requests access to the device's microphone. | ||
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. | ||
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. | ||
notarize: false | ||
dmg: | ||
artifactName: ${name}-${version}.${ext} | ||
linux: | ||
target: | ||
- AppImage | ||
- snap | ||
- deb | ||
maintainer: electronjs.org | ||
category: Utility | ||
appImage: | ||
artifactName: ${name}-${version}.${ext} | ||
npmRebuild: false | ||
publish: | ||
provider: generic | ||
url: https://example.com/auto-updates |
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,14 @@ | ||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite' | ||
import { svelte } from '@sveltejs/vite-plugin-svelte' | ||
|
||
export default defineConfig({ | ||
main: { | ||
plugins: [externalizeDepsPlugin()] | ||
}, | ||
preload: { | ||
plugins: [externalizeDepsPlugin()] | ||
}, | ||
renderer: { | ||
plugins: [svelte()] | ||
} | ||
}) |
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,50 @@ | ||
{ | ||
"name": "telemetry", | ||
"version": "1.0.0", | ||
"description": "An Electron application with Svelte and TypeScript", | ||
"main": "./out/main/index.js", | ||
"author": "example.com", | ||
"homepage": "https://electron-vite.org", | ||
"scripts": { | ||
"format": "prettier --plugin prettier-plugin-svelte --write .", | ||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix", | ||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false", | ||
"svelte-check": "svelte-check --tsconfig ./tsconfig.json", | ||
"typecheck": "npm run typecheck:node && npm run svelte-check", | ||
"start": "electron-vite preview", | ||
"dev": "electron-vite dev", | ||
"build": "npm run typecheck && electron-vite build", | ||
"postinstall": "electron-builder install-app-deps", | ||
"build:unpack": "npm run build && electron-builder --dir", | ||
"build:win": "npm run build && electron-builder --win", | ||
"build:mac": "npm run build && electron-builder --mac", | ||
"build:linux": "npm run build && electron-builder --linux" | ||
}, | ||
"dependencies": { | ||
"@electron-toolkit/preload": "^3.0.1", | ||
"@electron-toolkit/utils": "^3.0.0", | ||
"d3": "7.9.0", | ||
"json5": "2.2.3" | ||
}, | ||
"devDependencies": { | ||
"@electron-toolkit/eslint-config-prettier": "^2.0.0", | ||
"@electron-toolkit/eslint-config-ts": "^2.0.0", | ||
"@electron-toolkit/tsconfig": "^1.0.1", | ||
"@sveltejs/vite-plugin-svelte": "^3.1.1", | ||
"@types/d3": "7.4.3", | ||
"@types/json5": "2.2.0", | ||
"@types/node": "^20.14.8", | ||
"electron": "^31.0.2", | ||
"electron-builder": "^24.13.3", | ||
"electron-vite": "2.3.0", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-svelte": "^2.41.0", | ||
"prettier": "^3.3.2", | ||
"prettier-plugin-svelte": "^3.2.5", | ||
"svelte": "^4.2.18", | ||
"svelte-check": "^3.8.2", | ||
"tslib": "^2.6.3", | ||
"typescript": "^5.5.2", | ||
"vite": "^5.3.1" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.