diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Cargo.lock | 1077 | ||||
-rw-r--r-- | Cargo.toml | 12 | ||||
-rw-r--r-- | src/apis/mod.rs | 1 | ||||
-rw-r--r-- | src/apis/modrinth.rs | 104 | ||||
-rw-r--r-- | src/db.rs | 0 | ||||
-rw-r--r-- | src/lib.rs | 4 | ||||
-rw-r--r-- | src/main.rs | 7 | ||||
-rw-r--r-- | src/update.rs | 8 |
9 files changed, 1215 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ebdb388 --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | /target | ||
2 | /api-tests \ No newline at end of file | ||
diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..815536d --- /dev/null +++ b/Cargo.lock | |||
@@ -0,0 +1,1077 @@ | |||
1 | # This file is automatically @generated by Cargo. | ||
2 | # It is not intended for manual editing. | ||
3 | version = 3 | ||
4 | |||
5 | [[package]] | ||
6 | name = "autocfg" | ||
7 | version = "1.1.0" | ||
8 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
9 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" | ||
10 | |||
11 | [[package]] | ||
12 | name = "base64" | ||
13 | version = "0.13.1" | ||
14 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
15 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" | ||
16 | |||
17 | [[package]] | ||
18 | name = "bitflags" | ||
19 | version = "1.3.2" | ||
20 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
21 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" | ||
22 | |||
23 | [[package]] | ||
24 | name = "bumpalo" | ||
25 | version = "3.11.1" | ||
26 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
27 | checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" | ||
28 | |||
29 | [[package]] | ||
30 | name = "bytes" | ||
31 | version = "1.2.1" | ||
32 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
33 | checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" | ||
34 | |||
35 | [[package]] | ||
36 | name = "cc" | ||
37 | version = "1.0.73" | ||
38 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
39 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" | ||
40 | |||
41 | [[package]] | ||
42 | name = "cfg-if" | ||
43 | version = "1.0.0" | ||
44 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
45 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" | ||
46 | |||
47 | [[package]] | ||
48 | name = "core-foundation" | ||
49 | version = "0.9.3" | ||
50 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
51 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" | ||
52 | dependencies = [ | ||
53 | "core-foundation-sys", | ||
54 | "libc", | ||
55 | ] | ||
56 | |||
57 | [[package]] | ||
58 | name = "core-foundation-sys" | ||
59 | version = "0.8.3" | ||
60 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
61 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" | ||
62 | |||
63 | [[package]] | ||
64 | name = "encoding_rs" | ||
65 | version = "0.8.31" | ||
66 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
67 | checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" | ||
68 | dependencies = [ | ||
69 | "cfg-if", | ||
70 | ] | ||
71 | |||
72 | [[package]] | ||
73 | name = "fastrand" | ||
74 | version = "1.8.0" | ||
75 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
76 | checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" | ||
77 | dependencies = [ | ||
78 | "instant", | ||
79 | ] | ||
80 | |||
81 | [[package]] | ||
82 | name = "fnv" | ||
83 | version = "1.0.7" | ||
84 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
85 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" | ||
86 | |||
87 | [[package]] | ||
88 | name = "foreign-types" | ||
89 | version = "0.3.2" | ||
90 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
91 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" | ||
92 | dependencies = [ | ||
93 | "foreign-types-shared", | ||
94 | ] | ||
95 | |||
96 | [[package]] | ||
97 | name = "foreign-types-shared" | ||
98 | version = "0.1.1" | ||
99 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
100 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" | ||
101 | |||
102 | [[package]] | ||
103 | name = "form_urlencoded" | ||
104 | version = "1.1.0" | ||
105 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
106 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" | ||
107 | dependencies = [ | ||
108 | "percent-encoding", | ||
109 | ] | ||
110 | |||
111 | [[package]] | ||
112 | name = "futures-channel" | ||
113 | version = "0.3.25" | ||
114 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
115 | checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" | ||
116 | dependencies = [ | ||
117 | "futures-core", | ||
118 | ] | ||
119 | |||
120 | [[package]] | ||
121 | name = "futures-core" | ||
122 | version = "0.3.25" | ||
123 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
124 | checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" | ||
125 | |||
126 | [[package]] | ||
127 | name = "futures-sink" | ||
128 | version = "0.3.25" | ||
129 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
130 | checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" | ||
131 | |||
132 | [[package]] | ||
133 | name = "futures-task" | ||
134 | version = "0.3.25" | ||
135 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
136 | checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" | ||
137 | |||
138 | [[package]] | ||
139 | name = "futures-util" | ||
140 | version = "0.3.25" | ||
141 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
142 | checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" | ||
143 | dependencies = [ | ||
144 | "futures-core", | ||
145 | "futures-task", | ||
146 | "pin-project-lite", | ||
147 | "pin-utils", | ||
148 | ] | ||
149 | |||
150 | [[package]] | ||
151 | name = "h2" | ||
152 | version = "0.3.15" | ||
153 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
154 | checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" | ||
155 | dependencies = [ | ||
156 | "bytes", | ||
157 | "fnv", | ||
158 | "futures-core", | ||
159 | "futures-sink", | ||
160 | "futures-util", | ||
161 | "http", | ||
162 | "indexmap", | ||
163 | "slab", | ||
164 | "tokio", | ||
165 | "tokio-util", | ||
166 | "tracing", | ||
167 | ] | ||
168 | |||
169 | [[package]] | ||
170 | name = "hashbrown" | ||
171 | version = "0.12.3" | ||
172 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
173 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" | ||
174 | |||
175 | [[package]] | ||
176 | name = "hermit-abi" | ||
177 | version = "0.1.19" | ||
178 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
179 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" | ||
180 | dependencies = [ | ||
181 | "libc", | ||
182 | ] | ||
183 | |||
184 | [[package]] | ||
185 | name = "http" | ||
186 | version = "0.2.8" | ||
187 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
188 | checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" | ||
189 | dependencies = [ | ||
190 | "bytes", | ||
191 | "fnv", | ||
192 | "itoa", | ||
193 | ] | ||
194 | |||
195 | [[package]] | ||
196 | name = "http-body" | ||
197 | version = "0.4.5" | ||
198 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
199 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" | ||
200 | dependencies = [ | ||
201 | "bytes", | ||
202 | "http", | ||
203 | "pin-project-lite", | ||
204 | ] | ||
205 | |||
206 | [[package]] | ||
207 | name = "httparse" | ||
208 | version = "1.8.0" | ||
209 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
210 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" | ||
211 | |||
212 | [[package]] | ||
213 | name = "httpdate" | ||
214 | version = "1.0.2" | ||
215 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
216 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" | ||
217 | |||
218 | [[package]] | ||
219 | name = "hyper" | ||
220 | version = "0.14.20" | ||
221 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
222 | checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" | ||
223 | dependencies = [ | ||
224 | "bytes", | ||
225 | "futures-channel", | ||
226 | "futures-core", | ||
227 | "futures-util", | ||
228 | "h2", | ||
229 | "http", | ||
230 | "http-body", | ||
231 | "httparse", | ||
232 | "httpdate", | ||
233 | "itoa", | ||
234 | "pin-project-lite", | ||
235 | "socket2", | ||
236 | "tokio", | ||
237 | "tower-service", | ||
238 | "tracing", | ||
239 | "want", | ||
240 | ] | ||
241 | |||
242 | [[package]] | ||
243 | name = "hyper-tls" | ||
244 | version = "0.5.0" | ||
245 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
246 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" | ||
247 | dependencies = [ | ||
248 | "bytes", | ||
249 | "hyper", | ||
250 | "native-tls", | ||
251 | "tokio", | ||
252 | "tokio-native-tls", | ||
253 | ] | ||
254 | |||
255 | [[package]] | ||
256 | name = "idna" | ||
257 | version = "0.3.0" | ||
258 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
259 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" | ||
260 | dependencies = [ | ||
261 | "unicode-bidi", | ||
262 | "unicode-normalization", | ||
263 | ] | ||
264 | |||
265 | [[package]] | ||
266 | name = "indexmap" | ||
267 | version = "1.9.1" | ||
268 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
269 | checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" | ||
270 | dependencies = [ | ||
271 | "autocfg", | ||
272 | "hashbrown", | ||
273 | ] | ||
274 | |||
275 | [[package]] | ||
276 | name = "instant" | ||
277 | version = "0.1.12" | ||
278 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
279 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" | ||
280 | dependencies = [ | ||
281 | "cfg-if", | ||
282 | ] | ||
283 | |||
284 | [[package]] | ||
285 | name = "ipnet" | ||
286 | version = "2.5.0" | ||
287 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
288 | checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" | ||
289 | |||
290 | [[package]] | ||
291 | name = "itoa" | ||
292 | version = "1.0.4" | ||
293 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
294 | checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" | ||
295 | |||
296 | [[package]] | ||
297 | name = "js-sys" | ||
298 | version = "0.3.60" | ||
299 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
300 | checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" | ||
301 | dependencies = [ | ||
302 | "wasm-bindgen", | ||
303 | ] | ||
304 | |||
305 | [[package]] | ||
306 | name = "lazy_static" | ||
307 | version = "1.4.0" | ||
308 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
309 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" | ||
310 | |||
311 | [[package]] | ||
312 | name = "libc" | ||
313 | version = "0.2.137" | ||
314 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
315 | checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" | ||
316 | |||
317 | [[package]] | ||
318 | name = "lock_api" | ||
319 | version = "0.4.9" | ||
320 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
321 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" | ||
322 | dependencies = [ | ||
323 | "autocfg", | ||
324 | "scopeguard", | ||
325 | ] | ||
326 | |||
327 | [[package]] | ||
328 | name = "log" | ||
329 | version = "0.4.17" | ||
330 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
331 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" | ||
332 | dependencies = [ | ||
333 | "cfg-if", | ||
334 | ] | ||
335 | |||
336 | [[package]] | ||
337 | name = "memchr" | ||
338 | version = "2.5.0" | ||
339 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
340 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" | ||
341 | |||
342 | [[package]] | ||
343 | name = "mime" | ||
344 | version = "0.3.16" | ||
345 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
346 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" | ||
347 | |||
348 | [[package]] | ||
349 | name = "mio" | ||
350 | version = "0.8.5" | ||
351 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
352 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" | ||
353 | dependencies = [ | ||
354 | "libc", | ||
355 | "log", | ||
356 | "wasi", | ||
357 | "windows-sys 0.42.0", | ||
358 | ] | ||
359 | |||
360 | [[package]] | ||
361 | name = "modlist" | ||
362 | version = "0.1.0" | ||
363 | dependencies = [ | ||
364 | "reqwest", | ||
365 | "serde", | ||
366 | "serde_json", | ||
367 | "tokio", | ||
368 | ] | ||
369 | |||
370 | [[package]] | ||
371 | name = "native-tls" | ||
372 | version = "0.2.10" | ||
373 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
374 | checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" | ||
375 | dependencies = [ | ||
376 | "lazy_static", | ||
377 | "libc", | ||
378 | "log", | ||
379 | "openssl", | ||
380 | "openssl-probe", | ||
381 | "openssl-sys", | ||
382 | "schannel", | ||
383 | "security-framework", | ||
384 | "security-framework-sys", | ||
385 | "tempfile", | ||
386 | ] | ||
387 | |||
388 | [[package]] | ||
389 | name = "num_cpus" | ||
390 | version = "1.13.1" | ||
391 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
392 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" | ||
393 | dependencies = [ | ||
394 | "hermit-abi", | ||
395 | "libc", | ||
396 | ] | ||
397 | |||
398 | [[package]] | ||
399 | name = "once_cell" | ||
400 | version = "1.16.0" | ||
401 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
402 | checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" | ||
403 | |||
404 | [[package]] | ||
405 | name = "openssl" | ||
406 | version = "0.10.42" | ||
407 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
408 | checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" | ||
409 | dependencies = [ | ||
410 | "bitflags", | ||
411 | "cfg-if", | ||
412 | "foreign-types", | ||
413 | "libc", | ||
414 | "once_cell", | ||
415 | "openssl-macros", | ||
416 | "openssl-sys", | ||
417 | ] | ||
418 | |||
419 | [[package]] | ||
420 | name = "openssl-macros" | ||
421 | version = "0.1.0" | ||
422 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
423 | checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" | ||
424 | dependencies = [ | ||
425 | "proc-macro2", | ||
426 | "quote", | ||
427 | "syn", | ||
428 | ] | ||
429 | |||
430 | [[package]] | ||
431 | name = "openssl-probe" | ||
432 | version = "0.1.5" | ||
433 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
434 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" | ||
435 | |||
436 | [[package]] | ||
437 | name = "openssl-sys" | ||
438 | version = "0.9.77" | ||
439 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
440 | checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a" | ||
441 | dependencies = [ | ||
442 | "autocfg", | ||
443 | "cc", | ||
444 | "libc", | ||
445 | "pkg-config", | ||
446 | "vcpkg", | ||
447 | ] | ||
448 | |||
449 | [[package]] | ||
450 | name = "parking_lot" | ||
451 | version = "0.12.1" | ||
452 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
453 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" | ||
454 | dependencies = [ | ||
455 | "lock_api", | ||
456 | "parking_lot_core", | ||
457 | ] | ||
458 | |||
459 | [[package]] | ||
460 | name = "parking_lot_core" | ||
461 | version = "0.9.4" | ||
462 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
463 | checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" | ||
464 | dependencies = [ | ||
465 | "cfg-if", | ||
466 | "libc", | ||
467 | "redox_syscall", | ||
468 | "smallvec", | ||
469 | "windows-sys 0.42.0", | ||
470 | ] | ||
471 | |||
472 | [[package]] | ||
473 | name = "percent-encoding" | ||
474 | version = "2.2.0" | ||
475 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
476 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" | ||
477 | |||
478 | [[package]] | ||
479 | name = "pin-project-lite" | ||
480 | version = "0.2.9" | ||
481 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
482 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" | ||
483 | |||
484 | [[package]] | ||
485 | name = "pin-utils" | ||
486 | version = "0.1.0" | ||
487 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
488 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" | ||
489 | |||
490 | [[package]] | ||
491 | name = "pkg-config" | ||
492 | version = "0.3.26" | ||
493 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
494 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" | ||
495 | |||
496 | [[package]] | ||
497 | name = "proc-macro2" | ||
498 | version = "1.0.47" | ||
499 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
500 | checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" | ||
501 | dependencies = [ | ||
502 | "unicode-ident", | ||
503 | ] | ||
504 | |||
505 | [[package]] | ||
506 | name = "quote" | ||
507 | version = "1.0.21" | ||
508 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
509 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" | ||
510 | dependencies = [ | ||
511 | "proc-macro2", | ||
512 | ] | ||
513 | |||
514 | [[package]] | ||
515 | name = "redox_syscall" | ||
516 | version = "0.2.16" | ||
517 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
518 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" | ||
519 | dependencies = [ | ||
520 | "bitflags", | ||
521 | ] | ||
522 | |||
523 | [[package]] | ||
524 | name = "remove_dir_all" | ||
525 | version = "0.5.3" | ||
526 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
527 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" | ||
528 | dependencies = [ | ||
529 | "winapi", | ||
530 | ] | ||
531 | |||
532 | [[package]] | ||
533 | name = "reqwest" | ||
534 | version = "0.11.12" | ||
535 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
536 | checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" | ||
537 | dependencies = [ | ||
538 | "base64", | ||
539 | "bytes", | ||
540 | "encoding_rs", | ||
541 | "futures-core", | ||
542 | "futures-util", | ||
543 | "h2", | ||
544 | "http", | ||
545 | "http-body", | ||
546 | "hyper", | ||
547 | "hyper-tls", | ||
548 | "ipnet", | ||
549 | "js-sys", | ||
550 | "log", | ||
551 | "mime", | ||
552 | "native-tls", | ||
553 | "once_cell", | ||
554 | "percent-encoding", | ||
555 | "pin-project-lite", | ||
556 | "serde", | ||
557 | "serde_json", | ||
558 | "serde_urlencoded", | ||
559 | "tokio", | ||
560 | "tokio-native-tls", | ||
561 | "tower-service", | ||
562 | "url", | ||
563 | "wasm-bindgen", | ||
564 | "wasm-bindgen-futures", | ||
565 | "web-sys", | ||
566 | "winreg", | ||
567 | ] | ||
568 | |||
569 | [[package]] | ||
570 | name = "ryu" | ||
571 | version = "1.0.11" | ||
572 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
573 | checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" | ||
574 | |||
575 | [[package]] | ||
576 | name = "schannel" | ||
577 | version = "0.1.20" | ||
578 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
579 | checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" | ||
580 | dependencies = [ | ||
581 | "lazy_static", | ||
582 | "windows-sys 0.36.1", | ||
583 | ] | ||
584 | |||
585 | [[package]] | ||
586 | name = "scopeguard" | ||
587 | version = "1.1.0" | ||
588 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
589 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" | ||
590 | |||
591 | [[package]] | ||
592 | name = "security-framework" | ||
593 | version = "2.7.0" | ||
594 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
595 | checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" | ||
596 | dependencies = [ | ||
597 | "bitflags", | ||
598 | "core-foundation", | ||
599 | "core-foundation-sys", | ||
600 | "libc", | ||
601 | "security-framework-sys", | ||
602 | ] | ||
603 | |||
604 | [[package]] | ||
605 | name = "security-framework-sys" | ||
606 | version = "2.6.1" | ||
607 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
608 | checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" | ||
609 | dependencies = [ | ||
610 | "core-foundation-sys", | ||
611 | "libc", | ||
612 | ] | ||
613 | |||
614 | [[package]] | ||
615 | name = "serde" | ||
616 | version = "1.0.147" | ||
617 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
618 | checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" | ||
619 | dependencies = [ | ||
620 | "serde_derive", | ||
621 | ] | ||
622 | |||
623 | [[package]] | ||
624 | name = "serde_derive" | ||
625 | version = "1.0.147" | ||
626 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
627 | checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" | ||
628 | dependencies = [ | ||
629 | "proc-macro2", | ||
630 | "quote", | ||
631 | "syn", | ||
632 | ] | ||
633 | |||
634 | [[package]] | ||
635 | name = "serde_json" | ||
636 | version = "1.0.87" | ||
637 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
638 | checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" | ||
639 | dependencies = [ | ||
640 | "itoa", | ||
641 | "ryu", | ||
642 | "serde", | ||
643 | ] | ||
644 | |||
645 | [[package]] | ||
646 | name = "serde_urlencoded" | ||
647 | version = "0.7.1" | ||
648 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
649 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" | ||
650 | dependencies = [ | ||
651 | "form_urlencoded", | ||
652 | "itoa", | ||
653 | "ryu", | ||
654 | "serde", | ||
655 | ] | ||
656 | |||
657 | [[package]] | ||
658 | name = "signal-hook-registry" | ||
659 | version = "1.4.0" | ||
660 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
661 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" | ||
662 | dependencies = [ | ||
663 | "libc", | ||
664 | ] | ||
665 | |||
666 | [[package]] | ||
667 | name = "slab" | ||
668 | version = "0.4.7" | ||
669 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
670 | checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" | ||
671 | dependencies = [ | ||
672 | "autocfg", | ||
673 | ] | ||
674 | |||
675 | [[package]] | ||
676 | name = "smallvec" | ||
677 | version = "1.10.0" | ||
678 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
679 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" | ||
680 | |||
681 | [[package]] | ||
682 | name = "socket2" | ||
683 | version = "0.4.7" | ||
684 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
685 | checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" | ||
686 | dependencies = [ | ||
687 | "libc", | ||
688 | "winapi", | ||
689 | ] | ||
690 | |||
691 | [[package]] | ||
692 | name = "syn" | ||
693 | version = "1.0.103" | ||
694 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
695 | checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" | ||
696 | dependencies = [ | ||
697 | "proc-macro2", | ||
698 | "quote", | ||
699 | "unicode-ident", | ||
700 | ] | ||
701 | |||
702 | [[package]] | ||
703 | name = "tempfile" | ||
704 | version = "3.3.0" | ||
705 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
706 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" | ||
707 | dependencies = [ | ||
708 | "cfg-if", | ||
709 | "fastrand", | ||
710 | "libc", | ||
711 | "redox_syscall", | ||
712 | "remove_dir_all", | ||
713 | "winapi", | ||
714 | ] | ||
715 | |||
716 | [[package]] | ||
717 | name = "tinyvec" | ||
718 | version = "1.6.0" | ||
719 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
720 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" | ||
721 | dependencies = [ | ||
722 | "tinyvec_macros", | ||
723 | ] | ||
724 | |||
725 | [[package]] | ||
726 | name = "tinyvec_macros" | ||
727 | version = "0.1.0" | ||
728 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
729 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" | ||
730 | |||
731 | [[package]] | ||
732 | name = "tokio" | ||
733 | version = "1.21.2" | ||
734 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
735 | checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" | ||
736 | dependencies = [ | ||
737 | "autocfg", | ||
738 | "bytes", | ||
739 | "libc", | ||
740 | "memchr", | ||
741 | "mio", | ||
742 | "num_cpus", | ||
743 | "parking_lot", | ||
744 | "pin-project-lite", | ||
745 | "signal-hook-registry", | ||
746 | "socket2", | ||
747 | "tokio-macros", | ||
748 | "winapi", | ||
749 | ] | ||
750 | |||
751 | [[package]] | ||
752 | name = "tokio-macros" | ||
753 | version = "1.8.0" | ||
754 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
755 | checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" | ||
756 | dependencies = [ | ||
757 | "proc-macro2", | ||
758 | "quote", | ||
759 | "syn", | ||
760 | ] | ||
761 | |||
762 | [[package]] | ||
763 | name = "tokio-native-tls" | ||
764 | version = "0.3.0" | ||
765 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
766 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" | ||
767 | dependencies = [ | ||
768 | "native-tls", | ||
769 | "tokio", | ||
770 | ] | ||
771 | |||
772 | [[package]] | ||
773 | name = "tokio-util" | ||
774 | version = "0.7.4" | ||
775 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
776 | checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" | ||
777 | dependencies = [ | ||
778 | "bytes", | ||
779 | "futures-core", | ||
780 | "futures-sink", | ||
781 | "pin-project-lite", | ||
782 | "tokio", | ||
783 | "tracing", | ||
784 | ] | ||
785 | |||
786 | [[package]] | ||
787 | name = "tower-service" | ||
788 | version = "0.3.2" | ||
789 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
790 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" | ||
791 | |||
792 | [[package]] | ||
793 | name = "tracing" | ||
794 | version = "0.1.37" | ||
795 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
796 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" | ||
797 | dependencies = [ | ||
798 | "cfg-if", | ||
799 | "pin-project-lite", | ||
800 | "tracing-core", | ||
801 | ] | ||
802 | |||
803 | [[package]] | ||
804 | name = "tracing-core" | ||
805 | version = "0.1.30" | ||
806 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
807 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" | ||
808 | dependencies = [ | ||
809 | "once_cell", | ||
810 | ] | ||
811 | |||
812 | [[package]] | ||
813 | name = "try-lock" | ||
814 | version = "0.2.3" | ||
815 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
816 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" | ||
817 | |||
818 | [[package]] | ||
819 | name = "unicode-bidi" | ||
820 | version = "0.3.8" | ||
821 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
822 | checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" | ||
823 | |||
824 | [[package]] | ||
825 | name = "unicode-ident" | ||
826 | version = "1.0.5" | ||
827 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
828 | checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" | ||
829 | |||
830 | [[package]] | ||
831 | name = "unicode-normalization" | ||
832 | version = "0.1.22" | ||
833 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
834 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" | ||
835 | dependencies = [ | ||
836 | "tinyvec", | ||
837 | ] | ||
838 | |||
839 | [[package]] | ||
840 | name = "url" | ||
841 | version = "2.3.1" | ||
842 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
843 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" | ||
844 | dependencies = [ | ||
845 | "form_urlencoded", | ||
846 | "idna", | ||
847 | "percent-encoding", | ||
848 | ] | ||
849 | |||
850 | [[package]] | ||
851 | name = "vcpkg" | ||
852 | version = "0.2.15" | ||
853 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
854 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" | ||
855 | |||
856 | [[package]] | ||
857 | name = "want" | ||
858 | version = "0.3.0" | ||
859 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
860 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" | ||
861 | dependencies = [ | ||
862 | "log", | ||
863 | "try-lock", | ||
864 | ] | ||
865 | |||
866 | [[package]] | ||
867 | name = "wasi" | ||
868 | version = "0.11.0+wasi-snapshot-preview1" | ||
869 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
870 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" | ||
871 | |||
872 | [[package]] | ||
873 | name = "wasm-bindgen" | ||
874 | version = "0.2.83" | ||
875 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
876 | checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" | ||
877 | dependencies = [ | ||
878 | "cfg-if", | ||
879 | "wasm-bindgen-macro", | ||
880 | ] | ||
881 | |||
882 | [[package]] | ||
883 | name = "wasm-bindgen-backend" | ||
884 | version = "0.2.83" | ||
885 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
886 | checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" | ||
887 | dependencies = [ | ||
888 | "bumpalo", | ||
889 | "log", | ||
890 | "once_cell", | ||
891 | "proc-macro2", | ||
892 | "quote", | ||
893 | "syn", | ||
894 | "wasm-bindgen-shared", | ||
895 | ] | ||
896 | |||
897 | [[package]] | ||
898 | name = "wasm-bindgen-futures" | ||
899 | version = "0.4.33" | ||
900 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
901 | checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" | ||
902 | dependencies = [ | ||
903 | "cfg-if", | ||
904 | "js-sys", | ||
905 | "wasm-bindgen", | ||
906 | "web-sys", | ||
907 | ] | ||
908 | |||
909 | [[package]] | ||
910 | name = "wasm-bindgen-macro" | ||
911 | version = "0.2.83" | ||
912 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
913 | checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" | ||
914 | dependencies = [ | ||
915 | "quote", | ||
916 | "wasm-bindgen-macro-support", | ||
917 | ] | ||
918 | |||
919 | [[package]] | ||
920 | name = "wasm-bindgen-macro-support" | ||
921 | version = "0.2.83" | ||
922 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
923 | checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" | ||
924 | dependencies = [ | ||
925 | "proc-macro2", | ||
926 | "quote", | ||
927 | "syn", | ||
928 | "wasm-bindgen-backend", | ||
929 | "wasm-bindgen-shared", | ||
930 | ] | ||
931 | |||
932 | [[package]] | ||
933 | name = "wasm-bindgen-shared" | ||
934 | version = "0.2.83" | ||
935 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
936 | checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" | ||
937 | |||
938 | [[package]] | ||
939 | name = "web-sys" | ||
940 | version = "0.3.60" | ||
941 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
942 | checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" | ||
943 | dependencies = [ | ||
944 | "js-sys", | ||
945 | "wasm-bindgen", | ||
946 | ] | ||
947 | |||
948 | [[package]] | ||
949 | name = "winapi" | ||
950 | version = "0.3.9" | ||
951 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
952 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" | ||
953 | dependencies = [ | ||
954 | "winapi-i686-pc-windows-gnu", | ||
955 | "winapi-x86_64-pc-windows-gnu", | ||
956 | ] | ||
957 | |||
958 | [[package]] | ||
959 | name = "winapi-i686-pc-windows-gnu" | ||
960 | version = "0.4.0" | ||
961 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
962 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" | ||
963 | |||
964 | [[package]] | ||
965 | name = "winapi-x86_64-pc-windows-gnu" | ||
966 | version = "0.4.0" | ||
967 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
968 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | ||
969 | |||
970 | [[package]] | ||
971 | name = "windows-sys" | ||
972 | version = "0.36.1" | ||
973 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
974 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" | ||
975 | dependencies = [ | ||
976 | "windows_aarch64_msvc 0.36.1", | ||
977 | "windows_i686_gnu 0.36.1", | ||
978 | "windows_i686_msvc 0.36.1", | ||
979 | "windows_x86_64_gnu 0.36.1", | ||
980 | "windows_x86_64_msvc 0.36.1", | ||
981 | ] | ||
982 | |||
983 | [[package]] | ||
984 | name = "windows-sys" | ||
985 | version = "0.42.0" | ||
986 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
987 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" | ||
988 | dependencies = [ | ||
989 | "windows_aarch64_gnullvm", | ||
990 | "windows_aarch64_msvc 0.42.0", | ||
991 | "windows_i686_gnu 0.42.0", | ||
992 | "windows_i686_msvc 0.42.0", | ||
993 | "windows_x86_64_gnu 0.42.0", | ||
994 | "windows_x86_64_gnullvm", | ||
995 | "windows_x86_64_msvc 0.42.0", | ||
996 | ] | ||
997 | |||
998 | [[package]] | ||
999 | name = "windows_aarch64_gnullvm" | ||
1000 | version = "0.42.0" | ||
1001 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1002 | checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" | ||
1003 | |||
1004 | [[package]] | ||
1005 | name = "windows_aarch64_msvc" | ||
1006 | version = "0.36.1" | ||
1007 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1008 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" | ||
1009 | |||
1010 | [[package]] | ||
1011 | name = "windows_aarch64_msvc" | ||
1012 | version = "0.42.0" | ||
1013 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1014 | checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" | ||
1015 | |||
1016 | [[package]] | ||
1017 | name = "windows_i686_gnu" | ||
1018 | version = "0.36.1" | ||
1019 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1020 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" | ||
1021 | |||
1022 | [[package]] | ||
1023 | name = "windows_i686_gnu" | ||
1024 | version = "0.42.0" | ||
1025 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1026 | checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" | ||
1027 | |||
1028 | [[package]] | ||
1029 | name = "windows_i686_msvc" | ||
1030 | version = "0.36.1" | ||
1031 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1032 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" | ||
1033 | |||
1034 | [[package]] | ||
1035 | name = "windows_i686_msvc" | ||
1036 | version = "0.42.0" | ||
1037 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1038 | checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" | ||
1039 | |||
1040 | [[package]] | ||
1041 | name = "windows_x86_64_gnu" | ||
1042 | version = "0.36.1" | ||
1043 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1044 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" | ||
1045 | |||
1046 | [[package]] | ||
1047 | name = "windows_x86_64_gnu" | ||
1048 | version = "0.42.0" | ||
1049 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1050 | checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" | ||
1051 | |||
1052 | [[package]] | ||
1053 | name = "windows_x86_64_gnullvm" | ||
1054 | version = "0.42.0" | ||
1055 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1056 | checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" | ||
1057 | |||
1058 | [[package]] | ||
1059 | name = "windows_x86_64_msvc" | ||
1060 | version = "0.36.1" | ||
1061 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1062 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" | ||
1063 | |||
1064 | [[package]] | ||
1065 | name = "windows_x86_64_msvc" | ||
1066 | version = "0.42.0" | ||
1067 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1068 | checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" | ||
1069 | |||
1070 | [[package]] | ||
1071 | name = "winreg" | ||
1072 | version = "0.10.1" | ||
1073 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1074 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" | ||
1075 | dependencies = [ | ||
1076 | "winapi", | ||
1077 | ] | ||
diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..cc98e0d --- /dev/null +++ b/Cargo.toml | |||
@@ -0,0 +1,12 @@ | |||
1 | [package] | ||
2 | name = "modlist" | ||
3 | version = "0.1.0" | ||
4 | edition = "2021" | ||
5 | |||
6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
7 | |||
8 | [dependencies] | ||
9 | reqwest = { version = "0.11", features = ["json"] } | ||
10 | tokio = { version = "1", features = ["full"] } | ||
11 | serde = { version = "1.0", features = ["derive"] } | ||
12 | serde_json = "1.0.87" | ||
diff --git a/src/apis/mod.rs b/src/apis/mod.rs new file mode 100644 index 0000000..749d914 --- /dev/null +++ b/src/apis/mod.rs | |||
@@ -0,0 +1 @@ | |||
pub mod modrinth; | |||
diff --git a/src/apis/modrinth.rs b/src/apis/modrinth.rs new file mode 100644 index 0000000..ce9fdd4 --- /dev/null +++ b/src/apis/modrinth.rs | |||
@@ -0,0 +1,104 @@ | |||
1 | use serde::{Deserialize, Serialize}; | ||
2 | |||
3 | async fn get(path: String) -> Result<Vec<u8>, Box<dyn std::error::Error>> { | ||
4 | dbg!(&path); | ||
5 | let api = String::from("https://api.modrinth.com/v2/"); | ||
6 | //let api = String::from("localhost:8080/"); | ||
7 | //let api = String::from("https://www.rust-lang.org/"); | ||
8 | let url = format!(r#"{}{}"#, api, path); | ||
9 | |||
10 | println!("{}", &url); | ||
11 | |||
12 | |||
13 | let data = reqwest::get(r#"https://api.modrinth.com/v2/projects?ids=["kYuIpRLv","89Wsn8GD"]"#) | ||
14 | .await? | ||
15 | .bytes() | ||
16 | .await? | ||
17 | .to_vec(); | ||
18 | |||
19 | //println!("body = {:?}", data); | ||
20 | |||
21 | Ok(data) | ||
22 | } | ||
23 | |||
24 | #[derive(Debug, Deserialize)] | ||
25 | pub struct Project { | ||
26 | pub slug: String, | ||
27 | pub title: String, | ||
28 | pub description: String, | ||
29 | pub categories: Vec<String>, | ||
30 | pub client_side: Side, | ||
31 | pub server_side: Side, | ||
32 | pub body: String, | ||
33 | pub additional_categories: Option<Vec<String>>, | ||
34 | pub project_type: Type, | ||
35 | pub downloads: u32, | ||
36 | pub icon_url: Option<String>, | ||
37 | pub id: String, | ||
38 | pub team: String, | ||
39 | pub moderator_message: Option<ModeratorMessage>, | ||
40 | pub published: String, | ||
41 | pub updated: String, | ||
42 | pub approved: Option<String>, | ||
43 | pub followers: u32, | ||
44 | pub status: Status, | ||
45 | pub license: License, | ||
46 | pub versions: Vec<String>, | ||
47 | } | ||
48 | |||
49 | #[derive(Debug, Deserialize)] | ||
50 | pub struct License { | ||
51 | pub id: String, | ||
52 | pub name: String, | ||
53 | pub url: Option<String>, | ||
54 | } | ||
55 | |||
56 | #[derive(Debug, Deserialize)] | ||
57 | pub struct ModeratorMessage { | ||
58 | pub message: String, | ||
59 | pub body: Option<String>, | ||
60 | } | ||
61 | |||
62 | #[allow(non_camel_case_types)] | ||
63 | #[derive(Debug, Deserialize)] | ||
64 | pub enum Side { | ||
65 | required, | ||
66 | optional, | ||
67 | unsupported | ||
68 | } | ||
69 | |||
70 | #[allow(non_camel_case_types)] | ||
71 | #[derive(Debug, Deserialize)] | ||
72 | pub enum Type { | ||
73 | r#mod, | ||
74 | modpack, | ||
75 | recourcepack | ||
76 | } | ||
77 | |||
78 | #[allow(non_camel_case_types)] | ||
79 | #[derive(Debug, Deserialize)] | ||
80 | pub enum Status { | ||
81 | approved, | ||
82 | rejected, | ||
83 | draft, | ||
84 | unlisted, | ||
85 | archived, | ||
86 | processing, | ||
87 | unknown | ||
88 | } | ||
89 | pub async fn project(name: &str) -> Project { | ||
90 | let url = format!("project/{}", name); | ||
91 | let data = get(url); | ||
92 | |||
93 | serde_json::from_slice(&data.await.unwrap()).unwrap() | ||
94 | } | ||
95 | |||
96 | pub async fn projects(ids: Vec<&str>) -> Vec<Project> { | ||
97 | let all = ids.join(r#"",""#); | ||
98 | let url = format!(r#"projects?ids=["{}"]"#, all); | ||
99 | println!("{}", url); | ||
100 | |||
101 | let data = get(url); | ||
102 | |||
103 | serde_json::from_slice(&data.await.unwrap()).unwrap() | ||
104 | } | ||
diff --git a/src/db.rs b/src/db.rs new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/db.rs | |||
diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..cbb761c --- /dev/null +++ b/src/lib.rs | |||
@@ -0,0 +1,4 @@ | |||
1 | pub mod update; | ||
2 | pub mod apis; | ||
3 | |||
4 | pub use apis::*; | ||
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..8d1a1bd --- /dev/null +++ b/src/main.rs | |||
@@ -0,0 +1,7 @@ | |||
1 | use modlist::modrinth::projects; | ||
2 | |||
3 | #[tokio::main] | ||
4 | async fn main() { | ||
5 | //projects(vec!["kYuIpRLv", "89Wsn8GD"]); | ||
6 | println!("{:?}", projects(vec!["kYuIpRLv", "89Wsn8GD"]).await); | ||
7 | } | ||
diff --git a/src/update.rs b/src/update.rs new file mode 100644 index 0000000..2e70f43 --- /dev/null +++ b/src/update.rs | |||
@@ -0,0 +1,8 @@ | |||
1 | pub fn update_mods() { | ||
2 | |||
3 | } | ||
4 | |||
5 | fn get_version(link: String) { | ||
6 | |||
7 | |||
8 | } | ||