Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"rust-analyzer.rustfmt.extraArgs": ["+nightly"],
"rust-analyzer.cargo.features": [
"decrypt-cookies/Safari",
"binary-cookies/serde",
"binary-cookies/tokio",
"binary-cookies/sync"
]
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 22 additions & 20 deletions crates/binary-cookies/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
[package]
name = "binary-cookies"
version = "0.1.0"
description = "BinaryCookies decode and encode"
edition.workspace = true
authors.workspace = true
homepage.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "BinaryCookies decode and encode"
readme = "./README.md"
homepage.workspace = true
repository.workspace = true
keywords = ["cookies", "binarycookies", "BinaryCookies", "binary-cookies"]
license.workspace = true
keywords = ["BinaryCookies", "binary-cookies", "binarycookies", "cookies"]
categories = ["asynchronous", "authentication", "encoding"]
readme = "./README.md"
exclude = ["test-resource/", "examples/"]
exclude = ["examples/", "test-resource/"]

[dependencies]
positioned-io = { workspace = true }
oval = { workspace = true }
winnow = { workspace = true }
chrono = { workspace = true }
thiserror = { workspace = true }
# TODO: better error display?
# annotate-snippets = { workspace = true }
bstr = { workspace = true }
chrono = { workspace = true }
oval = { workspace = true }
positioned-io = { workspace = true }
serde = { workspace = true, optional = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["fs", "io-util", "rt-multi-thread"], optional = true }
winnow = { workspace = true }

[dev-dependencies]
tokio = { workspace = true, features = ["fs", "io-util", "rt-multi-thread"] }
plist = { workspace = true }
serde = { workspace = true }
dirs = { workspace = true }
rand = { workspace = true }
plist = { workspace = true }
pretty_assertions = { workspace = true }
rand = { workspace = true }
rayon = { workspace = true }

[lints]
workspace = true
serde = { workspace = true }
tokio = { workspace = true, features = ["fs", "io-util", "rt-multi-thread"] }

[features]
tokio = ["dep:tokio"]
serde = ["bstr/serde", "chrono/serde", "dep:serde"]
sync = []
tokio = ["dep:tokio"]

[lints]
workspace = true
9 changes: 8 additions & 1 deletion crates/binary-cookies/src/cookie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use crate::{
#[derive(Default)]
#[derive(PartialEq)]
#[cfg_attr(not(test), derive(Eq))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[expect(
clippy::exhaustive_structs,
reason = "Breaking change with Binarycookies format"
Expand Down Expand Up @@ -158,7 +159,10 @@ impl BinaryCookies {
#[derive(Default)]
#[derive(PartialEq, Eq)]
#[derive(PartialOrd, Ord)]
#[cfg_attr(test, derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(
any(test, feature = "serde"),
derive(serde::Serialize, serde::Deserialize)
)]
#[expect(
clippy::exhaustive_structs,
reason = "Breaking change with Binarycookies format"
Expand Down Expand Up @@ -223,6 +227,7 @@ impl Metadata {
#[derive(Default)]
#[derive(PartialEq)]
#[cfg_attr(not(test), derive(Eq))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[expect(
clippy::exhaustive_structs,
reason = "Breaking change with Binarycookies format"
Expand Down Expand Up @@ -345,6 +350,7 @@ impl Page {
#[derive(Debug)]
#[derive(PartialEq)]
#[cfg_attr(not(test), derive(Eq))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[expect(
clippy::exhaustive_structs,
reason = "Breaking change with Binarycookies format"
Expand Down Expand Up @@ -642,6 +648,7 @@ impl Cookie {
#[derive(Debug)]
#[derive(Default)]
#[derive(PartialEq, Eq, PartialOrd, Ord)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum SameSite {
#[default]
None,
Expand Down
Loading