fix: just dev-all support windows

This commit is contained in:
master 2025-06-05 02:44:23 +08:00
parent 082e08e7f4
commit c669d66969
10 changed files with 171 additions and 243 deletions

View File

@ -1,6 +1,5 @@
{
"npm.packageManager": "pnpm",
"rust-analyzer.showUnlinkedFileNotification": false,
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.formatOnSave": true
@ -28,10 +27,7 @@
"emmet.showExpandedAbbreviation": "never",
"prettier.enable": false,
"typescript.tsdk": "node_modules/typescript/lib",
"rust-analyzer.cargo.features": [
"testcontainers",
"playground"
],
"rust-analyzer.showUnlinkedFileNotification": false,
"sqltools.connections": [
{
"previewLimit": 50,
@ -42,5 +38,8 @@
"database": "konobangu",
"username": "konobangu"
}
],
"rust-analyzer.cargo.extraArgs": [
"--all-features"
]
}

158
Cargo.lock generated
View File

@ -932,21 +932,6 @@ dependencies = [
"walkdir",
]
[[package]]
name = "cassowary"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
[[package]]
name = "castaway"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5"
dependencies = [
"rustversion",
]
[[package]]
name = "cc"
version = "1.2.26"
@ -1168,20 +1153,6 @@ dependencies = [
"libc",
]
[[package]]
name = "compact_str"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32"
dependencies = [
"castaway",
"cfg-if",
"itoa",
"rustversion",
"ryu",
"static_assertions",
]
[[package]]
name = "concurrent-queue"
version = "2.5.0"
@ -1400,22 +1371,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "crossterm"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
dependencies = [
"bitflags 2.9.1",
"crossterm_winapi",
"mio 1.0.4",
"parking_lot 0.12.4",
"rustix 0.38.44",
"signal-hook",
"signal-hook-mio",
"winapi",
]
[[package]]
name = "crossterm_winapi"
version = "0.9.1"
@ -1713,17 +1668,6 @@ version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04"
[[package]]
name = "dev-tui"
version = "0.1.0"
dependencies = [
"color-eyre",
"ratatui",
"serde",
"serde_json",
"tokio",
]
[[package]]
name = "digest"
version = "0.9.0"
@ -2407,7 +2351,7 @@ version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
dependencies = [
"unicode-width 0.1.14",
"unicode-width",
]
[[package]]
@ -3087,12 +3031,6 @@ dependencies = [
"serde",
]
[[package]]
name = "indoc"
version = "2.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
[[package]]
name = "inherent"
version = "1.0.12"
@ -3146,14 +3084,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a"
dependencies = [
"bitflags 2.9.1",
"crossterm 0.25.0",
"crossterm",
"dyn-clone",
"fuzzy-matcher",
"fxhash",
"newline-converter",
"once_cell",
"unicode-segmentation",
"unicode-width 0.1.14",
"unicode-width",
]
[[package]]
@ -3172,19 +3110,6 @@ dependencies = [
"toml 0.5.11",
]
[[package]]
name = "instability"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bf9fed6d91cfb734e7476a06bde8300a1b94e217e1b523b6f0cd1a01998c71d"
dependencies = [
"darling",
"indoc",
"proc-macro2",
"quote",
"syn 2.0.101",
]
[[package]]
name = "instant"
version = "0.1.13"
@ -3252,15 +3177,6 @@ dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.14.0"
@ -3769,12 +3685,6 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "linux-raw-sys"
version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
[[package]]
name = "linux-raw-sys"
version = "0.9.4"
@ -3961,7 +3871,7 @@ dependencies = [
"miette-derive",
"once_cell",
"thiserror 1.0.69",
"unicode-width 0.1.14",
"unicode-width",
]
[[package]]
@ -5248,27 +5158,6 @@ dependencies = [
"getrandom 0.3.3",
]
[[package]]
name = "ratatui"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b"
dependencies = [
"bitflags 2.9.1",
"cassowary",
"compact_str",
"crossterm 0.28.1",
"indoc",
"instability",
"itertools 0.13.0",
"lru",
"paste",
"strum",
"unicode-segmentation",
"unicode-truncate",
"unicode-width 0.2.0",
]
[[package]]
name = "raw-cpuid"
version = "11.5.0"
@ -5422,7 +5311,7 @@ checksum = "78c81d000a2c524133cc00d2f92f019d399e57906c3b7119271a2495354fe895"
dependencies = [
"cfg-if",
"libc",
"rustix 1.0.7",
"rustix",
"windows 0.61.1",
]
@ -5781,19 +5670,6 @@ dependencies = [
"semver",
]
[[package]]
name = "rustix"
version = "0.38.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
"bitflags 2.9.1",
"errno",
"libc",
"linux-raw-sys 0.4.15",
"windows-sys 0.59.0",
]
[[package]]
name = "rustix"
version = "1.0.7"
@ -5803,7 +5679,7 @@ dependencies = [
"bitflags 2.9.1",
"errno",
"libc",
"linux-raw-sys 0.9.4",
"linux-raw-sys",
"windows-sys 0.59.0",
]
@ -6452,7 +6328,6 @@ checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd"
dependencies = [
"libc",
"mio 0.8.11",
"mio 1.0.4",
"signal-hook",
]
@ -7026,7 +6901,7 @@ dependencies = [
"fastrand",
"getrandom 0.3.3",
"once_cell",
"rustix 1.0.7",
"rustix",
"windows-sys 0.59.0",
]
@ -7742,29 +7617,12 @@ version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
[[package]]
name = "unicode-truncate"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf"
dependencies = [
"itertools 0.13.0",
"unicode-segmentation",
"unicode-width 0.1.14",
]
[[package]]
name = "unicode-width"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
[[package]]
name = "unicode-width"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
[[package]]
name = "universal-hash"
version = "0.5.1"
@ -8416,7 +8274,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d65cbf2f12c15564212d48f4e3dfb87923d25d611f2aed18f4cb23f0413d89e"
dependencies = [
"libc",
"rustix 1.0.7",
"rustix",
]
[[package]]

View File

@ -8,7 +8,6 @@ members = [
"packages/fetch",
"packages/downloader",
"apps/recorder",
"apps/dev-tui",
]
resolver = "2"

View File

@ -1,11 +0,0 @@
[package]
name = "dev-tui"
version = "0.1.0"
edition = "2024"
[dependencies]
color-eyre = "0.6.5"
ratatui = "0.29"
tokio = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }

View File

@ -1,26 +0,0 @@
use ratatui::{ DefaultTerminal, Frame, crossterm::{ event::{self, Event} } };
#[tokio::main]
async fn main() -> color_eyre::Result<()> {
color_eyre::install()?;
let terminal = ratatui::init();
let result = run(terminal);
ratatui::restore();
result
}
fn run(mut terminal: DefaultTerminal) -> color_eyre::Result<()> {
loop {
terminal.draw(render)?;
if matches!(event::read()?, Event::Key(_)) {
break Ok(());
}
}
}
fn render(frame: &mut Frame) {
frame.render_widget("hello world", frame.area());
}

12
dev.kdl
View File

@ -21,13 +21,13 @@ layout {
children
}
tab name="WebUI" {
pane command="pnpm" {
args "run" "--filter=webui" "dev"
pane command="just" {
args "dev-webui"
}
}
tab name="Proxy" {
pane command="pnpm" {
args "run" "--filter=proxy" "dev"
pane command="just" {
args "dev-proxy"
}
}
tab name="Recorder" {
@ -36,8 +36,8 @@ layout {
}
}
tab name="Deps" {
pane command="docker" {
args "compose" "-f" "devdeps.compose.yaml" "up"
pane command="just" {
args "dev-deps"
}
}
tab name="Codegen" {

View File

@ -31,9 +31,14 @@ dev-deps-clean:
dev-codegen:
pnpm run --filter=webui codegen
[unix]
dev-all:
zellij --layout dev.kdl
[windows]
dev-all:
pnpm run dev-all
dev-codegen-wait:
@until nc -z localhost 5001; do echo "Waiting for Recorder..."; sleep 1; done
pnpm run --filter=webui codegen-watch

View File

@ -3,15 +3,18 @@
"version": "0.0.0",
"description": "Kono bangumi?",
"license": "MIT",
"workspaces": [
"packages/*",
"apps/*"
],
"workspaces": ["packages/*", "apps/*"],
"repository": {
"type": "git",
"url": "https://github.com/dumtruck/konobangu.git"
},
"scripts": {
"dev-webui": "just dev-webui",
"dev-proxy": "just dev-proxy",
"dev-recorder": "just dev-recorder",
"dev-deps": "just dev-deps",
"dev-codegen-wait": "just dev-codegen-wait",
"dev-all": "turbo run //#dev-recorder //#dev-proxy //#dev-webui //#dev-deps //#dev-codegen-wait",
"lint": "ultracite lint",
"format": "ultracite format",
"bump-deps": "npx --yes npm-check-updates --deep -u -x react-day-picker && pnpm install",
@ -27,6 +30,7 @@
"@biomejs/biome": "1.9.4",
"@types/node": "^22.15.29",
"tsx": "^4.19.4",
"turbo": "^2.5.4",
"typescript": "^5.8.3",
"ultracite": "^4.2.8"
}

64
pnpm-lock.yaml generated
View File

@ -23,6 +23,9 @@ importers:
tsx:
specifier: ^4.19.4
version: 4.19.4
turbo:
specifier: ^2.5.4
version: 2.5.4
typescript:
specifier: ^5.8.3
version: 5.8.3
@ -6815,6 +6818,40 @@ packages:
engines: {node: '>=18.0.0'}
hasBin: true
turbo-darwin-64@2.5.4:
resolution: {integrity: sha512-ah6YnH2dErojhFooxEzmvsoZQTMImaruZhFPfMKPBq8sb+hALRdvBNLqfc8NWlZq576FkfRZ/MSi4SHvVFT9PQ==}
cpu: [x64]
os: [darwin]
turbo-darwin-arm64@2.5.4:
resolution: {integrity: sha512-2+Nx6LAyuXw2MdXb7pxqle3MYignLvS7OwtsP9SgtSBaMlnNlxl9BovzqdYAgkUW3AsYiQMJ/wBRb7d+xemM5A==}
cpu: [arm64]
os: [darwin]
turbo-linux-64@2.5.4:
resolution: {integrity: sha512-5May2kjWbc8w4XxswGAl74GZ5eM4Gr6IiroqdLhXeXyfvWEdm2mFYCSWOzz0/z5cAgqyGidF1jt1qzUR8hTmOA==}
cpu: [x64]
os: [linux]
turbo-linux-arm64@2.5.4:
resolution: {integrity: sha512-/2yqFaS3TbfxV3P5yG2JUI79P7OUQKOUvAnx4MV9Bdz6jqHsHwc9WZPpO4QseQm+NvmgY6ICORnoVPODxGUiJg==}
cpu: [arm64]
os: [linux]
turbo-windows-64@2.5.4:
resolution: {integrity: sha512-EQUO4SmaCDhO6zYohxIjJpOKRN3wlfU7jMAj3CgcyTPvQR/UFLEKAYHqJOnJtymbQmiiM/ihX6c6W6Uq0yC7mA==}
cpu: [x64]
os: [win32]
turbo-windows-arm64@2.5.4:
resolution: {integrity: sha512-oQ8RrK1VS8lrxkLriotFq+PiF7iiGgkZtfLKF4DDKsmdbPo0O9R2mQxm7jHLuXraRCuIQDWMIw6dpcr7Iykf4A==}
cpu: [arm64]
os: [win32]
turbo@2.5.4:
resolution: {integrity: sha512-kc8ZibdRcuWUG1pbYSBFWqmIjynlD8Lp7IB6U3vIzvOv9VG+6Sp8bzyeBWE3Oi8XV5KsQrznyRTBPvrf99E4mA==}
hasBin: true
tw-animate-css@1.3.4:
resolution: {integrity: sha512-dd1Ht6/YQHcNbq0znIT6dG8uhO7Ce+VIIhZUhjsryXsMPJQz3bZg7Q2eNzLwipb25bRZslGb2myio5mScd1TFg==}
@ -14324,6 +14361,33 @@ snapshots:
optionalDependencies:
fsevents: 2.3.3
turbo-darwin-64@2.5.4:
optional: true
turbo-darwin-arm64@2.5.4:
optional: true
turbo-linux-64@2.5.4:
optional: true
turbo-linux-arm64@2.5.4:
optional: true
turbo-windows-64@2.5.4:
optional: true
turbo-windows-arm64@2.5.4:
optional: true
turbo@2.5.4:
optionalDependencies:
turbo-darwin-64: 2.5.4
turbo-darwin-arm64: 2.5.4
turbo-linux-64: 2.5.4
turbo-linux-arm64: 2.5.4
turbo-windows-64: 2.5.4
turbo-windows-arm64: 2.5.4
tw-animate-css@1.3.4: {}
type-fest@0.21.3: {}

36
turbo.json Normal file
View File

@ -0,0 +1,36 @@
{
"$schema": "https://turborepo.com/schema.json",
"ui": "tui",
"tasks": {
"//#dev-webui": {
"cache": false,
"persistent": true,
"interactive": true,
"interruptible": true
},
"//#dev-proxy": {
"cache": false,
"persistent": true,
"interactive": true,
"interruptible": true
},
"//#dev-recorder": {
"cache": false,
"persistent": true,
"interactive": true,
"interruptible": true
},
"//#dev-deps": {
"cache": false,
"persistent": true,
"interactive": true,
"interruptible": true
},
"//#dev-codegen-wait": {
"cache": false,
"persistent": true,
"interactive": true,
"interruptible": true
}
}
}