XFFXFF commited on
Commit
4ed127b
·
unverified ·
2 Parent(s): c2280b7 5f9cc30

Merge branch 'rolling' into handle-reqwest-errors

Browse files
Files changed (6) hide show
  1. .gitignore +4 -2
  2. .rusty-hook.toml +5 -0
  3. .stylelintrc.json +13 -0
  4. Cargo.lock +53 -0
  5. Cargo.toml +3 -0
  6. public/static/index.js +1 -1
.gitignore CHANGED
@@ -1,3 +1,5 @@
1
  /target
2
-
3
- dump.rdb
 
 
 
1
  /target
2
+ package.json
3
+ package-lock.json
4
+ dump.rdb
5
+ .vscode
.rusty-hook.toml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ [hooks]
2
+ pre-commit = "cargo test && cargo fmt -- --check && cargo clippy && stylelint ./public/static/themes/*.css ./public/static/colorschemes/*.css ./public/static/*.js"
3
+
4
+ [logging]
5
+ verbose = true
.stylelintrc.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "extends": "stylelint-config-standard",
3
+ "rules": {
4
+ "alpha-value-notation": "number",
5
+ "selector-class-pattern": null
6
+ },
7
+ "overrides": [
8
+ {
9
+ "files": ["*.js"],
10
+ "customSyntax": "postcss-lit"
11
+ }
12
+ ]
13
+ }
Cargo.lock CHANGED
@@ -438,6 +438,15 @@ version = "1.0.0"
438
  source = "registry+https://github.com/rust-lang/crates.io-index"
439
  checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
440
 
 
 
 
 
 
 
 
 
 
441
  [[package]]
442
  name = "cloudabi"
443
  version = "0.0.3"
@@ -693,6 +702,16 @@ dependencies = [
693
  "termcolor",
694
  ]
695
 
 
 
 
 
 
 
 
 
 
 
696
  [[package]]
697
  name = "errno"
698
  version = "0.3.1"
@@ -796,6 +815,12 @@ dependencies = [
796
  "percent-encoding 2.2.0",
797
  ]
798
 
 
 
 
 
 
 
799
  [[package]]
800
  name = "fuchsia-cprng"
801
  version = "0.1.1"
@@ -1567,6 +1592,12 @@ version = "1.0.4"
1567
  source = "registry+https://github.com/rust-lang/crates.io-index"
1568
  checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
1569
 
 
 
 
 
 
 
1570
  [[package]]
1571
  name = "nodrop"
1572
  version = "0.1.14"
@@ -2358,6 +2389,18 @@ dependencies = [
2358
  "windows-sys 0.48.0",
2359
  ]
2360
 
 
 
 
 
 
 
 
 
 
 
 
 
2361
  [[package]]
2362
  name = "ryu"
2363
  version = "1.0.13"
@@ -3038,6 +3081,15 @@ dependencies = [
3038
  "tracing",
3039
  ]
3040
 
 
 
 
 
 
 
 
 
 
3041
  [[package]]
3042
  name = "tower-service"
3043
  version = "0.3.2"
@@ -3330,6 +3382,7 @@ dependencies = [
3330
  "redis",
3331
  "reqwest 0.11.18",
3332
  "rlua",
 
3333
  "scraper",
3334
  "serde",
3335
  "serde_json",
 
438
  source = "registry+https://github.com/rust-lang/crates.io-index"
439
  checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
440
 
441
+ [[package]]
442
+ name = "ci_info"
443
+ version = "0.10.2"
444
+ source = "registry+https://github.com/rust-lang/crates.io-index"
445
+ checksum = "24f638c70e8c5753795cc9a8c07c44da91554a09e4cf11a7326e8161b0a3c45e"
446
+ dependencies = [
447
+ "envmnt",
448
+ ]
449
+
450
  [[package]]
451
  name = "cloudabi"
452
  version = "0.0.3"
 
702
  "termcolor",
703
  ]
704
 
705
+ [[package]]
706
+ name = "envmnt"
707
+ version = "0.8.4"
708
+ source = "registry+https://github.com/rust-lang/crates.io-index"
709
+ checksum = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059"
710
+ dependencies = [
711
+ "fsio",
712
+ "indexmap",
713
+ ]
714
+
715
  [[package]]
716
  name = "errno"
717
  version = "0.3.1"
 
815
  "percent-encoding 2.2.0",
816
  ]
817
 
818
+ [[package]]
819
+ name = "fsio"
820
+ version = "0.1.3"
821
+ source = "registry+https://github.com/rust-lang/crates.io-index"
822
+ checksum = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3"
823
+
824
  [[package]]
825
  name = "fuchsia-cprng"
826
  version = "0.1.1"
 
1592
  source = "registry+https://github.com/rust-lang/crates.io-index"
1593
  checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
1594
 
1595
+ [[package]]
1596
+ name = "nias"
1597
+ version = "0.5.0"
1598
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1599
+ checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0"
1600
+
1601
  [[package]]
1602
  name = "nodrop"
1603
  version = "0.1.14"
 
2389
  "windows-sys 0.48.0",
2390
  ]
2391
 
2392
+ [[package]]
2393
+ name = "rusty-hook"
2394
+ version = "0.11.2"
2395
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2396
+ checksum = "96cee9be61be7e1cbadd851e58ed7449c29c620f00b23df937cb9cbc04ac21a3"
2397
+ dependencies = [
2398
+ "ci_info",
2399
+ "getopts",
2400
+ "nias",
2401
+ "toml",
2402
+ ]
2403
+
2404
  [[package]]
2405
  name = "ryu"
2406
  version = "1.0.13"
 
3081
  "tracing",
3082
  ]
3083
 
3084
+ [[package]]
3085
+ name = "toml"
3086
+ version = "0.5.11"
3087
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3088
+ checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
3089
+ dependencies = [
3090
+ "serde",
3091
+ ]
3092
+
3093
  [[package]]
3094
  name = "tower-service"
3095
  version = "0.3.2"
 
3382
  "redis",
3383
  "reqwest 0.11.18",
3384
  "rlua",
3385
+ "rusty-hook",
3386
  "scraper",
3387
  "serde",
3388
  "serde_json",
Cargo.toml CHANGED
@@ -22,3 +22,6 @@ redis = {version="*"}
22
  md5 = {version="*"}
23
  rand={version="*"}
24
  once_cell = {version="*"}
 
 
 
 
22
  md5 = {version="*"}
23
  rand={version="*"}
24
  once_cell = {version="*"}
25
+
26
+ [dev-dependencies]
27
+ rusty-hook = "^0.11.2"
public/static/index.js CHANGED
@@ -4,7 +4,7 @@ function search_web() {
4
  }
5
 
6
  search_box.addEventListener('keyup', (e) => {
7
- if (e.keyCode === 13) {
8
  search_web()
9
  }
10
  })
 
4
  }
5
 
6
  search_box.addEventListener('keyup', (e) => {
7
+ if (e.key === 'Enter') {
8
  search_web()
9
  }
10
  })