Skip to content

Commit

Permalink
chore(sea-orm): update to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saying121 committed Aug 4, 2024
1 parent 929913c commit 8f45267
Show file tree
Hide file tree
Showing 33 changed files with 329 additions and 306 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,4 @@ jobs:
COMMIT_MSG: |
fmt: with nightly rustfmt
run: |
cargo +nightly fmt --all
git config user.email "actions@github"
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:"${GITHUB_TOKEN}"@github.com/"${GITHUB_REPOSITORY}".git
git add crates/
# shellcheck disable=SC2015
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:"${GITHUB_REF}")
cargo +nightly fmt --check --all
73 changes: 44 additions & 29 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ panic = "abort"
tokio = { version = "^1", features = ["macros"] }
# futures = { version = "^0.3", default-features = false }

sea-orm = { version = "^0.12", default-features = false, features = ["sqlx-sqlite", "runtime-tokio-rustls", "macros"] }
sea-orm = { version = "^1", default-features = false, features = ["sqlx-sqlite", "runtime-tokio-rustls", "macros"] }

dirs = { version = "^5" }

Expand Down
4 changes: 2 additions & 2 deletions crates/decrypt-cookies/src/browser/cookies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use serde::{Deserialize, Serialize};
#[derive(Debug)]
#[derive(PartialEq, Eq, PartialOrd, Ord)]
pub struct LeetCodeCookies {
pub csrf: String,
pub csrf: String,
pub session: String,
#[serde(skip)]
pub expiry: bool,
pub expiry: bool,
}

impl LeetCodeCookies {
Expand Down
12 changes: 6 additions & 6 deletions crates/decrypt-cookies/src/browser/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ pub mod linux {
#[derive(Default)]
#[derive(PartialEq, Eq)]
pub struct LinuxChromiumBase {
pub base: PathBuf,
pub base: PathBuf,
pub browser: Browser,
}

Expand Down Expand Up @@ -394,7 +394,7 @@ pub mod linux {
#[derive(Default)]
#[derive(PartialEq, Eq)]
pub struct LinuxFFBase {
base: PathBuf,
base: PathBuf,
browser: Browser,
}

Expand Down Expand Up @@ -442,7 +442,7 @@ pub mod macos {
#[derive(Default)]
#[derive(PartialEq, Eq)]
pub struct MacChromiumBase {
pub base: PathBuf,
pub base: PathBuf,
pub browser: Browser,
}

Expand Down Expand Up @@ -496,7 +496,7 @@ pub mod macos {
#[derive(PartialEq, Eq)]
pub struct MacFFBase {
pub base: PathBuf,
browser: Browser,
browser: Browser,
}

impl TempPath for MacFFBase {
Expand Down Expand Up @@ -544,7 +544,7 @@ pub mod win {
#[derive(Default)]
#[derive(PartialEq, Eq)]
pub struct WinChromiumBase {
base: PathBuf,
base: PathBuf,
browser: Browser,
}

Expand Down Expand Up @@ -630,7 +630,7 @@ pub mod win {
#[derive(Default)]
#[derive(PartialEq, Eq)]
pub struct WinFFBase {
base: PathBuf,
base: PathBuf,
browser: Browser,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/decrypt-cookies/src/chromium/crypto/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Aes128CbcDec = cbc::Decryptor<aes::Aes128>;
#[derive(PartialEq, Eq)]
pub struct Decrypter {
pass_v11: &'static [u8],
browser: Browser,
browser: Browser,
}

impl Decrypter {
Expand Down
2 changes: 1 addition & 1 deletion crates/decrypt-cookies/src/chromium/crypto/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Aes128CbcDec = cbc::Decryptor<aes::Aes128>;
#[derive(Default)]
#[derive(PartialEq, Eq)]
pub struct Decrypter {
browser: Browser,
browser: Browser,
pass_v10: Vec<u8>,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/decrypt-cookies/src/chromium/crypto/win.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{chromium::local_state::LocalState, Browser};
#[derive(Default)]
#[derive(PartialEq, Eq)]
pub struct Decrypter {
pass: Vec<u8>,
pass: Vec<u8>,
browser: Browser,
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.0
use sea_orm::entity::prelude::*;

#[derive(Clone)]
#[derive(Debug)]
#[derive(DeriveEntityModel)]
#[derive(PartialEq, Eq, PartialOrd, Ord)]
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "cookies")]
pub struct Model {
pub creation_utc: i64,
pub host_key: String,
pub creation_utc: i64,
#[sea_orm(column_type = "Text")]
pub host_key: String,
#[sea_orm(column_type = "Text")]
pub top_frame_site_key: String,
pub name: String,
pub value: String,
#[sea_orm(column_type = "Text")]
pub name: String,
#[sea_orm(column_type = "Text")]
pub value: String,
#[sea_orm(primary_key, auto_increment = false)]
#[sea_orm(column_type = "Binary(BlobSize::Blob(None))")]
pub encrypted_value: Vec<u8>,
pub path: String,
pub expires_utc: i64,
pub is_secure: i32,
pub is_httponly: i32,
pub last_access_utc: i64,
pub has_expires: i32,
pub is_persistent: i32,
pub priority: i32,
pub samesite: i32,
pub source_scheme: i32,
pub source_port: i32,
pub last_update_utc: i64,
// pub is_same_party: i32,
#[sea_orm(column_type = "Blob")]
pub encrypted_value: Vec<u8>,
#[sea_orm(column_type = "Text")]
pub path: String,
pub expires_utc: i64,
pub is_secure: i32,
pub is_httponly: i32,
pub last_access_utc: i64,
pub has_expires: i32,
pub is_persistent: i32,
pub priority: i32,
pub samesite: i32,
pub source_scheme: i32,
pub source_port: i32,
pub last_update_utc: i64,
// pub source_type: i32,
// pub has_cross_site_ancestor: i32,
// pub is_edgelegacycookie: i32,
// pub browser_provenance: i32,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.0
use sea_orm::entity::prelude::*;

#[derive(Clone)]
#[derive(Debug)]
#[derive(PartialEq, Eq, PartialOrd, Ord)]
#[derive(DeriveEntityModel)]
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "meta")]
pub struct Model {
#[sea_orm(
primary_key,
auto_increment = false,
column_type = "Binary(BlobSize::Blob(None))"
column_type = "custom(\"LONGVARCHAR\")"
)]
pub key: Vec<u8>,
#[sea_orm(column_type = "Binary(BlobSize::Blob(None))", nullable)]
pub value: Option<Vec<u8>>,
pub key: String,
#[sea_orm(column_type = "custom(\"LONGVARCHAR\")", nullable)]
pub value: Option<String>,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.0
pub mod prelude;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.0
#![allow(unused_imports)]
pub use super::{cookies::Entity as CookiesDB, meta::Entity as MetaDB};
Loading

0 comments on commit 8f45267

Please sign in to comment.