Skip to content

Commit

Permalink
Merge pull request #1644 from scpwiki/WJ-1192-rpc
Browse files Browse the repository at this point in the history
Replace REST with JSON-RPC
  • Loading branch information
emmiegit authored Oct 20, 2023
2 parents 6ccb1ce + 3f34e9c commit 5418bc3
Show file tree
Hide file tree
Showing 151 changed files with 3,668 additions and 3,524 deletions.
1,085 changes: 640 additions & 445 deletions deepwell/Cargo.lock

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions deepwell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords = ["wikijump", "api", "backend", "wiki"]
categories = ["asynchronous", "database", "web-programming::http-server"]
exclude = [".gitignore", ".editorconfig"]

version = "2023.10.6"
version = "2023.10.19"
authors = ["Emmie Maeda <[email protected]>"]
edition = "2021" # this is *not* the same as the current year

Expand All @@ -20,28 +20,32 @@ anyhow = "1"
argon2 = "0.5"
arraystring = "0.3"
async-std = { version = "1", features = ["attributes"] }
async-trait = "0.1"
cfg-if = "1"
clap = "4"
color-backtrace = "0.6"
crossfire = "1.0"
cuid2 = "0.1"
data-encoding = "2"
dotenvy = "0.15"
either = "1"
femme = "2"
filemagic = "0.12"
fluent = "0.16"
ftml = { version = "1.22", features = ["mathml"] }
futures = { version = "0.3", features = ["async-await"], default-features = false }
hex = "0.4"
hex = { version = "0.4", features = ["serde"] }
hostname = "0.3"
intl-memoizer = "0.5"
jsonrpsee = { version = "0.20", features = ["macros", "server"] }
log = "0.4"
notify = { version = "6", optional = true }
once_cell = "1"
otp = { git = "https://github.com/TimDumol/rust-otp" }
paste = "1"
rand = "0.8"
ref-map = "0.1"
regex = "1"
reqwest = { version = "0.11", features = ["json", "rustls-tls"], default-features = false }
rust-s3 = { version = "0.32", features = ["with-async-std"], default-features = false }
sea-orm = { version = "0.12", features = ["sqlx-postgres", "runtime-async-std-rustls", "postgres-array", "macros", "with-json", "with-time"], default-features = false }
sea-query = "0.30"
Expand All @@ -54,12 +58,11 @@ strum = "0.25"
strum_macros = "0.25"
subtle = "2.4"
thiserror = "1"
tide = "0.16"
time = { version = "0.3", features = ["parsing", "serde", "serde-human-readable"], default-features = false }
tiny-keccak = { version = "2", features = ["k12"] }
toml = { version = "0.8", features = ["parse"] }
tokio = { version = "1", features = ["full"] }
typenum = "1"
ureq = { version = "2.8.0", features = ["charset", "json", "tls"] }
unic-langid = "0.9"
unicase = "2"
wikidot-normalize = "0.12"
Expand Down
2 changes: 2 additions & 0 deletions deepwell/migrations/20220906103252_deepwell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ CREATE TABLE file (
from_wikidot BOOLEAN NOT NULL DEFAULT false,
name TEXT NOT NULL,
page_id BIGINT NOT NULL REFERENCES page(page_id),
site_id BIGINT NOT NULL REFERENCES site(site_id),

UNIQUE (page_id, name, deleted_at)
);
Expand All @@ -442,6 +443,7 @@ CREATE TABLE file_revision (
revision_number INTEGER NOT NULL,
file_id BIGINT NOT NULL REFERENCES file(file_id),
page_id BIGINT NOT NULL REFERENCES page(page_id),
site_id BIGINT NOT NULL REFERENCES site(site_id),
user_id BIGINT NOT NULL REFERENCES "user"(user_id),
name TEXT NOT NULL,
s3_hash BYTEA NOT NULL,
Expand Down
1 change: 0 additions & 1 deletion deepwell/scripts/generate-models.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ sea-orm-cli generate entity \
--date-time-crate time \
--with-copy-enums \
--with-serde both \
--model-extra-attributes 'serde(rename_all = "camelCase")' \
--database-url postgres://wikijump:wikijump@localhost/wikijump \
--output-dir src/models
Loading

0 comments on commit 5418bc3

Please sign in to comment.