Update dependencies
This commit is contained in:
parent
dec027f258
commit
53ec443972
18 changed files with 1342 additions and 1870 deletions
4
.envrc
4
.envrc
|
|
@ -6,3 +6,7 @@ use flake
|
||||||
export REGALADE_JWT_SECRET=B50D8FB3A6DC3073259062EFFD03A283416A81ED3183C44DEE179AFF76C00B58
|
export REGALADE_JWT_SECRET=B50D8FB3A6DC3073259062EFFD03A283416A81ED3183C44DEE179AFF76C00B58
|
||||||
export REGALADE_DATABASE_URL=postgres://traxys/regalade?host=/var/run/postgresql
|
export REGALADE_DATABASE_URL=postgres://traxys/regalade?host=/var/run/postgresql
|
||||||
export DATABASE_URL=$REGALADE_DATABASE_URL
|
export DATABASE_URL=$REGALADE_DATABASE_URL
|
||||||
|
|
||||||
|
if [[ -f secrets.sh ]]; then
|
||||||
|
source secrets.sh
|
||||||
|
fi
|
||||||
|
|
|
||||||
2794
Cargo.lock
generated
2794
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
42
Cargo.toml
42
Cargo.toml
|
|
@ -5,36 +5,36 @@ authors = ["traxys <quentin@familleboyer.net>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [".", "api", "gui", "migration", "web"]
|
members = [".", "api", "migration"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.79"
|
anyhow = "1.0.95"
|
||||||
axum = { version = "0.7.4" }
|
axum = { version = "0.7.9" }
|
||||||
base64 = "0.21.7"
|
base64 = "0.22.1"
|
||||||
jwt-simple = "0.12.7"
|
jwt-simple = "0.12.11"
|
||||||
serde = { version = "1.0.195", features = ["derive"] }
|
serde = { version = "1.0.217", features = ["derive"] }
|
||||||
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] }
|
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] }
|
||||||
tracing = "0.1.40"
|
tracing = "0.1.41"
|
||||||
tracing-subscriber = "0.3.18"
|
tracing-subscriber = "0.3.19"
|
||||||
api = { path = "./api" }
|
api = { path = "./api" }
|
||||||
migration = { path = "./migration" }
|
migration = { path = "./migration" }
|
||||||
thiserror = "1.0.56"
|
thiserror = "2.0.9"
|
||||||
tower-http = { version = "0.5.1", features = ["cors", "fs"] }
|
tower-http = { version = "0.6.2", features = ["cors", "fs"] }
|
||||||
sha2 = "0.10"
|
sha2 = "0.10"
|
||||||
uuid = { version = "1.7", features = ["v4"] }
|
uuid = { version = "1.11", features = ["v4"] }
|
||||||
sea-query = "0.30"
|
sea-query = "0.32"
|
||||||
openidconnect = "3.4.0"
|
openidconnect = "3.5.0"
|
||||||
envious = "0.2.2"
|
envious = "0.2.2"
|
||||||
parking_lot = "0.12.1"
|
parking_lot = "0.12.3"
|
||||||
urlencoding = "2.1.3"
|
urlencoding = "2.1.3"
|
||||||
tower-sessions = "0.10.0"
|
tower-sessions = "0.13.0"
|
||||||
tower = "0.4.13"
|
tower = "0.5.2"
|
||||||
time = "0.3.31"
|
time = "0.3.37"
|
||||||
maud = { version = "0.26.0", features = ["axum"] }
|
maud = { version = "0.26.0", features = ["axum"] }
|
||||||
pulldown-cmark = "0.9.3"
|
pulldown-cmark = "0.12.2"
|
||||||
ammonia = "3.3.0"
|
ammonia = "4.0.0"
|
||||||
tower-sessions-sqlx-store = { version = "0.10.0", features = ["postgres"] }
|
tower-sessions-sqlx-store = { version = "0.14.2", features = ["postgres"] }
|
||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
version = "0.12"
|
version = "1.1"
|
||||||
features = ["runtime-tokio-rustls", "sqlx-postgres", "sqlx-sqlite"]
|
features = ["runtime-tokio-rustls", "sqlx-postgres", "sqlx-sqlite"]
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@ edition = "2021"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0.195", features = ["derive"] }
|
serde = { version = "1.0.217", features = ["derive"] }
|
||||||
uuid = { version = "1.7.0", features = ["serde"] }
|
uuid = { version = "1.11.0", features = ["serde"] }
|
||||||
|
|
|
||||||
93
flake.lock
generated
93
flake.lock
generated
|
|
@ -5,29 +5,11 @@
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709126324,
|
"lastModified": 1731533236,
|
||||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils_2": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1705309234,
|
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -41,11 +23,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698420672,
|
"lastModified": 1733346208,
|
||||||
"narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=",
|
"narHash": "sha256-a4WZp1xQkrnA4BbnKrzJNr+dYoQr5Xneh2syJoddFyE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "naersk",
|
"repo": "naersk",
|
||||||
"rev": "aeb58d5e8faead8980a807c840232697982d47b9",
|
"rev": "378614f37a6bee5a3f2ef4f825a73d948d3ae921",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -56,12 +38,10 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709294055,
|
"lastModified": 0,
|
||||||
"narHash": "sha256-7EECkQYoNKJZOf2+miJdrMpxpvsn/qZFwIhUI3fQpLs=",
|
"narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=",
|
||||||
"owner": "NixOS",
|
"path": "/nix/store/zgzjib5vbxl9l2ridhjfvs1ll6lil8s6-source",
|
||||||
"repo": "nixpkgs",
|
"type": "path"
|
||||||
"rev": "ec869190b56a1b4677d24a8bdbcfe80ccea2ece6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
|
|
@ -70,11 +50,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709294055,
|
"lastModified": 1735523292,
|
||||||
"narHash": "sha256-7EECkQYoNKJZOf2+miJdrMpxpvsn/qZFwIhUI3fQpLs=",
|
"narHash": "sha256-opBsbR/nrGxiiF6XzlVluiHYb6yN/hEwv+lBWTy9xoM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ec869190b56a1b4677d24a8bdbcfe80ccea2ece6",
|
"rev": "6d97d419e5a9b36e6293887a89a078cf85f5a61b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -86,11 +66,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706487304,
|
"lastModified": 1728538411,
|
||||||
"narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=",
|
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "90f456026d284c22b3e3497be980b2e47d0b28ac",
|
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -105,21 +85,19 @@
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"rust-overlay": "rust-overlay",
|
"rust-overlay": "rust-overlay"
|
||||||
"trunk": "trunk"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709345349,
|
"lastModified": 1735525800,
|
||||||
"narHash": "sha256-E2tsnkM97cGuzHKOqdkUXfmI+K1wS4dNTJJu5QH2Vuk=",
|
"narHash": "sha256-pcN8LAL021zdC99a9F7iEiFCI1wmrE4DpIYUgKpB/jY=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "6e6fde31711e699be2e7fb67aae1c7e23ef606e0",
|
"rev": "10faa81b4c0135a04716cbd1649260d82b2890cd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -142,37 +120,6 @@
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"systems_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"trunk": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1709278132,
|
|
||||||
"narHash": "sha256-aBW4tq2809fZmB6s5qnoqEPBeLtoCv2Xxdcb3UTB5gQ=",
|
|
||||||
"owner": "thedodd",
|
|
||||||
"repo": "trunk",
|
|
||||||
"rev": "e8a6de8deb2d5f75a560546a1739d4b13ff6817f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "thedodd",
|
|
||||||
"repo": "trunk",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
||||||
182
flake.nix
182
flake.nix
|
|
@ -4,146 +4,52 @@
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
inputs.naersk.url = "github:nix-community/naersk";
|
inputs.naersk.url = "github:nix-community/naersk";
|
||||||
inputs.rust-overlay.url = "github:oxalica/rust-overlay";
|
inputs.rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
inputs.trunk = {
|
|
||||||
url = "github:thedodd/trunk";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
self,
|
{
|
||||||
nixpkgs,
|
self,
|
||||||
flake-utils,
|
nixpkgs,
|
||||||
naersk,
|
flake-utils,
|
||||||
rust-overlay,
|
naersk,
|
||||||
trunk,
|
rust-overlay,
|
||||||
}:
|
}:
|
||||||
(flake-utils.lib.eachDefaultSystem (system: let
|
(flake-utils.lib.eachDefaultSystem (
|
||||||
pkgs = import nixpkgs {
|
system:
|
||||||
inherit system;
|
let
|
||||||
overlays = [(import rust-overlay)];
|
pkgs = import nixpkgs {
|
||||||
};
|
inherit system;
|
||||||
rust = pkgs.rust-bin.stable.latest.default.override {
|
overlays = [ (import rust-overlay) ];
|
||||||
targets = ["wasm32-unknown-unknown"];
|
};
|
||||||
};
|
rust = pkgs.rust-bin.stable.latest.default.override {
|
||||||
naersk' = pkgs.callPackage naersk {
|
targets = [ "wasm32-unknown-unknown" ];
|
||||||
cargo = rust;
|
};
|
||||||
rustc = rust;
|
naersk' = pkgs.callPackage naersk {
|
||||||
};
|
cargo = rust;
|
||||||
rustPlatform = pkgs.makeRustPlatform {
|
rustc = rust;
|
||||||
cargo = rust;
|
};
|
||||||
rustc = rust;
|
rustPlatform = pkgs.makeRustPlatform {
|
||||||
};
|
cargo = rust;
|
||||||
in {
|
rustc = rust;
|
||||||
devShell = pkgs.mkShell {
|
};
|
||||||
nativeBuildInputs = [
|
in
|
||||||
rustPlatform.bindgenHook
|
{
|
||||||
pkgs.cmake
|
devShell = pkgs.mkShell {
|
||||||
rust
|
nativeBuildInputs = [
|
||||||
self.packages.${system}.dioxus
|
rustPlatform.bindgenHook
|
||||||
(naersk'.buildPackage trunk)
|
pkgs.cmake
|
||||||
pkgs.httpie
|
rust
|
||||||
pkgs.sea-orm-cli
|
pkgs.httpie
|
||||||
];
|
pkgs.sea-orm-cli
|
||||||
RUST_PATH = "${rust}";
|
];
|
||||||
RUST_DOC_PATH = "${rust}/share/doc/rust/html/std/index.html";
|
RUST_PATH = "${rust}";
|
||||||
};
|
RUST_DOC_PATH = "${rust}/share/doc/rust/html/std/index.html";
|
||||||
|
};
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
dioxus = pkgs.callPackage ({
|
server = naersk'.buildPackage ./.;
|
||||||
rustPlatform,
|
};
|
||||||
pkg-config,
|
}
|
||||||
cacert,
|
))
|
||||||
openssl,
|
|
||||||
coreutils-full,
|
|
||||||
}:
|
|
||||||
rustPlatform.buildRustPackage rec {
|
|
||||||
pname = "dioxus-cli";
|
|
||||||
version = "0.4.0";
|
|
||||||
src = pkgs.fetchCrate {
|
|
||||||
inherit version pname;
|
|
||||||
hash = "sha256-4BIuD/rrA398hPEoNt5PwWylPAR0fA1UKc90xyH5Fd0=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [pkg-config cacert coreutils-full];
|
|
||||||
buildInputs = [openssl];
|
|
||||||
|
|
||||||
OPENSSL_NO_VENDOR = 1;
|
|
||||||
|
|
||||||
cargoHash = "sha256-ok+fjvwz4k0/M5j7wut2A2AK6tuO3UfZtgoCXaCaHXY=";
|
|
||||||
}) {};
|
|
||||||
server = naersk'.buildPackage ./.;
|
|
||||||
frontend = let
|
|
||||||
pkg = {
|
|
||||||
stdenv,
|
|
||||||
makeRustPlatform,
|
|
||||||
wasm-bindgen-cli,
|
|
||||||
apiServerBase ? "http://localhost:8085",
|
|
||||||
frontendRoot ? "http://localhost:8080",
|
|
||||||
fetchzip,
|
|
||||||
bootstrap ? let
|
|
||||||
version = "5.3.1";
|
|
||||||
in
|
|
||||||
fetchzip {
|
|
||||||
url = "https://github.com/twbs/bootstrap/releases/download/v${version}/bootstrap-${version}-dist.zip";
|
|
||||||
hash = "sha256-BKtQB7IaslmmW6cLF4m/uUJQaBDndRf7tJ9gjItKVI4=";
|
|
||||||
},
|
|
||||||
bootstrapIcons ? let
|
|
||||||
version = "1.10.5";
|
|
||||||
in
|
|
||||||
fetchzip {
|
|
||||||
url = "https://github.com/twbs/icons/releases/download/v${version}/bootstrap-icons-${version}.zip";
|
|
||||||
hash = "sha256-o+owSIRMIXOH/GvQlVNlnCv/hcWD6kmoXNwm7F1Dmxs=";
|
|
||||||
},
|
|
||||||
}: let
|
|
||||||
rustPlatformWasm = makeRustPlatform {
|
|
||||||
rustc = rust;
|
|
||||||
cargo = rust;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
pname = "regalade-web";
|
|
||||||
version = "0.1.0";
|
|
||||||
|
|
||||||
src = ./.;
|
|
||||||
|
|
||||||
cargoDeps = rustPlatformWasm.importCargoLock {lockFile = ./Cargo.lock;};
|
|
||||||
|
|
||||||
REGALADE_API_SERVER_BASE = apiServerBase;
|
|
||||||
REGALADE_FRONTEND_DOMAIN = frontendRoot;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
self.packages.${system}.dioxus
|
|
||||||
wasm-bindgen-cli
|
|
||||||
rustPlatformWasm.cargoSetupHook
|
|
||||||
rustPlatformWasm.cargoBuildHook
|
|
||||||
];
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
runHook preBuild
|
|
||||||
|
|
||||||
export XDG_DATA_HOME=/build/data
|
|
||||||
mkdir -p $XDG_DATA_HOME
|
|
||||||
|
|
||||||
cd web
|
|
||||||
dx build --release
|
|
||||||
|
|
||||||
runHook postBuild
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
cp -R dist $out
|
|
||||||
ln -s ${bootstrap} $out/bootstrap
|
|
||||||
ln -s ${bootstrapIcons} $out/bootstrap-icons
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
pkgs.callPackage pkg {};
|
|
||||||
};
|
|
||||||
}))
|
|
||||||
// {
|
// {
|
||||||
nixosModules.default = import ./nixos self;
|
nixosModules.default = import ./nixos self;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,19 @@ edition = "2021"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ammonia = "3.3.0"
|
ammonia = "4.0.0"
|
||||||
anyhow = "1.0.79"
|
anyhow = "1.0.95"
|
||||||
api = { version = "0.1.0", path = "../api" }
|
api = { version = "0.1.0", path = "../api" }
|
||||||
dioxus = "0.4.3"
|
dioxus = "0.6.1"
|
||||||
dioxus-router = { version = "0.4.3", features = ["web"] }
|
dioxus-router = { version = "0.6.1", features = ["web"] }
|
||||||
dioxus-web = "0.4.3"
|
dioxus-web = "0.6.1"
|
||||||
gloo-net = { version = "0.5.0", features = ["json"] }
|
gloo-net = { version = "0.6.0", features = ["json"] }
|
||||||
gloo-storage = "0.3.0"
|
gloo-storage = "0.3.0"
|
||||||
gloo-utils = "0.2.0"
|
gloo-utils = "0.2.0"
|
||||||
itertools = "0.12.0"
|
itertools = "0.13.0"
|
||||||
log = "0.4.20"
|
log = "0.4.22"
|
||||||
pulldown-cmark = "0.9.3"
|
pulldown-cmark = "0.12.2"
|
||||||
serde = { version = "1.0.195", features = ["derive"] }
|
serde = { version = "1.0.217", features = ["derive"] }
|
||||||
urlencoding = "2.1.3"
|
urlencoding = "2.1.3"
|
||||||
uuid = "1.7.0"
|
uuid = "1.11.0"
|
||||||
wasm-bindgen = "0.2.90"
|
wasm-bindgen = "0.2.99"
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,5 @@ path = "src/lib.rs"
|
||||||
async-std = { version = "1", features = ["attributes", "tokio1"] }
|
async-std = { version = "1", features = ["attributes", "tokio1"] }
|
||||||
|
|
||||||
[dependencies.sea-orm-migration]
|
[dependencies.sea-orm-migration]
|
||||||
version = "0.12"
|
version = "1.1"
|
||||||
features = ["runtime-tokio-rustls", "sqlx-postgres", "sqlx-sqlite"]
|
features = ["runtime-tokio-rustls", "sqlx-postgres", "sqlx-sqlite"]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.1
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
|
@ -12,12 +12,20 @@ pub struct Model {
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||||
pub enum Relation {
|
pub enum Relation {
|
||||||
|
#[sea_orm(has_many = "super::household_members::Entity")]
|
||||||
|
HouseholdMembers,
|
||||||
#[sea_orm(has_many = "super::ingredient::Entity")]
|
#[sea_orm(has_many = "super::ingredient::Entity")]
|
||||||
Ingredient,
|
Ingredient,
|
||||||
#[sea_orm(has_many = "super::recipe::Entity")]
|
#[sea_orm(has_many = "super::recipe::Entity")]
|
||||||
Recipe,
|
Recipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Related<super::household_members::Entity> for Entity {
|
||||||
|
fn to() -> RelationDef {
|
||||||
|
Relation::HouseholdMembers.def()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Related<super::ingredient::Entity> for Entity {
|
impl Related<super::ingredient::Entity> for Entity {
|
||||||
fn to() -> RelationDef {
|
fn to() -> RelationDef {
|
||||||
Relation::Ingredient.def()
|
Relation::Ingredient.def()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.1
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.1
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
|
@ -22,6 +22,8 @@ pub enum Relation {
|
||||||
on_delete = "Restrict"
|
on_delete = "Restrict"
|
||||||
)]
|
)]
|
||||||
Household,
|
Household,
|
||||||
|
#[sea_orm(has_many = "super::recipe_ingredients::Entity")]
|
||||||
|
RecipeIngredients,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Related<super::household::Entity> for Entity {
|
impl Related<super::household::Entity> for Entity {
|
||||||
|
|
@ -30,6 +32,12 @@ impl Related<super::household::Entity> for Entity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Related<super::recipe_ingredients::Entity> for Entity {
|
||||||
|
fn to() -> RelationDef {
|
||||||
|
Relation::RecipeIngredients.def()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Related<super::recipe::Entity> for Entity {
|
impl Related<super::recipe::Entity> for Entity {
|
||||||
fn to() -> RelationDef {
|
fn to() -> RelationDef {
|
||||||
super::recipe_ingredients::Relation::Recipe.def()
|
super::recipe_ingredients::Relation::Recipe.def()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.1
|
||||||
|
|
||||||
pub mod prelude;
|
pub mod prelude;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.1
|
||||||
|
|
||||||
pub use super::household::Entity as Household;
|
pub use super::household::Entity as Household;
|
||||||
pub use super::household_members::Entity as HouseholdMembers;
|
pub use super::household_members::Entity as HouseholdMembers;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.1
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
|
@ -26,6 +26,8 @@ pub enum Relation {
|
||||||
on_delete = "Restrict"
|
on_delete = "Restrict"
|
||||||
)]
|
)]
|
||||||
Household,
|
Household,
|
||||||
|
#[sea_orm(has_many = "super::recipe_ingredients::Entity")]
|
||||||
|
RecipeIngredients,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Related<super::household::Entity> for Entity {
|
impl Related<super::household::Entity> for Entity {
|
||||||
|
|
@ -34,6 +36,12 @@ impl Related<super::household::Entity> for Entity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Related<super::recipe_ingredients::Entity> for Entity {
|
||||||
|
fn to() -> RelationDef {
|
||||||
|
Relation::RecipeIngredients.def()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Related<super::ingredient::Entity> for Entity {
|
impl Related<super::ingredient::Entity> for Entity {
|
||||||
fn to() -> RelationDef {
|
fn to() -> RelationDef {
|
||||||
super::recipe_ingredients::Relation::Ingredient.def()
|
super::recipe_ingredients::Relation::Ingredient.def()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.1
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.1
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
|
@ -9,13 +9,22 @@ pub struct Model {
|
||||||
pub id: Uuid,
|
pub id: Uuid,
|
||||||
#[sea_orm(unique)]
|
#[sea_orm(unique)]
|
||||||
pub name: String,
|
pub name: String,
|
||||||
#[sea_orm(column_type = "Binary(BlobSize::Blob(None))", nullable)]
|
#[sea_orm(column_type = "VarBinary(StringLen::None)", nullable)]
|
||||||
pub password: Option<Vec<u8>>,
|
pub password: Option<Vec<u8>>,
|
||||||
pub open_id_subject: Option<String>,
|
pub open_id_subject: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||||
pub enum Relation {}
|
pub enum Relation {
|
||||||
|
#[sea_orm(has_many = "super::household_members::Entity")]
|
||||||
|
HouseholdMembers,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Related<super::household_members::Entity> for Entity {
|
||||||
|
fn to() -> RelationDef {
|
||||||
|
Relation::HouseholdMembers.def()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Related<super::household::Entity> for Entity {
|
impl Related<super::household::Entity> for Entity {
|
||||||
fn to() -> RelationDef {
|
fn to() -> RelationDef {
|
||||||
|
|
|
||||||
10
src/main.rs
10
src/main.rs
|
|
@ -22,6 +22,7 @@ use time::OffsetDateTime;
|
||||||
use tower_http::services::{ServeDir, ServeFile};
|
use tower_http::services::{ServeDir, ServeFile};
|
||||||
use tower_sessions::{session_store::ExpiredDeletion, SessionManagerLayer};
|
use tower_sessions::{session_store::ExpiredDeletion, SessionManagerLayer};
|
||||||
use tower_sessions_sqlx_store::{sqlx::PgPool, PostgresStore};
|
use tower_sessions_sqlx_store::{sqlx::PgPool, PostgresStore};
|
||||||
|
use tracing::level_filters::LevelFilter;
|
||||||
use tracing_subscriber::EnvFilter;
|
use tracing_subscriber::EnvFilter;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
|
|
@ -353,9 +354,12 @@ impl OpenidConnector {
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> anyhow::Result<()> {
|
async fn main() -> anyhow::Result<()> {
|
||||||
tracing_subscriber::fmt()
|
tracing_subscriber::fmt()
|
||||||
.with_max_level(tracing::Level::DEBUG)
|
|
||||||
.with_test_writer()
|
.with_test_writer()
|
||||||
.with_env_filter(EnvFilter::from_default_env())
|
.with_env_filter(
|
||||||
|
EnvFilter::builder()
|
||||||
|
.with_default_directive(LevelFilter::INFO.into())
|
||||||
|
.from_env()?,
|
||||||
|
)
|
||||||
.init();
|
.init();
|
||||||
|
|
||||||
let config = Settings::new()?;
|
let config = Settings::new()?;
|
||||||
|
|
@ -416,7 +420,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
tracing::info!("Listening on {addr}");
|
tracing::info!("Listening on http://{addr}");
|
||||||
|
|
||||||
let listener = tokio::net::TcpListener::bind(&addr).await?;
|
let listener = tokio::net::TcpListener::bind(&addr).await?;
|
||||||
axum::serve(listener, router).await?;
|
axum::serve(listener, router).await?;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
console_log = "1.0.0"
|
console_log = "1.0.0"
|
||||||
dioxus-web = "0.4.3"
|
dioxus-web = "0.6.1"
|
||||||
gloo-utils = "0.2.0"
|
gloo-utils = "0.2.0"
|
||||||
log = "0.4.20"
|
log = "0.4.22"
|
||||||
regalade_gui = { path = "../gui" }
|
regalade_gui = { path = "../gui" }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue