Skip to content

Commit 4bcf2aa

Browse files
committed
feat: initial trace-ui
1 parent 161a082 commit 4bcf2aa

16 files changed

Lines changed: 2405 additions & 1 deletion

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "Duron",
33
"image": "mcr.microsoft.com/devcontainers/python:2-3",
44
"features": {
5+
"ghcr.io/devcontainers/features/node:1": {},
56
"ghcr.io/devcontainers-extra/features/nox:2": {},
67
"ghcr.io/devcontainers-extra/features/uv:1": {}
78
},
@@ -13,7 +14,7 @@
1314
"python.terminal.activateEnvInCurrentTerminal": true,
1415
"python.defaultInterpreterPath": ".venv/bin/python"
1516
},
16-
"extensions": []
17+
"extensions": ["ms-python.python", "svelte.svelte-vscode"]
1718
}
1819
}
1920
}

.github/workflows/ci.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,30 @@ jobs:
3838
run: uv run mypy
3939
- name: Run basedpyright
4040
run: uv run basedpyright
41+
42+
trace-ui:
43+
runs-on: ubuntu-latest
44+
defaults:
45+
run:
46+
working-directory: trace-ui
47+
48+
steps:
49+
- uses: actions/checkout@v5
50+
- name: Install pnpm
51+
uses: pnpm/action-setup@v4
52+
with:
53+
package_json_file: "trace-ui/package.json"
54+
- name: Set up Node.js
55+
uses: actions/setup-node@v5
56+
with:
57+
node-version: latest
58+
cache: "pnpm"
59+
cache-dependency-path: "trace-ui/pnpm-lock.yaml"
60+
- name: Install dependencies
61+
run: pnpm install --frozen-lockfile
62+
- name: Run lint
63+
run: pnpm run lint
64+
- name: Run check
65+
run: pnpm run check
66+
- name: Run build
67+
run: pnpm run build

flake.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
devShells = {
3838
default = pkgs.mkShell {
3939
buildInputs = with pkgs; [
40+
pnpm
41+
nodejs
4042
(python3.withPackages (
4143
p: with p; [
4244
nox
@@ -57,6 +59,11 @@
5759
ruff-format.enable = true;
5860
prettier.enable = true;
5961
};
62+
settings.formatter = {
63+
prettier = {
64+
excludes = [ "trace-ui/*" ];
65+
};
66+
};
6067
};
6168
};
6269
};

trace-ui/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/dist

trace-ui/.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/pnpm-lock.yaml

trace-ui/.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"plugins": ["prettier-plugin-svelte"],
3+
"overrides": [
4+
{
5+
"files": "*.svelte",
6+
"options": {
7+
"parser": "svelte"
8+
}
9+
}
10+
]
11+
}

trace-ui/eslint.config.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import prettier from "eslint-config-prettier";
2+
import { fileURLToPath } from "node:url";
3+
import { includeIgnoreFile } from "@eslint/compat";
4+
import js from "@eslint/js";
5+
import svelte from "eslint-plugin-svelte";
6+
import { defineConfig } from "eslint/config";
7+
import globals from "globals";
8+
import ts from "typescript-eslint";
9+
import svelteConfig from "./svelte.config.js";
10+
11+
const gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url));
12+
13+
export default defineConfig(
14+
includeIgnoreFile(gitignorePath),
15+
js.configs.recommended,
16+
...ts.configs.recommended,
17+
...svelte.configs.recommended,
18+
prettier,
19+
...svelte.configs.prettier,
20+
{
21+
languageOptions: {
22+
globals: { ...globals.browser, ...globals.node },
23+
},
24+
rules: { "no-undef": "off" },
25+
},
26+
{
27+
files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
28+
languageOptions: {
29+
parserOptions: {
30+
projectService: true,
31+
extraFileExtensions: [".svelte"],
32+
parser: ts.parser,
33+
svelteConfig,
34+
},
35+
},
36+
},
37+
);

trace-ui/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>trace-ui</title>
8+
</head>
9+
<body>
10+
<my-element>
11+
<p>This is some slotted content</p>
12+
</my-element>
13+
<script type="module" src="/src/main.ts"></script>
14+
</body>
15+
</html>

trace-ui/package.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "duron-trace-ui",
3+
"version": "0.0.1",
4+
"license": "Apache-2.0",
5+
"packageManager": "pnpm@10.18.2",
6+
"type": "module",
7+
"scripts": {
8+
"dev": "vite",
9+
"build": "vite build",
10+
"preview": "vite preview",
11+
"format": "prettier --write .",
12+
"check": "svelte-check",
13+
"lint": "prettier --check . && eslint ."
14+
},
15+
"devDependencies": {
16+
"@eslint/compat": "^1.4.0",
17+
"@eslint/js": "^9.37.0",
18+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
19+
"@tsconfig/svelte": "^5.0.5",
20+
"@types/node": "^24.7.1",
21+
"eslint": "^9.37.0",
22+
"eslint-config-prettier": "^10.1.8",
23+
"eslint-plugin-svelte": "^3.12.4",
24+
"globals": "^16.4.0",
25+
"open-props": "^1.7.16",
26+
"prettier": "^3.6.2",
27+
"prettier-plugin-svelte": "^3.4.0",
28+
"svelte": "^5.39.11",
29+
"svelte-check": "^4.3.3",
30+
"typescript": "~5.9.3",
31+
"typescript-eslint": "^8.46.0",
32+
"vite": "^7.1.9"
33+
},
34+
"pnpm": {
35+
"onlyBuiltDependencies": [
36+
"esbuild"
37+
]
38+
}
39+
}

0 commit comments

Comments
 (0)