mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 22:04:51 -05:00
Compare commits
50
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
436c892930 | ||
|
|
46b0de8250 | ||
|
|
3ad0126fb5 | ||
|
|
328e1429fb | ||
|
|
11e2921b63 | ||
|
|
98f1e20bdd | ||
|
|
cc5e61f495 | ||
|
|
201215d0c9 | ||
|
|
d14400289a | ||
|
|
836b4396f9 | ||
|
|
e040ef68ee | ||
|
|
d9527c8889 | ||
|
|
a84a27cf5a | ||
|
|
45e5ceb2ff | ||
|
|
48cb89f9ed | ||
|
|
5997dd9eff | ||
|
|
829c3a0f1c | ||
|
|
8edb11796e | ||
|
|
293070cb17 | ||
|
|
0c8ef1c2ae | ||
|
|
c038199109 | ||
|
|
639a02c8f9 | ||
|
|
f09ec32aee | ||
|
|
622c63a335 | ||
|
|
d74c794100 | ||
|
|
979a8de5ae | ||
|
|
d08ec99250 | ||
|
|
c0e7d8926f | ||
|
|
502db04b4b | ||
|
|
0c9bfe24cd | ||
|
|
dc4ac0c37e | ||
|
|
86aaef06be | ||
|
|
a7454733ed | ||
|
|
bfeeb06479 | ||
|
|
220d1d2698 | ||
|
|
54e1ca4e3e | ||
|
|
7c9daed937 | ||
|
|
e440a338b3 | ||
|
|
fd1a37d7f3 | ||
|
|
ebdf97f8af | ||
|
|
8499c00fe8 | ||
|
|
93e437beb5 | ||
|
|
fcb116d6c1 | ||
|
|
02cc385d9e | ||
|
|
9ab0603604 | ||
|
|
8ff613ef13 | ||
|
|
97a3310b59 | ||
|
|
421c8e3e05 | ||
|
|
c3e0916ba7 | ||
|
|
f844aa7016 |
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nUPDATE users\nSET\n can_access_studio = ?,\n version = version + 1\n\nWHERE users.token = ?\nLIMIT 1\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 2
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "19c1458e12d614bfface303102898b6a34f6b7a56eb906f5df3568172d51778b"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\n UPDATE media_files\n SET\n creator_set_visibility = ?\n WHERE token = ?\n LIMIT 1\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 2
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "3ce0af2b4111883eeba5621cd1f5b6bbae8de275b5e738550b56db2b630ce8d3"
|
||||
}
|
||||
Generated
+73
-149
@@ -92,7 +92,7 @@ dependencies = [
|
||||
"actix-rt",
|
||||
"actix-service",
|
||||
"actix-utils",
|
||||
"ahash 0.8.6",
|
||||
"ahash 0.8.11",
|
||||
"base64 0.21.5",
|
||||
"bitflags 2.4.1",
|
||||
"brotli",
|
||||
@@ -204,7 +204,7 @@ dependencies = [
|
||||
"actix-utils",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"mio 0.8.9",
|
||||
"mio 0.8.11",
|
||||
"socket2 0.5.5",
|
||||
"tokio",
|
||||
"tracing",
|
||||
@@ -246,7 +246,7 @@ dependencies = [
|
||||
"actix-service",
|
||||
"actix-utils",
|
||||
"actix-web-codegen",
|
||||
"ahash 0.8.6",
|
||||
"ahash 0.8.11",
|
||||
"bytes 1.5.0",
|
||||
"bytestring",
|
||||
"cfg-if 1.0.0",
|
||||
@@ -267,7 +267,7 @@ dependencies = [
|
||||
"serde_urlencoded",
|
||||
"smallvec 1.11.2",
|
||||
"socket2 0.5.5",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"url",
|
||||
]
|
||||
|
||||
@@ -313,7 +313,7 @@ dependencies = [
|
||||
"actix-utils",
|
||||
"actix-web",
|
||||
"actix-web-lab-derive",
|
||||
"ahash 0.8.6",
|
||||
"ahash 0.8.11",
|
||||
"arc-swap",
|
||||
"async-trait",
|
||||
"bytes 1.5.0",
|
||||
@@ -358,7 +358,6 @@ dependencies = [
|
||||
"actix-http",
|
||||
"actix-rt",
|
||||
"actix-web",
|
||||
"errors",
|
||||
"log",
|
||||
"my-workspace-hack",
|
||||
"reusable_types",
|
||||
@@ -446,9 +445,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ahash"
|
||||
version = "0.8.6"
|
||||
version = "0.8.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a"
|
||||
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"getrandom 0.2.11",
|
||||
@@ -765,7 +764,7 @@ dependencies = [
|
||||
"rust-ini",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"url",
|
||||
]
|
||||
|
||||
@@ -844,12 +843,6 @@ version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.13.1"
|
||||
@@ -870,21 +863,21 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
|
||||
|
||||
[[package]]
|
||||
name = "bcrypt"
|
||||
version = "0.8.2"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2cab630912253fb9dc92c0e2fabd0a7b51f5a5a4007177cfa31e517015b7204"
|
||||
checksum = "28d1c9c15093eb224f0baa400f38fcd713fc1391a6f1c389d886beef146d60a3"
|
||||
dependencies = [
|
||||
"base64 0.12.3",
|
||||
"base64 0.21.5",
|
||||
"blowfish",
|
||||
"byteorder",
|
||||
"getrandom 0.1.16",
|
||||
"getrandom 0.2.11",
|
||||
"subtle",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "billing_component"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"actix-cors",
|
||||
"actix-http",
|
||||
"actix-web",
|
||||
"anyhow",
|
||||
@@ -911,7 +904,6 @@ dependencies = [
|
||||
"url_config",
|
||||
"user_traits_component",
|
||||
"utoipa",
|
||||
"utoipa-swagger-ui",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -954,15 +946,6 @@ dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-cipher"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f337a3e6da609650eb74e02bc9fac7b735049f7623ab12f2e4c719316fcc7e80"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-modes"
|
||||
version = "0.8.1"
|
||||
@@ -981,13 +964,12 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
|
||||
|
||||
[[package]]
|
||||
name = "blowfish"
|
||||
version = "0.6.0"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f06850ba969bc59388b2cc0a4f186fc6d9d37208863b15b84ae3866ac90ac06"
|
||||
checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7"
|
||||
dependencies = [
|
||||
"block-cipher",
|
||||
"byteorder",
|
||||
"opaque-debug",
|
||||
"cipher 0.4.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1029,7 +1011,6 @@ name = "buckets"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"crockford",
|
||||
"errors",
|
||||
"my-workspace-hack",
|
||||
]
|
||||
|
||||
@@ -1161,7 +1142,7 @@ version = "0.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9"
|
||||
dependencies = [
|
||||
"hashbrown 0.14.2",
|
||||
"hashbrown 0.14.5",
|
||||
"stacker",
|
||||
]
|
||||
|
||||
@@ -1271,7 +1252,6 @@ dependencies = [
|
||||
name = "collections"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"errors",
|
||||
"my-workspace-hack",
|
||||
"rand 0.8.5",
|
||||
]
|
||||
@@ -1334,9 +1314,7 @@ dependencies = [
|
||||
"sqlx",
|
||||
"sqlx-core",
|
||||
"sqlx-mysql",
|
||||
"strum",
|
||||
"tokens",
|
||||
"toml 0.5.11",
|
||||
"utoipa",
|
||||
]
|
||||
|
||||
@@ -1353,7 +1331,7 @@ version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400"
|
||||
dependencies = [
|
||||
"crossbeam-utils 0.8.16",
|
||||
"crossbeam-utils 0.8.19",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1383,7 +1361,6 @@ name = "container_common"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"log",
|
||||
"my-workspace-hack",
|
||||
"once_cell",
|
||||
"rand 0.8.5",
|
||||
@@ -1406,7 +1383,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"
|
||||
dependencies = [
|
||||
"percent-encoding",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
@@ -1494,7 +1471,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-utils 0.8.16",
|
||||
"crossbeam-utils 0.8.19",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1505,7 +1482,7 @@ checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-epoch",
|
||||
"crossbeam-utils 0.8.16",
|
||||
"crossbeam-utils 0.8.19",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1516,7 +1493,7 @@ checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-utils 0.8.16",
|
||||
"crossbeam-utils 0.8.19",
|
||||
"memoffset 0.9.0",
|
||||
"scopeguard",
|
||||
]
|
||||
@@ -1528,7 +1505,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-utils 0.8.16",
|
||||
"crossbeam-utils 0.8.19",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1544,12 +1521,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.16"
|
||||
version = "0.8.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
]
|
||||
checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
|
||||
|
||||
[[package]]
|
||||
name = "crunchy"
|
||||
@@ -1733,7 +1707,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"hashbrown 0.14.2",
|
||||
"hashbrown 0.14.5",
|
||||
"lock_api 0.4.11",
|
||||
"once_cell",
|
||||
"parking_lot_core 0.9.9",
|
||||
@@ -2071,7 +2045,6 @@ dependencies = [
|
||||
"hyper",
|
||||
"jobs_common",
|
||||
"log",
|
||||
"migration",
|
||||
"mimetypes",
|
||||
"my-workspace-hack",
|
||||
"mysql_queries",
|
||||
@@ -2246,11 +2219,9 @@ dependencies = [
|
||||
"actix-web",
|
||||
"actix_helpers",
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"bootstrap",
|
||||
"buckets",
|
||||
"chrono",
|
||||
"cloud_storage",
|
||||
"concurrency",
|
||||
"config",
|
||||
"container_common",
|
||||
@@ -2260,16 +2231,9 @@ dependencies = [
|
||||
"enums",
|
||||
"errors",
|
||||
"filesys",
|
||||
"hashing",
|
||||
"hostname",
|
||||
"hyper",
|
||||
"images",
|
||||
"jobs_common",
|
||||
"lfu",
|
||||
"log",
|
||||
"media",
|
||||
"memory_caching",
|
||||
"mimetypes",
|
||||
"my-workspace-hack",
|
||||
"mysql_queries",
|
||||
"once_cell",
|
||||
@@ -2280,13 +2244,8 @@ dependencies = [
|
||||
"serde_json",
|
||||
"server_environment",
|
||||
"sqlx",
|
||||
"subprocess",
|
||||
"subprocess_common",
|
||||
"tempdir",
|
||||
"testing",
|
||||
"tokens",
|
||||
"tokio",
|
||||
"tts_common",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2370,11 +2329,9 @@ dependencies = [
|
||||
name = "es-update-job"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"actix_helpers",
|
||||
"anyhow",
|
||||
"bootstrap",
|
||||
"chrono",
|
||||
"concurrency",
|
||||
"config",
|
||||
"container_common",
|
||||
"dotenv",
|
||||
@@ -2383,19 +2340,12 @@ dependencies = [
|
||||
"elasticsearch_schema",
|
||||
"enums",
|
||||
"errors",
|
||||
"filesys",
|
||||
"hashing",
|
||||
"hostname",
|
||||
"jobs_common",
|
||||
"log",
|
||||
"media",
|
||||
"memory_caching",
|
||||
"mimetypes",
|
||||
"my-workspace-hack",
|
||||
"mysql_queries",
|
||||
"once_cell",
|
||||
"rand 0.8.5",
|
||||
"redis_common",
|
||||
"reusable_types",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
@@ -2403,9 +2353,6 @@ dependencies = [
|
||||
"server_environment",
|
||||
"sqlx",
|
||||
"storyteller_root",
|
||||
"subprocess",
|
||||
"subprocess_common",
|
||||
"testing",
|
||||
"tokens",
|
||||
"tokio",
|
||||
]
|
||||
@@ -2788,9 +2735,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "h2"
|
||||
version = "0.3.22"
|
||||
version = "0.3.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178"
|
||||
checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8"
|
||||
dependencies = [
|
||||
"bytes 1.5.0",
|
||||
"fnv",
|
||||
@@ -2825,11 +2772,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.14.2"
|
||||
version = "0.14.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
|
||||
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
||||
dependencies = [
|
||||
"ahash 0.8.6",
|
||||
"ahash 0.8.11",
|
||||
"allocator-api2",
|
||||
]
|
||||
|
||||
@@ -2851,7 +2798,7 @@ version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7"
|
||||
dependencies = [
|
||||
"hashbrown 0.14.2",
|
||||
"hashbrown 0.14.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2995,18 +2942,15 @@ dependencies = [
|
||||
"actix-web",
|
||||
"anyhow",
|
||||
"base64 0.21.5",
|
||||
"chrono",
|
||||
"errors",
|
||||
"language-tags",
|
||||
"log",
|
||||
"my-workspace-hack",
|
||||
"once_cell",
|
||||
"regex",
|
||||
"reusable_types",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"speculoos",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3175,7 +3119,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown 0.14.2",
|
||||
"hashbrown 0.14.5",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -3256,7 +3200,7 @@ dependencies = [
|
||||
"subprocess_common",
|
||||
"tempdir",
|
||||
"thumbnail_generator",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"tokens",
|
||||
"tokio",
|
||||
"tts_common",
|
||||
@@ -3535,8 +3479,7 @@ dependencies = [
|
||||
"futures 0.1.31",
|
||||
"my-workspace-hack",
|
||||
"redis 0.13.0",
|
||||
"time 0.1.45",
|
||||
"tokio",
|
||||
"time",
|
||||
"version-sync",
|
||||
]
|
||||
|
||||
@@ -3607,7 +3550,6 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
|
||||
name = "logging"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"dotenv",
|
||||
"env_logger",
|
||||
"log",
|
||||
"my-workspace-hack",
|
||||
@@ -3790,7 +3732,6 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"serial_test 2.0.0",
|
||||
"sqlx",
|
||||
"tokens",
|
||||
"tokio",
|
||||
@@ -3894,9 +3835,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.8.9"
|
||||
version = "0.8.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0"
|
||||
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"log",
|
||||
@@ -3973,7 +3914,7 @@ name = "my-workspace-hack"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"actix-rt",
|
||||
"ahash 0.8.6",
|
||||
"ahash 0.8.11",
|
||||
"base64 0.21.5",
|
||||
"base64ct",
|
||||
"bitflags 2.4.1",
|
||||
@@ -3984,7 +3925,8 @@ dependencies = [
|
||||
"chrono",
|
||||
"clap",
|
||||
"combine 4.6.6",
|
||||
"crossbeam-utils 0.8.16",
|
||||
"crossbeam-utils 0.8.19",
|
||||
"crypto-common",
|
||||
"deranged",
|
||||
"derive_more",
|
||||
"digest 0.10.7",
|
||||
@@ -4000,10 +3942,9 @@ dependencies = [
|
||||
"futures-task",
|
||||
"futures-util",
|
||||
"generic-array",
|
||||
"getrandom 0.1.16",
|
||||
"getrandom 0.2.11",
|
||||
"hashbrown 0.12.3",
|
||||
"hashbrown 0.14.2",
|
||||
"hashbrown 0.14.5",
|
||||
"heck",
|
||||
"hmac 0.12.1",
|
||||
"hyper",
|
||||
@@ -4014,14 +3955,13 @@ dependencies = [
|
||||
"log",
|
||||
"memchr",
|
||||
"miniz_oxide",
|
||||
"mio 0.8.9",
|
||||
"mio 0.8.11",
|
||||
"native-tls",
|
||||
"num-bigint",
|
||||
"num-integer",
|
||||
"num-iter",
|
||||
"num-rational",
|
||||
"num-traits",
|
||||
"once_cell",
|
||||
"openssl",
|
||||
"openssl-sys",
|
||||
"proc-macro2",
|
||||
@@ -4049,7 +3989,7 @@ dependencies = [
|
||||
"sqlx-sqlite",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.49",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"time-macros",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
@@ -4060,7 +4000,7 @@ dependencies = [
|
||||
"url",
|
||||
"void",
|
||||
"winapi 0.3.9",
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.52.0",
|
||||
"zip",
|
||||
]
|
||||
|
||||
@@ -4768,7 +4708,6 @@ dependencies = [
|
||||
name = "primitives"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"errors",
|
||||
"my-workspace-hack",
|
||||
]
|
||||
|
||||
@@ -4809,7 +4748,6 @@ dependencies = [
|
||||
name = "prompt_engineering"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"errors",
|
||||
"my-workspace-hack",
|
||||
"once_cell",
|
||||
"regex",
|
||||
@@ -5041,7 +4979,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed"
|
||||
dependencies = [
|
||||
"crossbeam-deque",
|
||||
"crossbeam-utils 0.8.16",
|
||||
"crossbeam-utils 0.8.19",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5132,7 +5070,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5387,7 +5325,7 @@ dependencies = [
|
||||
"serde_derive",
|
||||
"sha2 0.10.8",
|
||||
"thiserror",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"url",
|
||||
@@ -5564,7 +5502,7 @@ version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c95a930e03325234c18c7071fd2b60118307e025d6fff3e12745ffbf63a3d29c"
|
||||
dependencies = [
|
||||
"ahash 0.8.6",
|
||||
"ahash 0.8.11",
|
||||
"cssparser",
|
||||
"ego-tree",
|
||||
"getopts",
|
||||
@@ -6106,7 +6044,7 @@ version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd"
|
||||
dependencies = [
|
||||
"ahash 0.8.6",
|
||||
"ahash 0.8.11",
|
||||
"atoi",
|
||||
"byteorder",
|
||||
"bytes 1.5.0",
|
||||
@@ -6344,7 +6282,6 @@ dependencies = [
|
||||
"async-stripe",
|
||||
"async-trait",
|
||||
"base64 0.21.5",
|
||||
"bcrypt",
|
||||
"billing_component",
|
||||
"bootstrap",
|
||||
"buckets",
|
||||
@@ -6371,10 +6308,8 @@ dependencies = [
|
||||
"futures 0.3.29",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"google_drive_common",
|
||||
"hashing",
|
||||
"hex",
|
||||
"hmac 0.10.1",
|
||||
"hostname",
|
||||
"http",
|
||||
"http_server_common",
|
||||
@@ -6419,7 +6354,7 @@ dependencies = [
|
||||
"sqlx",
|
||||
"strum",
|
||||
"symphonia",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"tokens",
|
||||
"tokio",
|
||||
"toml 0.5.11",
|
||||
@@ -6442,7 +6377,6 @@ version = "0.0.1"
|
||||
dependencies = [
|
||||
"my-workspace-hack",
|
||||
"serial_test 2.0.0",
|
||||
"tempdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6865,17 +6799,6 @@ dependencies = [
|
||||
"digest 0.9.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.1.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"wasi 0.10.0+wasi-snapshot-preview1",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.30"
|
||||
@@ -6947,7 +6870,7 @@ dependencies = [
|
||||
"backtrace",
|
||||
"bytes 1.5.0",
|
||||
"libc",
|
||||
"mio 0.8.9",
|
||||
"mio 0.8.11",
|
||||
"num_cpus",
|
||||
"parking_lot 0.12.1",
|
||||
"pin-project-lite",
|
||||
@@ -7333,7 +7256,6 @@ dependencies = [
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"sqlx",
|
||||
"subprocess",
|
||||
"tempdir",
|
||||
"tokio",
|
||||
"tts_common",
|
||||
@@ -7414,7 +7336,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"sha2 0.9.9",
|
||||
"sqlx",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"tokens",
|
||||
"tokio",
|
||||
"tokio-tungstenite",
|
||||
@@ -7618,7 +7540,6 @@ name = "user_traits_component"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"errors",
|
||||
"mockall",
|
||||
"my-workspace-hack",
|
||||
]
|
||||
@@ -7663,13 +7584,12 @@ dependencies = [
|
||||
"sha2 0.9.9",
|
||||
"sqlx",
|
||||
"strum_macros",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"tokens",
|
||||
"toml 0.5.11",
|
||||
"user_input_common",
|
||||
"user_traits_component",
|
||||
"utoipa",
|
||||
"utoipa-swagger-ui",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7875,18 +7795,18 @@ version = "0.9.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.10.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.11.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||
|
||||
[[package]]
|
||||
name = "wasite"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.88"
|
||||
@@ -8070,7 +7990,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"sha2 0.9.9",
|
||||
"sqlx",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"tokio",
|
||||
"toml 0.5.11",
|
||||
"twitch_api2",
|
||||
@@ -8087,9 +8007,13 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
|
||||
|
||||
[[package]]
|
||||
name = "whoami"
|
||||
version = "1.4.1"
|
||||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50"
|
||||
checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9"
|
||||
dependencies = [
|
||||
"redox_syscall 0.4.1",
|
||||
"wasite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
@@ -8306,18 +8230,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.7.26"
|
||||
version = "0.7.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0"
|
||||
checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.7.26"
|
||||
version = "0.7.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f"
|
||||
checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -8341,12 +8265,12 @@ dependencies = [
|
||||
"bzip2",
|
||||
"constant_time_eq",
|
||||
"crc32fast",
|
||||
"crossbeam-utils 0.8.16",
|
||||
"crossbeam-utils 0.8.19",
|
||||
"flate2",
|
||||
"hmac 0.12.1",
|
||||
"pbkdf2",
|
||||
"sha1 0.10.6",
|
||||
"time 0.3.30",
|
||||
"time",
|
||||
"zstd 0.11.2+zstd.1.5.2",
|
||||
]
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Users created by studio users in 1 week
|
||||
select
|
||||
u.username,
|
||||
count(*) as video_count
|
||||
from media_files as m
|
||||
join users as u
|
||||
on m.maybe_creator_user_token = u.token
|
||||
where u.can_access_studio = true
|
||||
and m.created_at > (CURDATE() - INTERVAL 1 WEEK)
|
||||
and m.is_intermediate_system_file = false
|
||||
and m.media_class = 'video'
|
||||
group by u.token
|
||||
order by video_count desc;
|
||||
+1
@@ -14,6 +14,7 @@ UPDATE users SET user_role_slug = "admin" WHERE username IN (
|
||||
'crossproduct',
|
||||
'crossproduct1',
|
||||
'echelon',
|
||||
'endtimes',
|
||||
'fyscott',
|
||||
'mrvintage',
|
||||
'olivicmic',
|
||||
@@ -42,6 +42,7 @@ where token IN (
|
||||
UPDATE users SET maybe_loyalty_program_key = 'fakeyou_contributor' WHERE username IN (
|
||||
'bflat',
|
||||
'brandon',
|
||||
'coliphant',
|
||||
'crossproduct',
|
||||
'crossproduct1',
|
||||
'devdude123',
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Find users with studio flags.
|
||||
select username from users where maybe_feature_flags like '%studio%';
|
||||
|
||||
select username from users where can_access_studio = true;
|
||||
@@ -0,0 +1,12 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Sync the top-level boolean with the authoritative feature flags field.
|
||||
-- Performs a full table scan and string search, but is relatively quick.
|
||||
-- NB: Can't use users in the subquery:
|
||||
-- ERROR 1093 (HY000): You can't specify target table 'users' for update in FROM clause
|
||||
UPDATE users u INNER JOIN users uf
|
||||
ON u.token = uf.token
|
||||
SET u.can_access_studio = true
|
||||
WHERE uf.maybe_feature_flags like '%studio%';
|
||||
@@ -0,0 +1,5 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE beta_keys DROP COLUMN creator_user_token;
|
||||
@@ -0,0 +1,11 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE beta_keys
|
||||
ADD COLUMN
|
||||
creator_user_token VARCHAR(32) NOT NULL
|
||||
AFTER key_value;
|
||||
|
||||
ALTER TABLE beta_keys
|
||||
ADD INDEX index_creator_user_token (creator_user_token);
|
||||
@@ -0,0 +1,64 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
CREATE TABLE beta_keys (
|
||||
-- Not used for anything except replication.
|
||||
id BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
|
||||
-- ========== PRIMARY, FOREIGN KEYS, and POLYMORPHISM ==========
|
||||
|
||||
-- Effective "primary key" of the beta key.
|
||||
token VARCHAR(32) NOT NULL,
|
||||
|
||||
-- ========== KEY INFO ==========
|
||||
|
||||
-- Name of the product the key applies to
|
||||
product VARCHAR(32) NOT NULL,
|
||||
|
||||
-- The actual key value that the user inputs
|
||||
-- Crockford-encoded.
|
||||
key_value VARCHAR(32) NOT NULL,
|
||||
|
||||
-- ========== CREATOR USER ==========
|
||||
|
||||
-- This is a member on our team
|
||||
creator_user_token VARCHAR(32) NOT NULL,
|
||||
|
||||
-- ========== REFERRER USER ==========
|
||||
|
||||
-- The user that offers the beta key to other users.
|
||||
-- We can show a dashboard of unredeemed tokens for these users.
|
||||
maybe_referrer_user_token VARCHAR(32) DEFAULT NULL,
|
||||
|
||||
-- ========== REDEEMER USER ==========
|
||||
|
||||
-- The user that redeems the beta key.
|
||||
-- If set, the key has been redeemed.
|
||||
maybe_redeemer_user_token VARCHAR(32) DEFAULT NULL,
|
||||
|
||||
-- The user that redeems the beta key.
|
||||
-- Based on a cookie sent by the frontend.
|
||||
maybe_redeemer_anonymous_visitor_token VARCHAR(32) DEFAULT NULL,
|
||||
|
||||
-- The user that redeems the beta key.
|
||||
-- Wide enough for IPv4/6
|
||||
maybe_redeemer_ip_address VARCHAR(40) DEFAULT NULL,
|
||||
|
||||
-- ========== TIMESTAMPS ==========
|
||||
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
maybe_redeemed_at TIMESTAMP NULL,
|
||||
|
||||
-- INDICES --
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY (token),
|
||||
UNIQUE KEY (key_value),
|
||||
|
||||
KEY index_creator_user_token (creator_user_token),
|
||||
KEY index_maybe_referrer_user_token (maybe_referrer_user_token),
|
||||
KEY index_maybe_redeemer_user_token (maybe_redeemer_user_token),
|
||||
KEY index_created_at (created_at),
|
||||
KEY index_maybe_redeemed_at (maybe_redeemed_at)
|
||||
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
+1
-1
@@ -33,7 +33,7 @@ build_shared_mysql_database_library() {
|
||||
# popd
|
||||
#}
|
||||
|
||||
echo 'mysql prepare'
|
||||
echo 'mysql prepare (if this takes a while, it may need to rebuild all the rust code)'
|
||||
build_shared_mysql_database_library
|
||||
|
||||
#echo 'sqlite prepare'
|
||||
|
||||
@@ -12,11 +12,14 @@ publish = false
|
||||
name = "buckets"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
crockford = { path = "../../lib/data/crockford" }
|
||||
errors = { path = "../../lib/errors" }
|
||||
#errors = { path = "../../lib/errors" }
|
||||
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "composite_identifiers"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
enums = { path = "../enums" }
|
||||
@@ -32,9 +35,5 @@ utoipa = { version = "4", features = ["chrono","actix_extras"] }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
# Enum utilities
|
||||
strum = { version = "0.25", features = ["derive"] }
|
||||
|
||||
# Test serialization
|
||||
serde_json = "1.0.108"
|
||||
toml = "0.5.8"
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "enums"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
#[cfg(test)]
|
||||
@@ -61,13 +62,13 @@ impl StatsEntityType {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::by_table::entity_stats::stats_entity_type::StatsEntityType;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
use crate::by_table::entity_stats::stats_entity_type::StatsEntityType;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
|
||||
mod explicit_checks {
|
||||
use super::*;
|
||||
mod explicit_checks {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_serialization() {
|
||||
assert_serialization(StatsEntityType::Comment, "comment");
|
||||
assert_serialization(StatsEntityType::MediaFile, "media_file");
|
||||
@@ -101,9 +102,9 @@ mod tests {
|
||||
}
|
||||
|
||||
mod mechanical_checks {
|
||||
use super::*;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn variant_length() {
|
||||
use strum::IntoEnumIterator;
|
||||
assert_eq!(StatsEntityType::all_variants().len(), StatsEntityType::iter().len());
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
#[cfg(test)]
|
||||
@@ -61,13 +62,13 @@ impl FeaturedItemEntityType {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::by_table::featured_items::featured_item_entity_type::FeaturedItemEntityType;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
use crate::by_table::featured_items::featured_item_entity_type::FeaturedItemEntityType;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
|
||||
mod serde {
|
||||
use super::*;
|
||||
mod serde {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_serialization() {
|
||||
assert_serialization(FeaturedItemEntityType::MediaFile, "media_file");
|
||||
assert_serialization(FeaturedItemEntityType::ModelWeight, "model_weight");
|
||||
@@ -76,9 +77,9 @@ mod tests {
|
||||
}
|
||||
|
||||
mod impl_methods {
|
||||
use super::*;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_to_str() {
|
||||
assert_eq!(FeaturedItemEntityType::MediaFile.to_str(), "media_file");
|
||||
assert_eq!(FeaturedItemEntityType::ModelWeight.to_str(), "model_weight");
|
||||
@@ -95,9 +96,9 @@ mod tests {
|
||||
}
|
||||
|
||||
mod mechanical_checks {
|
||||
use super::*;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn variant_length() {
|
||||
use strum::IntoEnumIterator;
|
||||
assert_eq!(FeaturedItemEntityType::all_variants().len(), FeaturedItemEntityType::iter().len());
|
||||
|
||||
@@ -132,7 +132,7 @@ mod tests {
|
||||
mod explicit_checks {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_serialization() {
|
||||
assert_serialization(IdCategory::MediaFile, "media_file");
|
||||
assert_serialization(IdCategory::LipsyncAnimationResult, "lipsync_animation");
|
||||
|
||||
@@ -113,7 +113,7 @@ mod tests {
|
||||
mod explicit_checks {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_serialization() {
|
||||
assert_serialization(MediaFileOriginModelType::SadTalker, "sad_talker");
|
||||
}
|
||||
|
||||
@@ -59,9 +59,9 @@ impl_mysql_from_row!(WeightsCategory);
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_to_str() {
|
||||
assert_eq!(WeightsCategory::ImageGeneration.to_str(), "image_generation");
|
||||
assert_eq!(WeightsCategory::TextToSpeech.to_str(), "text_to_speech");
|
||||
|
||||
@@ -4,6 +4,7 @@ use std::collections::BTreeSet;
|
||||
use strum::EnumCount;
|
||||
#[cfg(test)]
|
||||
use strum::EnumIter;
|
||||
|
||||
// TODO we will need to scan the checkpoints for malicious code. We can't just trust the file extension.
|
||||
#[cfg_attr(test, derive(EnumIter, EnumCount))]
|
||||
#[derive(Clone, Copy, Eq, PartialEq, Hash, Ord, PartialOrd, Deserialize, Serialize)]
|
||||
@@ -43,9 +44,9 @@ impl_mysql_enum_coders!(WeightsFileType);
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_to_str() {
|
||||
assert_eq!(WeightsFileType::Checkpoint.to_str(), "checkpoint");
|
||||
assert_eq!(WeightsFileType::SafeTensors.to_str(), "safetensors");
|
||||
|
||||
@@ -81,9 +81,9 @@ impl_mysql_from_row!(WeightsType);
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_to_str() {
|
||||
assert_eq!(WeightsType::HifiganTacotron2.to_str(), "hifigan_tt2");
|
||||
assert_eq!(WeightsType::RvcV2.to_str(), "rvc_v2");
|
||||
|
||||
@@ -86,13 +86,13 @@ impl UserBookmarkEntityType {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::by_table::user_bookmarks::user_bookmark_entity_type::UserBookmarkEntityType;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
use crate::by_table::user_bookmarks::user_bookmark_entity_type::UserBookmarkEntityType;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
|
||||
mod serde {
|
||||
use super::*;
|
||||
mod serde {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_serialization() {
|
||||
assert_serialization(UserBookmarkEntityType::User, "user");
|
||||
assert_serialization(UserBookmarkEntityType::TtsModel, "tts_model");
|
||||
@@ -107,9 +107,9 @@ mod tests {
|
||||
}
|
||||
|
||||
mod impl_methods {
|
||||
use super::*;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_to_str() {
|
||||
assert_eq!(UserBookmarkEntityType::User.to_str(), "user");
|
||||
assert_eq!(UserBookmarkEntityType::TtsModel.to_str(), "tts_model");
|
||||
|
||||
@@ -63,8 +63,8 @@ impl UserFeatureFlag {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::test_helpers::assert_serialization;
|
||||
use crate::by_table::users::user_feature_flag::UserFeatureFlag;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
|
||||
mod explicit_checks {
|
||||
use super::*;
|
||||
|
||||
@@ -48,8 +48,8 @@ impl ZsVoiceModelCategory {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::test_helpers::assert_serialization;
|
||||
use crate::by_table::zs_voices::model_category::ZsVoiceModelCategory;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
|
||||
mod serde {
|
||||
use super::*;
|
||||
|
||||
@@ -53,8 +53,8 @@ impl ZsVoiceModelType {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::test_helpers::assert_serialization;
|
||||
use crate::by_table::zs_voices::model_type::ZsVoiceModelType;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
|
||||
mod serde {
|
||||
use super::*;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use std::collections::BTreeSet;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
#[cfg(test)]
|
||||
use strum::EnumCount;
|
||||
#[cfg(test)]
|
||||
use strum::EnumIter;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
/// This is used in newer jobs (that add additional enum states)
|
||||
///
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
use strum::EnumCount;
|
||||
#[cfg(test)]
|
||||
use strum::EnumIter;
|
||||
|
||||
|
||||
use utoipa::ToSchema;
|
||||
|
||||
#[cfg_attr(test, derive(EnumIter, EnumCount))]
|
||||
#[derive(Clone, Copy, Eq, PartialEq, Deserialize, Serialize, sqlx::Type,ToSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
@@ -51,10 +50,10 @@ impl ViewAs {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::common::view_as::ViewAs;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
use crate::common::view_as::ViewAs;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_default() {
|
||||
assert_eq!(ViewAs::default(), ViewAs::AnotherUser);
|
||||
|
||||
@@ -83,9 +82,9 @@ mod tests {
|
||||
}
|
||||
|
||||
mod traits {
|
||||
use crate::common::view_as::ViewAs;
|
||||
use crate::common::view_as::ViewAs;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn display() {
|
||||
let view_as = ViewAs::Moderator;
|
||||
assert_eq!(format!("{}", view_as), "moderator".to_string());
|
||||
@@ -105,11 +104,11 @@ mod tests {
|
||||
}
|
||||
|
||||
mod serde_serialization {
|
||||
use crate::common::view_as::ViewAs;
|
||||
use crate::common::view_as::ViewAs;
|
||||
|
||||
use super::CompositeType;
|
||||
use super::CompositeType;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn serialize() {
|
||||
let expected = "\"author\"".to_string(); // NB: Quoted
|
||||
|
||||
@@ -128,11 +127,11 @@ mod tests {
|
||||
}
|
||||
|
||||
mod serde_deserialization {
|
||||
use crate::common::view_as::ViewAs;
|
||||
use crate::common::view_as::ViewAs;
|
||||
|
||||
use super::CompositeType;
|
||||
use super::CompositeType;
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn deserialize() {
|
||||
let payload = "\"another_user\""; // NB: Quoted
|
||||
let value: ViewAs = serde_json::from_str(payload).unwrap();
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
use strum::EnumCount;
|
||||
#[cfg(test)]
|
||||
use strum::EnumIter;
|
||||
|
||||
/// Visibility
|
||||
///
|
||||
/// Used in various database tables (as enums! careful!) and the HTTP API to convey
|
||||
@@ -17,6 +16,7 @@ use strum::EnumIter;
|
||||
/// *DO NOT CHANGE VALUES WITHOUT A MIGRATION STRATEGY!*
|
||||
|
||||
use utoipa::ToSchema;
|
||||
|
||||
#[cfg_attr(test, derive(EnumIter, EnumCount))]
|
||||
#[derive(Clone, Copy, Eq, PartialEq, Deserialize, Serialize, sqlx::Type,ToSchema)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
|
||||
@@ -12,6 +12,9 @@ authors = [
|
||||
name = "reusable_types"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "tokens"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -2,9 +2,9 @@ use std::fmt::Debug;
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::prefixes::TokenPrefix;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
/// The primary key for "generic" inference jobs.
|
||||
#[derive(Clone, PartialEq, Eq, sqlx::Type, Debug, Serialize, Deserialize, Default, ToSchema)]
|
||||
|
||||
@@ -2,10 +2,10 @@ use std::fmt::Debug;
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::prefixes::TokenPrefix;
|
||||
|
||||
use utoipa::ToSchema;
|
||||
/// The primary key for the "model_weights" table.
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, sqlx::Type, Debug, Serialize, Deserialize,ToSchema)]
|
||||
#[sqlx(transparent)]
|
||||
|
||||
@@ -3,8 +3,8 @@ use std::fmt::Debug;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use utoipa::ToSchema;
|
||||
use crate::prefixes::TokenPrefix;
|
||||
|
||||
use crate::prefixes::TokenPrefix;
|
||||
|
||||
/// The primary key for Audit Logs.
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, sqlx::Type, Debug, Serialize, Deserialize, ToSchema)]
|
||||
|
||||
@@ -2,9 +2,10 @@ use std::fmt::Debug;
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::prefixes::TokenPrefix;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
/// The primary key for users.
|
||||
#[derive(Clone, PartialEq, Eq, sqlx::Type, Debug, Serialize, Deserialize, Default,ToSchema)]
|
||||
#[sqlx(transparent)]
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "dev-database-seed"
|
||||
path = "src/main.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
buckets = { path = "../../../_types/buckets" }
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
use log::info;
|
||||
use sqlx::{MySql, Pool};
|
||||
|
||||
use cloud_storage::remote_file_manager::media_descriptor::MediaVideoMp4Descriptor;
|
||||
use cloud_storage::remote_file_manager::remote_cloud_file_manager::RemoteCloudFileClient;
|
||||
use enums::by_table::media_files::media_file_type::MediaFileType;
|
||||
use enums::common::visibility::Visibility;
|
||||
use mysql_queries::queries::media_files::create::insert_media_file_from_cli_tool::{insert_media_file_from_cli_tool, InsertArgs};
|
||||
use errors::{anyhow, AnyhowResult};
|
||||
use mysql_queries::queries::media_files::create::insert_media_file_from_cli_tool::{insert_media_file_from_cli_tool, InsertArgs};
|
||||
use mysql_queries::queries::users::user::get_user_token_by_username::get_user_token_by_username;
|
||||
use storyteller_root::get_seed_tool_data_root;
|
||||
use tokens::tokens::media_files::MediaFileToken;
|
||||
use tokens::tokens::users::UserToken;
|
||||
|
||||
use crate::seeding::users::HANASHI_USERNAME;
|
||||
|
||||
|
||||
|
||||
pub async fn seed_test_videos(mysql_pool: &Pool<MySql>, user_token: UserToken) -> AnyhowResult<()> {
|
||||
let model_weight_token1 = MediaFileToken::generate_for_testing_and_dev_seeding_never_use_in_production_seriously();
|
||||
let seed_tool_data_root = get_seed_tool_data_root();
|
||||
|
||||
@@ -8,8 +8,8 @@ use cloud_storage::remote_file_manager::remote_cloud_bucket_details::RemoteCloud
|
||||
use cloud_storage::remote_file_manager::remote_cloud_file_manager::RemoteCloudFileClient;
|
||||
use cloud_storage::remote_file_manager::weights_descriptor::{WeightsLoRADescriptor, WeightsSD15Descriptor, WeightsWorkflowDescriptor};
|
||||
use enums::by_table::model_weights::{
|
||||
weights_category::WeightsCategory,
|
||||
weights_types::WeightsType,
|
||||
weights_category::WeightsCategory,
|
||||
weights_types::WeightsType,
|
||||
};
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::{anyhow, AnyhowResult};
|
||||
|
||||
@@ -7,8 +7,8 @@ use sqlx::{MySql, Pool};
|
||||
|
||||
use buckets::public::weight_files::bucket_file_path::WeightFileBucketPath;
|
||||
use enums::{
|
||||
by_table::model_weights::{weights_category::WeightsCategory, weights_types::WeightsType},
|
||||
common::visibility::Visibility,
|
||||
by_table::model_weights::{weights_category::WeightsCategory, weights_types::WeightsType},
|
||||
common::visibility::Visibility,
|
||||
};
|
||||
use errors::{anyhow, AnyhowResult};
|
||||
use filesys::file_read_bytes::file_read_bytes;
|
||||
@@ -17,8 +17,8 @@ use filesys::path_to_string::path_to_string;
|
||||
use hashing::sha256::sha256_hash_file::sha256_hash_file;
|
||||
use mimetypes::mimetype_for_bytes::get_mimetype_for_bytes;
|
||||
use mysql_queries::queries::model_weights::create::create_weight::{
|
||||
create_weight,
|
||||
CreateModelWeightsArgs,
|
||||
create_weight,
|
||||
CreateModelWeightsArgs,
|
||||
};
|
||||
use storyteller_root::get_seed_tool_data_root;
|
||||
use tokens::tokens::model_weights::ModelWeightToken;
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "dev-upload-media-file"
|
||||
path = "src/main.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
buckets = { path = "../../../_types/buckets" }
|
||||
|
||||
@@ -12,6 +12,9 @@ authors = [
|
||||
name = "scrape-test"
|
||||
path = "src/main.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -12,6 +12,9 @@ authors = [
|
||||
name = "db-backup"
|
||||
path = "src/main.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use easyenv::init_all_with_default_logging;
|
||||
use log::info;
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use easyenv::init_all_with_default_logging;
|
||||
|
||||
fn main() -> AnyhowResult<()> {
|
||||
init_all_with_default_logging(None);
|
||||
|
||||
@@ -12,6 +12,9 @@ authors = [
|
||||
name = "db-cleanup"
|
||||
path = "src/main.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
buckets = { path = "../../../_types/buckets" }
|
||||
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
use log::info;
|
||||
use sqlx::{MySql, Pool};
|
||||
use enums::common::view_as::ViewAs;
|
||||
|
||||
use enums::common::view_as::ViewAs;
|
||||
use errors::{anyhow, AnyhowResult};
|
||||
use mysql_queries::queries::media_files::delete_media_file::delete_media_file_as_mod;
|
||||
use mysql_queries::queries::media_files::list::list_media_files_for_user::{list_media_files_for_user, ListMediaFileForUserArgs};
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
use itertools::Itertools;
|
||||
use log::info;
|
||||
use sqlx::{FromRow, MySql, MySqlPool, Pool, QueryBuilder, Row};
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "elasticsearch-cli"
|
||||
path = "src/main.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
buckets = { path = "../../../_types/buckets" }
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "kubectl-pod-cleanup"
|
||||
path = "src/main.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
config = { path = "../../../lib/deprecated/config" }
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "lru-delete-models"
|
||||
path = "src/main.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
errors = { path = "../../../lib/errors" }
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "migration-tool"
|
||||
path = "src/main.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
buckets = { path = "../../../_types/buckets" }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use sqlx::{MySql, Pool};
|
||||
|
||||
use cloud_storage::bucket_client::BucketClient;
|
||||
|
||||
pub struct Deps {
|
||||
|
||||
@@ -13,9 +13,12 @@ publish = false
|
||||
name = "actix_cors_configs"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
errors = { path = "../../lib/errors" }
|
||||
#errors = { path = "../../lib/errors" }
|
||||
reusable_types = { path = "../../_types/reusable_types" }
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use std::net::Ipv4Addr;
|
||||
|
||||
use actix_cors::Cors;
|
||||
use log::warn;
|
||||
use url::{Host, Url};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use actix_cors::Cors;
|
||||
|
||||
use crate::util::netlify_branch_domain_matches::netlify_branch_domain_matches;
|
||||
|
||||
pub fn add_gotta_go_fast_test_branches(cors: Cors, _is_production: bool) -> Cors {
|
||||
|
||||
@@ -13,6 +13,9 @@ publish = false
|
||||
name = "actix_helpers"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
errors = { path = "../../lib/errors" }
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "cloud_storage"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::error::Error;
|
||||
use std::path::Path;
|
||||
use std::time::Duration;
|
||||
use errors::AnyhowResult;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use anyhow::bail;
|
||||
use log::info;
|
||||
@@ -10,8 +11,9 @@ use s3::creds::Credentials;
|
||||
use s3::region::Region;
|
||||
use tokio::fs::File;
|
||||
use tokio::io::AsyncReadExt;
|
||||
use std::error::Error;
|
||||
|
||||
|
||||
use errors::AnyhowResult;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct BucketClient {
|
||||
bucket: Bucket,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
use async_trait::async_trait;
|
||||
use log::info;
|
||||
use tokio::time::Duration;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use errors::AnyhowResult;
|
||||
|
||||
use crate::bucket_client::BucketClient;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
use std::path::PathBuf;
|
||||
use crockford::crockford_entropy_lower;
|
||||
|
||||
use buckets::util::hashed_directory_path_long_string;
|
||||
use crockford::crockford_entropy_lower;
|
||||
|
||||
use crate::remote_file_manager::file_descriptor::FileDescriptor;
|
||||
use crate::remote_file_manager::remote_cloud_bucket_details::RemoteCloudBucketDetails;
|
||||
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
use crate::remote_file_manager::media_descriptor;
|
||||
use crate::remote_file_manager::weights_descriptor::{self};
|
||||
|
||||
use super::file_descriptor::FileDescriptor;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
+7
-7
@@ -1,6 +1,6 @@
|
||||
use anyhow::anyhow;
|
||||
use buckets::public::media_files::bucket_file_path::MediaFileBucketPath;
|
||||
|
||||
use buckets::public::media_files::bucket_file_path::MediaFileBucketPath;
|
||||
use errors::AnyhowResult;
|
||||
use filesys::file_read_bytes::file_read_bytes;
|
||||
use filesys::file_size::file_size;
|
||||
@@ -112,15 +112,15 @@ impl RemoteCloudFileClient {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use async_trait::async_trait;
|
||||
use env_logger;
|
||||
use async_trait::async_trait;
|
||||
use env_logger;
|
||||
|
||||
use errors::AnyhowResult;
|
||||
use errors::AnyhowResult;
|
||||
|
||||
use crate::remote_file_manager::bucket_orchestration::BucketOrchestrationCore;
|
||||
use crate::remote_file_manager::weights_descriptor::WeightsLoRADescriptor;
|
||||
use crate::remote_file_manager::bucket_orchestration::BucketOrchestrationCore;
|
||||
use crate::remote_file_manager::weights_descriptor::WeightsLoRADescriptor;
|
||||
|
||||
struct BucketOrchestrationMock {}
|
||||
struct BucketOrchestrationMock {}
|
||||
|
||||
#[async_trait]
|
||||
impl BucketOrchestrationCore for BucketOrchestrationMock {
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "google_drive_common"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -5,6 +5,9 @@ edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "twitch_common"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -13,6 +13,9 @@ publish = false
|
||||
name = "bootstrap"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
easyenv = { path = "../easyenv" }
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "memory_caching"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "redis_caching"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
errors = { path = "../../errors" }
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "concurrency"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
# (None yet)
|
||||
|
||||
@@ -13,6 +13,9 @@ publish = false
|
||||
name = "cookies"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
errors = { path = "../errors" }
|
||||
|
||||
@@ -13,9 +13,12 @@ publish = false
|
||||
name = "collections"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
errors = { path = "../../errors" }
|
||||
#errors = { path = "../../errors" }
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
@@ -14,6 +14,9 @@ publish = false
|
||||
name = "crockford"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
# (None yet)
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "datetimes"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
# (None yet)
|
||||
|
||||
@@ -13,12 +13,15 @@ publish = false
|
||||
name = "primitives"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# NB: This is designed to be a central crate with few dependencies.
|
||||
# Consider the dependencies here wisely.
|
||||
|
||||
# Internal
|
||||
errors = { path = "../../errors" }
|
||||
#errors = { path = "../../errors" }
|
||||
|
||||
# External
|
||||
# (None)
|
||||
|
||||
@@ -19,3 +19,4 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
pub mod str_to_bool;
|
||||
pub mod try_str_to_num;
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
use std::ops::{AddAssign, MulAssign};
|
||||
use std::str::FromStr;
|
||||
|
||||
/// Convert string values to numerics
|
||||
/// The trait bounds aren't perfect, but are close enough.
|
||||
/// This is probably inferior to just using `u32::from_str` directly, but it
|
||||
/// serves as good documentation on generics.
|
||||
pub fn try_str_to_num<T>(input: &str) -> Result<T, <T as FromStr>::Err>
|
||||
where T: FromStr + Copy + AddAssign + MulAssign
|
||||
{
|
||||
let value = T::from_str(input)?;
|
||||
Ok(value)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::try_str_to_num::try_str_to_num;
|
||||
|
||||
mod u8 {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn parse() {
|
||||
assert_eq!(try_str_to_num::<u8>("0"), Ok(0u8));
|
||||
assert_eq!(try_str_to_num::<u8>("1"), Ok(1u8));
|
||||
assert_eq!(try_str_to_num::<u8>("5"), Ok(5u8));
|
||||
assert_eq!(try_str_to_num::<u8>("123"), Ok(123u8));
|
||||
assert_eq!(try_str_to_num::<u8>("255"), Ok(255u8));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn true_values() {
|
||||
assert!(try_str_to_num::<u8>("").is_err());
|
||||
assert!(try_str_to_num::<u8>("-1").is_err());
|
||||
assert!(try_str_to_num::<u8>("256").is_err());
|
||||
assert!(try_str_to_num::<u8>("foo").is_err());
|
||||
}
|
||||
}
|
||||
|
||||
mod i8 {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn parse() {
|
||||
assert_eq!(try_str_to_num::<i8>("0"), Ok(0i8));
|
||||
assert_eq!(try_str_to_num::<i8>("1"), Ok(1i8));
|
||||
assert_eq!(try_str_to_num::<i8>("5"), Ok(5i8));
|
||||
assert_eq!(try_str_to_num::<i8>("123"), Ok(123i8));
|
||||
assert_eq!(try_str_to_num::<i8>("-1"), Ok(-1i8));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn true_values() {
|
||||
assert!(try_str_to_num::<i8>("").is_err());
|
||||
assert!(try_str_to_num::<i8>("128").is_err());
|
||||
assert!(try_str_to_num::<i8>("256").is_err());
|
||||
assert!(try_str_to_num::<i8>("foo").is_err());
|
||||
}
|
||||
}
|
||||
|
||||
mod u32 {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn parse() {
|
||||
assert_eq!(try_str_to_num::<u32>("0"), Ok(0u32));
|
||||
assert_eq!(try_str_to_num::<u32>("1"), Ok(1u32));
|
||||
assert_eq!(try_str_to_num::<u32>("5"), Ok(5u32));
|
||||
assert_eq!(try_str_to_num::<u32>("123"), Ok(123u32));
|
||||
assert_eq!(try_str_to_num::<u32>("255"), Ok(255u32));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn true_values() {
|
||||
assert!(try_str_to_num::<u32>("").is_err());
|
||||
assert!(try_str_to_num::<u32>("-1").is_err());
|
||||
assert!(try_str_to_num::<u32>("foo").is_err());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "config"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
# TODO: Remove these dependencies.
|
||||
# These were introduced in refactoring. Config should have few, if any, dependencies.
|
||||
[dependencies]
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "container_common"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# External
|
||||
@@ -19,7 +22,6 @@ anyhow = "1.0.75"
|
||||
once_cell = "1.18.0"
|
||||
rand = "0.8.5"
|
||||
uuid = { version = "0.8.2", features = ["v4"] }
|
||||
log = "0.4.14"
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
@@ -12,11 +12,13 @@ publish = false
|
||||
name = "http_server_common"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
errors = { path = "../../errors" }
|
||||
reusable_types = { path = "../../../_types/reusable_types" }
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
@@ -24,7 +26,6 @@ my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
# External
|
||||
anyhow = "1.0.75"
|
||||
base64 = "0.21.0"
|
||||
chrono = { version = "0.4.22", features = ["serde"] }
|
||||
log = "0.4.14"
|
||||
once_cell = "1.18.0"
|
||||
regex = "1.5.4"
|
||||
@@ -44,4 +45,3 @@ serde_json = "1.0.108"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-rt = "2.9.0"
|
||||
speculoos = "0.11.0" # Fluent assertions
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "easyenv"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
storyteller_root = { path = "../storyteller_root" }
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use std::env;
|
||||
|
||||
|
||||
/// Name of the environment variable Rust's env logger uses
|
||||
pub const ENV_RUST_LOG : &str = "RUST_LOG";
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "elasticsearch_schema"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
enums = { path = "../../_types/enums" }
|
||||
|
||||
@@ -9,6 +9,9 @@ path = "src/lib.rs"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
errors = { path = "../errors" }
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
/// Public re-exports
|
||||
pub mod letter_exports {
|
||||
pub use lettre::Message;
|
||||
pub use lettre::message::header::ContentType;
|
||||
pub use lettre::message::Mailbox;
|
||||
pub use lettre::Message;
|
||||
pub use lettre::message::header::ContentType;
|
||||
pub use lettre::message::Mailbox;
|
||||
}
|
||||
|
||||
pub mod smtp_email_sender;
|
||||
|
||||
@@ -13,6 +13,9 @@ publish = false
|
||||
name = "errors"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# NB: This is one of the most central crates in the monorepo and everything depends on it.
|
||||
# Consider the dependencies here wisely.
|
||||
|
||||
@@ -14,6 +14,9 @@ publish = false
|
||||
name = "archives"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
errors = { path = "../../errors" }
|
||||
|
||||
@@ -13,6 +13,9 @@ publish = false
|
||||
name = "filesys"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
errors = { path = "../../errors" }
|
||||
|
||||
@@ -13,6 +13,9 @@ publish = false
|
||||
name = "hashing"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
errors = { path = "../../errors" }
|
||||
@@ -21,7 +24,7 @@ errors = { path = "../../errors" }
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
bcrypt = "0.8" # password hashes
|
||||
bcrypt = "0.15" # password hashes
|
||||
data-encoding = "2.3.2"
|
||||
md-5 = "0.9.1" # DO NOT USE FOR SERIOUS CRYPTO (we use this for gravatar)
|
||||
ring = "0.17.0-alpha.10"
|
||||
|
||||
@@ -14,6 +14,9 @@ publish = false
|
||||
name = "images"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -20,8 +20,9 @@
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
// Re-export image to everyone importing this library
|
||||
pub use image;
|
||||
|
||||
pub mod resize_image_file_preserving_aspect;
|
||||
pub mod resize_preserving_aspect;
|
||||
|
||||
// Re-export image to everyone importing this library
|
||||
pub use image;
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "media" # NB: Public "media" crate was squatted, so we're good to use this name internally.
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -13,6 +13,9 @@ publish = false
|
||||
name = "mimetypes"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
@@ -13,6 +13,9 @@ publish = false
|
||||
name = "videos"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "idempotency"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
# errors = { path = "../../lib/errors" }
|
||||
|
||||
@@ -15,6 +15,9 @@ publish = false
|
||||
name = "jobs_common"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -13,6 +13,9 @@ publish = false
|
||||
name = "logging"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
# (None yet)
|
||||
@@ -21,7 +24,6 @@ path = "src/lib.rs"
|
||||
my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
dotenv = "0.15.0"
|
||||
env_logger = "0.10.1"
|
||||
log = "0.4.20"
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ publish = false
|
||||
name = "migration"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Internal
|
||||
buckets = { path = "../../_types/buckets" }
|
||||
@@ -33,7 +36,6 @@ serde = "1.0.125"
|
||||
serde_derive = "1.0.125"
|
||||
serde_json = "1.0.108"
|
||||
toml = "0.5.8"
|
||||
serial_test = "2.0.0"
|
||||
|
||||
# Runtime + Clients
|
||||
tokio = { version = "1.34.0", features = ["full"] }
|
||||
|
||||
@@ -2,8 +2,8 @@ use chrono::{DateTime, Utc};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use sqlx::MySql;
|
||||
use sqlx::pool::PoolConnection;
|
||||
use enums::by_table::tts_models::tts_model_type::TtsModelType;
|
||||
|
||||
use enums::by_table::tts_models::tts_model_type::TtsModelType;
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::AnyhowResult;
|
||||
use mysql_queries::column_types::vocoder_type::VocoderType;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use chrono::{DateTime, Utc};
|
||||
use sqlx::MySql;
|
||||
use sqlx::pool::PoolConnection;
|
||||
|
||||
use enums::by_table::model_weights::weights_types::WeightsType;
|
||||
use enums::by_table::voice_conversion_models::voice_conversion_model_type::VoiceConversionModelType;
|
||||
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::AnyhowResult;
|
||||
use mysql_queries::queries::model_weights::list::list_model_weights_for_voice_conversion::{list_model_weights_for_voice_conversion, ModelWeightForVoiceConversion};
|
||||
|
||||
@@ -12,6 +12,9 @@ publish = false
|
||||
name = "mysql_queries"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use std::collections::HashMap;
|
||||
use tokens::tokens::media_files::MediaFileToken;
|
||||
use tokens::tokens::model_weights::ModelWeightToken;
|
||||
|
||||
use enums::common::visibility::Visibility;
|
||||
use enums::no_table::style_transfer::style_transfer_name::StyleTransferName;
|
||||
use tokens::tokens::media_files::MediaFileToken;
|
||||
use tokens::tokens::model_weights::ModelWeightToken;
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(untagged)]
|
||||
@@ -135,6 +136,16 @@ pub struct WorkflowArgs {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub rollout_python_workflow_args: Option<bool>,
|
||||
|
||||
// TODO(bt,2024-05-13): This is a temporary rollout flag to enable us to do Python-side mapping of job args
|
||||
#[serde(rename = "sv")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub skip_process_video: Option<bool>,
|
||||
|
||||
// TODO(bt,2024-05-13): This is a temporary rollout flag to enable us to do Python-side mapping of job args
|
||||
#[serde(rename = "sp")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub sleep_millis: Option<u64>,
|
||||
|
||||
#[serde(rename = "fd")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub use_face_detailer: Option<bool>,
|
||||
@@ -142,4 +153,8 @@ pub struct WorkflowArgs {
|
||||
#[serde(rename = "up")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub use_upscaler: Option<bool>,
|
||||
|
||||
#[serde(rename = "s")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub strength: Option<f32>,
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user