Files
rdbms-playground/Cargo.toml
T
claude@clouddev1 c6cf3df6dc Iteration 5: export / import commands
Implements the `export` and `import` app-level commands per
ADR-0015 §11 + ADR-0007 amendment 1.

- `export [<path>]` writes a zip of project.yaml + data/ to
  <data-root>/YYYYMMDD-<projectname>-export-NN.zip by default,
  preserving the project's directory name as the single
  top-level folder inside the archive.
- `import <zip> [as <target>]` extracts an exported zip into
  a new named project and switches to it. Target name is
  derived from the zip's top-level folder by default; on
  collision the destination auto-suffixes -02, -03, ... up
  to -99 instead of refusing (deviates from §2's refuse-on-
  collision rule for save/save as; recorded as an amendment
  to ADR-0015 §11).
- Excludes playground.db and history.log from the zip.
- Path-traversal protection via zip::enclosed_name + post-
  resolution check that the extraction path stays inside
  the target directory.

Adds the zip = "5" dep with default-features = false +
features = ["deflate"] to keep the binary-size cost modest.

Test baseline: 370 passing, 0 failing, 0 skipped.
2026-05-08 08:24:45 +00:00

48 lines
1.4 KiB
TOML

[package]
name = "rdbms-playground"
version = "0.1.0"
edition = "2024"
description = "A cross-platform TUI playground for learning relational databases."
license = "MIT OR Apache-2.0"
repository = "https://github.com/sturm/rdbms-playground"
readme = "README.md"
publish = false
[dependencies]
anyhow = "1.0.102"
base64 = "0.22.1"
chumsky = "0.13.0"
crossterm = { version = "0.29.0", features = ["event-stream"] }
csv = "1.4.0"
directories = "6.0.0"
futures-util = "0.3.32"
gethostname = "1.1.0"
rand = "0.10.1"
ratatui = "0.30.0"
rusqlite = { version = "0.39.0", features = ["bundled"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_yml = "0.0.12"
sysinfo = { version = "0.39.0", default-features = false, features = ["system"] }
thiserror = "2.0.18"
tokio = { version = "1.52.2", features = ["full"] }
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
zip = { version = "5.1.1", default-features = false, features = ["deflate"] }
[dev-dependencies]
insta = { version = "1.47.2", features = ["yaml"] }
pretty_assertions = "1.4.1"
tempfile = "3.27.0"
[lints.rust]
unsafe_code = "forbid"
unreachable_pub = "warn"
[lints.clippy]
all = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
# Allow common false-positives that don't materially improve our code.
module_name_repetitions = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"