Commit Graph

6 Commits

Author SHA1 Message Date
Aumetra Weisman 96de9876c3 Add TOML formatter and checks (#507)
* introduce toml formatter

* add formatting check

* Remove SCSS subcommand
2024-03-22 20:56:58 +01:00
aumetra bb001b5647
Restructure to have `kitsune-core` crate (#343)
* initial move

* progress

* progress

* kinda finish?

* share test utilities via crate

* fixups

* remove deref anti-pattern

* fix feature flag

* move figlet

* bring zustand back

* more garde

* fix validation

* add tests

* fix update validation

* clippy lints

* update

* flake.lock: Update

Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/f9e7cf818399d17d347f847525c5a5a8032e4e44' (2023-08-23)
  → 'github:numtide/flake-utils/ff7b65b44d01cf9ba6a71320833626af21126384' (2023-09-12)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/0bffda19b8af722f8069d09d8b6a24594c80b352' (2023-09-06)
  → 'github:nixos/nixpkgs/ace5093e36ab1e95cb9463863491bee90d5a4183' (2023-09-15)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/1b4fad9dccece45c25b9ebda607427d69a8f1eae' (2023-09-09)
  → 'github:oxalica/rust-overlay/f84bb1621574473d05e6ed79ba57a371d8ad8259' (2023-09-16)

* move default limit

* use garde to enforce limit

* remove unused
2023-09-17 08:02:03 +00:00
aumetra 870f9688b7
Language detection for posts (#293)
* restructure

* add language detection sql function

* fix generation

* update query

* mvp finish

* clippy lints

* enumification

* combine the tsvectors down into one

* fixes

* unwrap

* use isolang, fill all codes into database

* only use whatlang if detection is reliable

* only insert commonly used languages

* generate the function over isolang instead of whatlang

* add whichlang feature

* default to whatlang

* make features additive and runtime swappable

* disable whichlang feature by default

* add allows

* add manual language overrides

* supported languages public

* add all supported mastodon languages

* add lingua support

* rename example

* make functions pure (pretty much, except for lingua)

* rename language crate

* split into module

* this is pissing me off so much

* update

* jasdjkfh
2023-08-17 11:30:23 +00:00
aumetra de0d0966e2
Split Kitsune into more subcrates (#239)
* split into cache crate

* split into search crate

* change imports

* upgrade

* flake.lock: Update

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/e635192892f5abbc2289eaac3a73cdb249abaefd' (2023-06-01)
  → 'github:nixos/nixpkgs/7409480d5c8584a1a83c422530419efe4afb0d19' (2023-06-05)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/c535b4f3327910c96dcf21851bbdd074d0760290' (2023-06-03)
  → 'github:oxalica/rust-overlay/08b06ab2046bce2c3b5f53ec599a6550ab9a9485' (2023-06-05)

* fix oidc imports

* fix comments
2023-06-05 23:49:18 +02:00
aumetra ecec478c2d
Better SQL search (#208)
* use tsvectors on postgresql

* put into match

* use pgfunc call

* add fts5 search for posts

* use .join_rev

* fix test failures

* add tsvectors for accounts

* add fts for accounts

* group the tsvectors together

* fix delete

* move migrations into own file

* replace alias usage with typed enums

* move some types into a db-common crate, add types for composite indices

* encode all logic into rust

* reorder imports
2023-05-18 20:00:59 +02:00
aumetra cabf86542c
Project restructure (#62)
* create db crate, move to generated entities

* move all the types into the db crate, delete old db module

* add note to script

* port server to new db crate, disable graphql for now

* move cli into own package

* port graphql api

* reenable graphql

* enable uuidv7 feature

* change to entity aliases, fix queries for posts

* more annotations

* up
2023-02-05 00:35:58 +01:00