# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
name = "fresh-editor"
version = "0.1.83"
authors = ["Noam Lewis"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
default-run = "fresh"
description = "A lightweight, fast terminal-based text editor with LSP support and TypeScript plugins"
homepage = "https://sinelaw.github.io/fresh/"
readme = false
keywords = [
    "editor",
    "terminal",
    "tui",
    "text-editor",
    "lsp",
]
categories = [
    "command-line-utilities",
    "text-editors",
]
license = "GPL-2.0"
repository = "https://github.com/sinelaw/fresh"

[package.metadata.dist]
changelog = "../../CHANGELOG.md"

[package.metadata.deb]
maintainer = "Noam Lewis"
section = "editors"
priority = "optional"
depends = "$auto"
assets = [
    [
    "target/release/fresh",
    "usr/share/fresh-editor/",
    "755",
],
    [
    "../../README.md",
    "usr/share/doc/fresh-editor/",
    "644",
],
    [
    "plugins/*",
    "usr/share/fresh-editor/plugins/",
    "644",
],
    [
    "plugins/lib/*",
    "usr/share/fresh-editor/plugins/lib/",
    "644",
],
    [
    "plugins/examples/*",
    "usr/share/fresh-editor/plugins/examples/",
    "644",
],
    [
    "themes/*",
    "usr/share/fresh-editor/themes/",
    "644",
],
]
maintainer-scripts = "debian/"
extended-description = """
Fresh is a lightweight, fast terminal-based text editor with LSP support
and TypeScript plugins. It provides syntax highlighting, code completion,
and other IDE-like features in a minimal terminal interface."""

[package.metadata.generate-rpm]
post_trans_script = """
if [ ! -e /usr/bin/fresh ]; then
    cat > /usr/bin/fresh << 'WRAPPER'
#!/bin/sh
exec /usr/share/fresh-editor/fresh "$@"
WRAPPER
    chmod 755 /usr/bin/fresh
fi
"""

[[package.metadata.generate-rpm.assets]]
source = "target/release/fresh"
dest = "/usr/share/fresh-editor/fresh"
mode = "755"

[[package.metadata.generate-rpm.assets]]
source = "scripts/fresh-wrapper.sh"
dest = "/usr/bin/fresh"
mode = "755"

[[package.metadata.generate-rpm.assets]]
source = "../../README.md"
dest = "/usr/share/doc/fresh-editor/README.md"
mode = "644"

[[package.metadata.generate-rpm.assets]]
source = "plugins/*.ts"
dest = "/usr/share/fresh-editor/plugins/"
mode = "644"

[[package.metadata.generate-rpm.assets]]
source = "plugins/*.json"
dest = "/usr/share/fresh-editor/plugins/"
mode = "644"

[[package.metadata.generate-rpm.assets]]
source = "plugins/*.md"
dest = "/usr/share/fresh-editor/plugins/"
mode = "644"

[[package.metadata.generate-rpm.assets]]
source = "plugins/lib/*"
dest = "/usr/share/fresh-editor/plugins/lib/"
mode = "644"

[[package.metadata.generate-rpm.assets]]
source = "plugins/examples/*"
dest = "/usr/share/fresh-editor/plugins/examples/"
mode = "644"

[[package.metadata.generate-rpm.assets]]
source = "themes/*.json"
dest = "/usr/share/fresh-editor/themes/"
mode = "644"

[features]
default = [
    "plugins",
    "runtime",
    "embed-plugins",
]
dev-bins = []
embed-plugins = [
    "plugins",
    "dep:include_dir",
    "dep:dirs",
    "dep:trash",
]
plugins = [
    "dep:fresh-plugin-runtime",
    "dep:fresh-parser-js",
    "dep:fresh-plugin-api-macros",
    "dep:ts-rs",
]
runtime = [
    "dep:crossterm",
    "dep:ratatui",
    "dep:chrono",
    "dep:clap",
    "dep:tracing",
    "dep:tracing-subscriber",
    "dep:fresh-languages",
    "dep:lsp-types",
    "dep:url",
    "dep:tokio",
    "dep:async-trait",
    "dep:lru",
    "dep:ignore",
    "dep:regex",
    "dep:libc",
    "dep:libloading",
    "dep:nix",
    "dep:anyhow",
    "dep:dirs",
    "dep:pulldown-cmark",
    "dep:sha2",
    "dep:arboard",
    "dep:syntect",
    "dep:ureq",
    "dep:unicode-width",
    "dep:unicode-segmentation",
    "dep:alacritty_terminal",
    "dep:portable-pty",
    "dep:trash",
    "dep:open",
]
schema-only = []

[lib]
name = "fresh"
path = "src/lib.rs"

[[bin]]
name = "event_debug"
path = "src/bin/event_debug.rs"
required-features = [
    "dev-bins",
    "runtime",
]

[[bin]]
name = "fresh"
path = "src/main.rs"
required-features = ["runtime"]

[[bin]]
name = "generate_schema"
path = "src/bin/generate_schema.rs"
required-features = ["dev-bins"]

[[test]]
name = "e2e_tests"
path = "tests/e2e_tests.rs"

[[test]]
name = "focused_bug_test"
path = "tests/focused_bug_test.rs"

[[test]]
name = "harness_test"
path = "tests/harness_test.rs"

[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"

[[test]]
name = "property_persistence_tests"
path = "tests/property_persistence_tests.rs"

[[test]]
name = "property_tests"
path = "tests/property_tests.rs"

[[test]]
name = "regression_hidden_cursor_panic"
path = "tests/regression_hidden_cursor_panic.rs"

[[test]]
name = "test_line_iterator_comprehensive"
path = "tests/test_line_iterator_comprehensive.rs"

[[test]]
name = "test_overlay_colors"
path = "tests/test_overlay_colors.rs"

[[test]]
name = "test_plugin_i18n"
path = "tests/test_plugin_i18n.rs"

[[test]]
name = "test_plugin_i18n_completeness"
path = "tests/test_plugin_i18n_completeness.rs"

[[test]]
name = "test_theme_schema_i18n"
path = "tests/test_theme_schema_i18n.rs"

[dependencies.alacritty_terminal]
version = "0.25"
optional = true

[dependencies.anyhow]
version = "1.0.100"
optional = true
default-features = false

[dependencies.arboard]
version = "3.6"
features = ["wayland-data-control"]
optional = true
default-features = false

[dependencies.async-trait]
version = "0.1"
optional = true

[dependencies.chrono]
version = "0.4"
features = [
    "std",
    "clock",
]
optional = true
default-features = false

[dependencies.clap]
version = "4.5"
features = [
    "derive",
    "std",
    "help",
    "usage",
    "error-context",
]
optional = true
default-features = false

[dependencies.crossterm]
version = "0.29.0"
features = ["osc52"]
optional = true

[dependencies.dirs]
version = "6.0"
optional = true

[dependencies.fresh-core]
version = "0.1.83"

[dependencies.fresh-languages]
version = "0.1.83"
features = ["all-languages"]
optional = true

[dependencies.fresh-parser-js]
version = "0.1.83"
optional = true

[dependencies.fresh-plugin-api-macros]
version = "0.1.83"
optional = true

[dependencies.fresh-plugin-runtime]
version = "0.1.83"
optional = true

[dependencies.ignore]
version = "0.4"
optional = true
default-features = false

[dependencies.include_dir]
version = "0.7"
optional = true

[dependencies.libc]
version = "0.2"
optional = true

[dependencies.libloading]
version = "0.9"
optional = true

[dependencies.lru]
version = "0.16"
optional = true

[dependencies.lsp-types]
version = "0.97"
optional = true

[dependencies.nix]
version = "0.30"
features = [
    "signal",
    "pthread",
    "resource",
    "poll",
    "fs",
]
optional = true

[dependencies.once_cell]
version = "1.20"

[dependencies.open]
version = "5"
optional = true

[dependencies.portable-pty]
version = "0.9"
optional = true

[dependencies.pulldown-cmark]
version = "0.13"
optional = true
default-features = false

[dependencies.ratatui]
version = "0.30.0"
optional = true

[dependencies.regex]
version = "1.12"
optional = true

[dependencies.rust-i18n]
version = "3"

[dependencies.schemars]
version = "1.2"
features = ["preserve_order"]

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"

[dependencies.sha2]
version = "0.10"
optional = true

[dependencies.syntect]
version = "5.3"
optional = true

[dependencies.tempfile]
version = "3.24"
optional = true

[dependencies.tokio]
version = "1.49"
features = [
    "fs",
    "io-util",
    "process",
    "rt",
    "rt-multi-thread",
    "sync",
    "time",
    "macros",
]
optional = true

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]
optional = true

[dependencies.trash]
version = "5.2.5"
optional = true

[dependencies.ts-rs]
version = "11.1"
optional = true

[dependencies.unicode-segmentation]
version = "1.12"
optional = true

[dependencies.unicode-width]
version = "0.2"
optional = true

[dependencies.ureq]
version = "2.12"
features = ["tls"]
optional = true
default-features = false

[dependencies.url]
version = "2.5"
optional = true

[dev-dependencies.ctor]
version = "0.6.3"

[dev-dependencies.insta]
version = "1.46"
features = ["yaml"]

[dev-dependencies.proptest]
version = "1.9"

[dev-dependencies.tempfile]
version = "3.24.0"

[dev-dependencies.tiny_http]
version = "0.12"

[dev-dependencies.unicode-segmentation]
version = "1.12"

[dev-dependencies.vt100]
version = "0.15"

[build-dependencies.serde_json]
version = "1.0"

[target."cfg(windows)".dependencies.windows-sys]
version = "0.61"
features = [
    "Win32_Foundation",
    "Win32_System_Threading",
]
