diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4a26a4..7b08f30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,11 +34,11 @@ jobs: steps: # The sequence of tasks that make up a job. - name: Checking out repository code - uses: actions/checkout@v4.2.1 # Action for checking out a repo. + uses: actions/checkout@v4.2.2 # Action for checking out a repo. # Cache dependencies to speed up builds - name: Cache cargo dependencies - uses: actions/cache@v4.1.1 + uses: actions/cache@v4.1.2 with: path: | ~/.cargo/bin/ @@ -85,13 +85,13 @@ jobs: steps: # Checkout the repository code - name: Checkout code - uses: actions/checkout@v4.2.1 + uses: actions/checkout@v4.2.2 with: fetch-depth: 0 # Fetches all history for all branches and tags # Generate a changelog for the new release using Git - name: Generate a changelog - uses: orhun/git-cliff-action@v4.3.0 + uses: orhun/git-cliff-action@v4.4.0 id: git-cliff with: config: cliff.toml # The configuration file for git-cliff diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 206c836..f8ff2a8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,7 @@ jobs: # Check out current repository - name: Fetch Sources - uses: actions/checkout@v4.2.1 + uses: actions/checkout@v4.2.2 with: ref: ${{ github.event.release.tag_name }} @@ -28,7 +28,7 @@ jobs: # Cache dependencies to speed up builds - name: Cache cargo dependencies - uses: actions/cache@v4.1.1 + uses: actions/cache@v4.1.2 with: path: | ~/.cargo/bin/ @@ -46,7 +46,7 @@ jobs: override: true - name: Deploy to Workers - uses: cloudflare/wrangler-action@v3.9.0 + uses: cloudflare/wrangler-action@v3.12.1 with: accountId: ${{ secrets.CF_ACCOUNT_ID }} apiToken: ${{ secrets.CF_API_TOKEN }} diff --git a/.github/workflows/git-flow.yml b/.github/workflows/git-flow.yml index d8e1955..81b412b 100644 --- a/.github/workflows/git-flow.yml +++ b/.github/workflows/git-flow.yml @@ -22,7 +22,7 @@ jobs: steps: # Checks out the repository code under $GITHUB_WORKSPACE, so the job can access it - name: Checkout Repository Code - uses: actions/checkout@v4.2.1 + uses: actions/checkout@v4.2.2 # This step uses the Git Flow Action to create PRs based on branch types - name: Execute Git Flow Action diff --git a/CHANGELOG.md b/CHANGELOG.md index 05cd45e..bf56b35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. +## [1.3.0-alpha.1] - 2024-11-24 + +### Refactor + +- Replace `unwrap` with `?` operator + +### Miscellaneous Tasks + +- Update logging setup + ## [1.3.0-alpha.0] - 2024-10-10 ### Bug Fixes diff --git a/Cargo.lock b/Cargo.lock index 5ed5641..8230b5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,11 +62,60 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +dependencies = [ + "anstyle", + "windows-sys 0.59.0", +] + [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arrayvec" @@ -88,7 +137,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -110,7 +159,7 @@ checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -289,29 +338,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.3", -] - -[[package]] -name = "chrono-tz" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" -dependencies = [ - "chrono", - "chrono-tz-build", - "phf", -] - -[[package]] -name = "chrono-tz-build" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" -dependencies = [ - "parse-zoneinfo", - "phf", - "phf_codegen", + "windows-targets 0.52.6", ] [[package]] @@ -377,14 +404,10 @@ dependencies = [ ] [[package]] -name = "colored" -version = "2.1.0" +name = "colorchoice" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "combine" @@ -604,6 +627,29 @@ dependencies = [ "zeroize", ] +[[package]] +name = "env_filter" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -752,7 +798,7 @@ dependencies = [ "regex", "serde", "serde_json", - "syn 2.0.50", + "syn 2.0.82", "toml", "walkdir", ] @@ -770,7 +816,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -796,7 +842,7 @@ dependencies = [ "serde", "serde_json", "strum", - "syn 2.0.50", + "syn 2.0.82", "tempfile", "thiserror", "tiny-keccak", @@ -1024,7 +1070,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -1298,6 +1344,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" version = "0.14.28" @@ -1446,6 +1498,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itoa" version = "1.0.10" @@ -1454,9 +1512,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1518,13 +1576,14 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "lilnouns-bots" -version = "1.3.0-alpha.0" +version = "1.3.0-alpha.1" dependencies = [ "anyhow", "async-trait", "cfg-if", "chrono", "console_error_panic_hook", + "env_logger", "ethers", "getrandom", "graphql_client", @@ -1535,7 +1594,6 @@ dependencies = [ "serde_json", "time", "worker", - "worker_logger", ] [[package]] @@ -1660,7 +1718,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -1726,7 +1784,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -1773,15 +1831,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parse-zoneinfo" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" -dependencies = [ - "regex", -] - [[package]] name = "pbkdf2" version = "0.11.0" @@ -1826,44 +1875,6 @@ dependencies = [ "rustc_version", ] -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared", - "rand", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project" version = "1.1.4" @@ -1881,7 +1892,7 @@ checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -1931,7 +1942,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -1978,9 +1989,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" dependencies = [ "unicode-ident", ] @@ -2057,9 +2068,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2358,9 +2369,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -2389,20 +2400,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -2474,12 +2485,6 @@ dependencies = [ "time", ] -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - [[package]] name = "slab" version = "0.4.9" @@ -2540,7 +2545,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -2562,9 +2567,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.50" +version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ "proc-macro2", "quote", @@ -2633,7 +2638,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -2822,7 +2827,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", ] [[package]] @@ -2927,6 +2932,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "0.8.2" @@ -2982,26 +2993,27 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", "wasm-bindgen-shared", ] @@ -3019,9 +3031,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3029,22 +3041,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" @@ -3061,9 +3073,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -3106,7 +3118,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.3", + "windows-targets 0.52.6", ] [[package]] @@ -3124,7 +3136,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.3", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -3144,17 +3165,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.3", - "windows_aarch64_msvc 0.52.3", - "windows_i686_gnu 0.52.3", - "windows_i686_msvc 0.52.3", - "windows_x86_64_gnu 0.52.3", - "windows_x86_64_gnullvm 0.52.3", - "windows_x86_64_msvc 0.52.3", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3165,9 +3187,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3177,9 +3199,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3189,9 +3211,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.3" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3201,9 +3229,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3213,9 +3241,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3225,9 +3253,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3237,9 +3265,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -3271,14 +3299,13 @@ dependencies = [ [[package]] name = "worker" -version = "0.0.24" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4731859e9e5e800fffce8fef15e5d0f7fb2f572505da2fc506560776eb4e3359" +checksum = "d8aca53ec63e508176a89a573c972266f0f98bcc48bd866def7be0d939ef9268" dependencies = [ "async-trait", "bytes", "chrono", - "chrono-tz", "futures-channel", "futures-util", "http 1.1.0", @@ -3303,9 +3330,9 @@ dependencies = [ [[package]] name = "worker-kv" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d4b9fe1a87b7aef252fceb4f30bf6303036a5de329c81ccad9be9c35d1fdbc7" +checksum = "7f06d4d1416a9f8346ee9123b0d9a11b3cfa38e6cfb5a139698017d1597c4d41" dependencies = [ "js-sys", "serde", @@ -3318,14 +3345,14 @@ dependencies = [ [[package]] name = "worker-macros" -version = "0.0.16" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373e66625067ff52b7f8ddbd0da6b3e87cb7a48ecb5a6a8004e1c743e744b319" +checksum = "1118a0ceb59ddde7fdbaff6c47b6fa6ee47848975ea38b4ae9bb4080f96541cd" dependencies = [ "async-trait", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.82", "wasm-bindgen", "wasm-bindgen-futures", "wasm-bindgen-macro-support", @@ -3334,9 +3361,9 @@ dependencies = [ [[package]] name = "worker-sys" -version = "0.0.16" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "018a9de530946a997143c4c662792b06c7754b17cbff1c0ecd0b9afd002cf366" +checksum = "d5643a2ba07df61aa50e37212ffcb0944417db7d3960d4331f36aeb2fa5e2fd7" dependencies = [ "cfg-if", "js-sys", @@ -3344,17 +3371,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "worker_logger" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3feaee8b9d44f53f5d8100158d30b254539ad4327d545e00de7ad9a2b2f43431" -dependencies = [ - "colored", - "log", - "worker", -] - [[package]] name = "ws_stream_wasm" version = "0.7.4" diff --git a/Cargo.toml b/Cargo.toml index f8efc99..9aee0b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lilnouns-bots" -version = "1.3.0-alpha.0" +version = "1.3.0-alpha.1" authors = ["Milad Nekofar "] edition = "2021" description = "Our bots are designed to keep the Lil Nouns DAO community informed and engaged." @@ -22,7 +22,7 @@ crate-type = ["cdylib"] default = ["console_error_panic_hook"] [dependencies] -anyhow = "1.0.89" +anyhow = "1.0.93" async-trait = "0.1.83" cfg-if = "1.0.0" chrono = "0.4.38" @@ -31,13 +31,13 @@ ethers = { version = "2.0.14", default-features = false } getrandom = { version = "0.2.15", features = ["js"] } graphql_client = { version = "0.14.0", features = ["reqwest"] } log = "0.4.22" -regex = "1.11.0" +regex = "1.11.1" reqwest = "0.11.27" -serde = { version = "1.0.210", features = ["derive"] } -serde_json = "1.0.128" +serde = { version = "1.0.215", features = ["derive"] } +serde_json = "1.0.133" time = "0.3.36" -worker = "0.0.24" -worker_logger = { version = "0.2.0", features = ["color"] } +worker = "0.4.2" +env_logger = "0.11.5" [profile.release] lto = true diff --git a/package.json b/package.json index 4e8945d..648bca2 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "dev": "wrangler dev --env dev --test-scheduled" }, "devDependencies": { - "wrangler": "3.80.2" + "wrangler": "3.89.0" }, "engines": { "node": ">=16.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7a13e6e..060abb6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: devDependencies: wrangler: - specifier: 3.80.2 - version: 3.80.2 + specifier: 3.89.0 + version: 3.89.0 packages: @@ -18,38 +18,38 @@ packages: resolution: {integrity: sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q==} engines: {node: '>=16.13'} - '@cloudflare/workerd-darwin-64@1.20240925.0': - resolution: {integrity: sha512-KdLnSXuzB65CbqZPm+qYzk+zkQ1tUNPaaRGYVd/jPYAxwwtfTUQdQ+ahDPwVVs2tmQELKy7ZjQjf2apqSWUfjw==} + '@cloudflare/workerd-darwin-64@1.20241106.1': + resolution: {integrity: sha512-zxvaToi1m0qzAScrxFt7UvFVqU8DxrCO2CinM1yQkv5no7pA1HolpIrwZ0xOhR3ny64Is2s/J6BrRjpO5dM9Zw==} engines: {node: '>=16'} cpu: [x64] os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20240925.0': - resolution: {integrity: sha512-MiQ6uUmCXjsXgWNV+Ock2tp2/tYqNJGzjuaH6jFioeRF+//mz7Tv7J7EczOL4zq+TH8QFOh0/PUsLyazIWVGng==} + '@cloudflare/workerd-darwin-arm64@1.20241106.1': + resolution: {integrity: sha512-j3dg/42D/bPgfNP3cRUBxF+4waCKO/5YKwXNj+lnVOwHxDu+ne5pFw9TIkKYcWTcwn0ZUkbNZNM5rhJqRn4xbg==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] - '@cloudflare/workerd-linux-64@1.20240925.0': - resolution: {integrity: sha512-Rjix8jsJMfsInmq3Hm3fmiRQ+rwzuWRPV1pg/OWhMSfNP7Qp2RCU+RGkhgeR9Z5eNAje0Sn2BMrFq4RvF9/yRA==} + '@cloudflare/workerd-linux-64@1.20241106.1': + resolution: {integrity: sha512-Ih+Ye8E1DMBXcKrJktGfGztFqHKaX1CeByqshmTbODnWKHt6O65ax3oTecUwyC0+abuyraOpAtdhHNpFMhUkmw==} engines: {node: '>=16'} cpu: [x64] os: [linux] - '@cloudflare/workerd-linux-arm64@1.20240925.0': - resolution: {integrity: sha512-VYIPeMHQRtbwQoIjUwS/zULlywPxyDvo46XkTpIW5MScEChfqHvAYviQ7TzYGx6Q+gmZmN+DUB2KOMx+MEpCxA==} + '@cloudflare/workerd-linux-arm64@1.20241106.1': + resolution: {integrity: sha512-mdQFPk4+14Yywn7n1xIzI+6olWM8Ybz10R7H3h+rk0XulMumCWUCy1CzIDauOx6GyIcSgKIibYMssVHZR30ObA==} engines: {node: '>=16'} cpu: [arm64] os: [linux] - '@cloudflare/workerd-windows-64@1.20240925.0': - resolution: {integrity: sha512-C8peGvaU5R51bIySi1VbyfRgwNSSRknqoFSnSbSBI3uTN3THTB3UnmRKy7GXJDmyjgXuT9Pcs1IgaWNubLtNtw==} + '@cloudflare/workerd-windows-64@1.20241106.1': + resolution: {integrity: sha512-4rtcss31E/Rb/PeFocZfr+B9i1MdrkhsTBWizh8siNR4KMmkslU2xs2wPaH1z8+ErxkOsHrKRa5EPLh5rIiFeg==} engines: {node: '>=16'} cpu: [x64] os: [win32] - '@cloudflare/workers-shared@0.5.4': - resolution: {integrity: sha512-PNL/0TjKRdUHa1kwgVdqUNJVZ9ez4kacsi8omz+gv859EvJmsVuGiMAClY2YfJnC9LVKhKCcjqmFgKNXG9/IXA==} + '@cloudflare/workers-shared@0.7.1': + resolution: {integrity: sha512-46cP5FCrl3TrvHeoHLb5SRuiDMKH5kc9Yvo36SAfzt8dqJI/qJRoY1GP3ioHn/gP7v2QIoUOTAzIl7Ml7MnfrA==} engines: {node: '>=16.7.0'} '@cspotcode/source-map-support@0.8.1': @@ -227,30 +227,18 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - as-table@1.0.55: resolution: {integrity: sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==} - binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - blake3-wasm@2.1.5: resolution: {integrity: sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==} - braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - capnp-ts@0.7.0: resolution: {integrity: sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==} - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} cookie@0.5.0: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} @@ -259,6 +247,9 @@ packages: data-uri-to-buffer@2.0.2: resolution: {integrity: sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==} + date-fns@4.1.0: + resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} + debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -287,10 +278,6 @@ packages: resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==} engines: {node: '>=6'} - fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -302,10 +289,6 @@ packages: get-source@2.0.12: resolution: {integrity: sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==} - glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} @@ -313,24 +296,11 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} - is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - - is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} + itty-time@1.0.6: + resolution: {integrity: sha512-+P8IZaLLBtFv8hCkIjcymZOp4UJ+xW6bSlQsXGqrkmJh7vSiMFSlNne0mCYagEE0N7HDNR5jJBRxwN0oYv61Rw==} magic-string@0.25.9: resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} @@ -340,8 +310,8 @@ packages: engines: {node: '>=10.0.0'} hasBin: true - miniflare@3.20240925.1: - resolution: {integrity: sha512-odavnAwWLevMWOi/efIdAI9AVlg8C8NfXe2YLoAeG+Fj5BDHPDxCoY7AjZvBj3CJ7bszkoYyhoPEH60X+Vk+7g==} + miniflare@3.20241106.1: + resolution: {integrity: sha512-dM3RBlJE8rUFxnqlPCaFCq0E7qQqEQvKbYX7W/APGCK+rLcyLmEBzC4GQR/niXdNM/oV6gdg9AA50ghnn2ALuw==} engines: {node: '>=16.13'} hasBin: true @@ -361,10 +331,6 @@ packages: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} - normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - ohash@1.1.4: resolution: {integrity: sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g==} @@ -377,16 +343,12 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - printable-characters@1.0.42: resolution: {integrity: sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==} - readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} + readdirp@4.0.2: + resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} + engines: {node: '>= 14.16.0'} resolve.exports@2.0.2: resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} @@ -429,10 +391,6 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} @@ -446,26 +404,26 @@ packages: resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} engines: {node: '>=14.0'} - unenv-nightly@2.0.0-20240919-125358-9a64854: - resolution: {integrity: sha512-XjsgUTrTHR7iw+k/SRTNjh6EQgwpC9voygnoCJo5kh4hKqsSDHUW84MhL9EsHTNfLctvVBHaSw8e2k3R2fKXsQ==} + unenv-nightly@2.0.0-20241111-080453-894aa31: + resolution: {integrity: sha512-0W39QQOQ9VE8kVVUpGwEG+pZcsCXk5wqNG6rDPE6Gr+fiA69LR0qERM61hW5KCOkC1/ArCFrfCGjwHyyv/bI0Q==} - workerd@1.20240925.0: - resolution: {integrity: sha512-/Jj6+yLwfieZGEt3Kx4+5MoufuC3g/8iFaIh4MPBNGJOGYmdSKXvgCqz09m2+tVCYnysRfbq2zcbVxJRBfOCqQ==} + workerd@1.20241106.1: + resolution: {integrity: sha512-1GdKl0kDw8rrirr/ThcK66Kbl4/jd4h8uHx5g7YHBrnenY5SX1UPuop2cnCzYUxlg55kPjzIqqYslz1muRFgFw==} engines: {node: '>=16'} hasBin: true - wrangler@3.80.2: - resolution: {integrity: sha512-WSMDXoNcg+DjZ4i0RMJpz2TKrCbTtsxNsQAwyYg7LRZlfmTZQZOPbHWhATVa4fCsNL6eElN050fMHOW9MptM9g==} + wrangler@3.89.0: + resolution: {integrity: sha512-ix3Rir/cu9Cn6FklvPDIW1QwOMcRU8iPj3IrkBWGdB66K9z1uqyqoTP64UZZyXrBItfrU7SbQT4L5wJ5y10TPA==} engines: {node: '>=16.17.0'} hasBin: true peerDependencies: - '@cloudflare/workers-types': ^4.20240925.0 + '@cloudflare/workers-types': ^4.20241106.0 peerDependenciesMeta: '@cloudflare/workers-types': optional: true - ws@8.17.1: - resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -491,22 +449,22 @@ snapshots: dependencies: mime: 3.0.0 - '@cloudflare/workerd-darwin-64@1.20240925.0': + '@cloudflare/workerd-darwin-64@1.20241106.1': optional: true - '@cloudflare/workerd-darwin-arm64@1.20240925.0': + '@cloudflare/workerd-darwin-arm64@1.20241106.1': optional: true - '@cloudflare/workerd-linux-64@1.20240925.0': + '@cloudflare/workerd-linux-64@1.20241106.1': optional: true - '@cloudflare/workerd-linux-arm64@1.20240925.0': + '@cloudflare/workerd-linux-arm64@1.20241106.1': optional: true - '@cloudflare/workerd-windows-64@1.20240925.0': + '@cloudflare/workerd-windows-64@1.20241106.1': optional: true - '@cloudflare/workers-shared@0.5.4': + '@cloudflare/workers-shared@0.7.1': dependencies: mime: 3.0.0 zod: 3.23.8 @@ -614,23 +572,12 @@ snapshots: acorn@8.11.3: {} - anymatch@3.1.3: - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - as-table@1.0.55: dependencies: printable-characters: 1.0.42 - binary-extensions@2.3.0: {} - blake3-wasm@2.1.5: {} - braces@3.0.2: - dependencies: - fill-range: 7.0.1 - capnp-ts@0.7.0: dependencies: debug: 4.3.4 @@ -638,22 +585,16 @@ snapshots: transitivePeerDependencies: - supports-color - chokidar@3.6.0: + chokidar@4.0.1: dependencies: - anymatch: 3.1.3 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 + readdirp: 4.0.2 cookie@0.5.0: {} data-uri-to-buffer@2.0.2: {} + date-fns@4.1.0: {} + debug@4.3.4: dependencies: ms: 2.1.2 @@ -691,10 +632,6 @@ snapshots: exit-hook@2.2.1: {} - fill-range@7.0.1: - dependencies: - to-regex-range: 5.0.1 - fsevents@2.3.3: optional: true @@ -705,31 +642,17 @@ snapshots: data-uri-to-buffer: 2.0.2 source-map: 0.6.1 - glob-parent@5.1.2: - dependencies: - is-glob: 4.0.3 - glob-to-regexp@0.4.1: {} hasown@2.0.2: dependencies: function-bind: 1.1.2 - is-binary-path@2.1.0: - dependencies: - binary-extensions: 2.3.0 - is-core-module@2.13.1: dependencies: hasown: 2.0.2 - is-extglob@2.1.1: {} - - is-glob@4.0.3: - dependencies: - is-extglob: 2.1.1 - - is-number@7.0.0: {} + itty-time@1.0.6: {} magic-string@0.25.9: dependencies: @@ -737,7 +660,7 @@ snapshots: mime@3.0.0: {} - miniflare@3.20240925.1: + miniflare@3.20241106.1: dependencies: '@cspotcode/source-map-support': 0.8.1 acorn: 8.11.3 @@ -747,8 +670,8 @@ snapshots: glob-to-regexp: 0.4.1 stoppable: 1.1.0 undici: 5.28.4 - workerd: 1.20240925.0 - ws: 8.17.1 + workerd: 1.20241106.1 + ws: 8.18.0 youch: 3.3.3 zod: 3.23.8 transitivePeerDependencies: @@ -764,8 +687,6 @@ snapshots: node-forge@1.3.1: {} - normalize-path@3.0.0: {} - ohash@1.1.4: {} path-parse@1.0.7: {} @@ -774,13 +695,9 @@ snapshots: pathe@1.1.2: {} - picomatch@2.3.1: {} - printable-characters@1.0.42: {} - readdirp@3.6.0: - dependencies: - picomatch: 2.3.1 + readdirp@4.0.2: {} resolve.exports@2.0.2: {} @@ -822,10 +739,6 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - to-regex-range@5.0.1: - dependencies: - is-number: 7.0.0 - tslib@2.6.2: {} ufo@1.5.4: {} @@ -836,39 +749,41 @@ snapshots: dependencies: '@fastify/busboy': 2.1.1 - unenv-nightly@2.0.0-20240919-125358-9a64854: + unenv-nightly@2.0.0-20241111-080453-894aa31: dependencies: defu: 6.1.4 ohash: 1.1.4 pathe: 1.1.2 ufo: 1.5.4 - workerd@1.20240925.0: + workerd@1.20241106.1: optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20240925.0 - '@cloudflare/workerd-darwin-arm64': 1.20240925.0 - '@cloudflare/workerd-linux-64': 1.20240925.0 - '@cloudflare/workerd-linux-arm64': 1.20240925.0 - '@cloudflare/workerd-windows-64': 1.20240925.0 + '@cloudflare/workerd-darwin-64': 1.20241106.1 + '@cloudflare/workerd-darwin-arm64': 1.20241106.1 + '@cloudflare/workerd-linux-64': 1.20241106.1 + '@cloudflare/workerd-linux-arm64': 1.20241106.1 + '@cloudflare/workerd-windows-64': 1.20241106.1 - wrangler@3.80.2: + wrangler@3.89.0: dependencies: '@cloudflare/kv-asset-handler': 0.3.4 - '@cloudflare/workers-shared': 0.5.4 + '@cloudflare/workers-shared': 0.7.1 '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19) '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19) blake3-wasm: 2.1.5 - chokidar: 3.6.0 + chokidar: 4.0.1 + date-fns: 4.1.0 esbuild: 0.17.19 - miniflare: 3.20240925.1 + itty-time: 1.0.6 + miniflare: 3.20241106.1 nanoid: 3.3.7 path-to-regexp: 6.3.0 resolve: 1.22.8 resolve.exports: 2.0.2 selfsigned: 2.4.1 source-map: 0.6.1 - unenv: unenv-nightly@2.0.0-20240919-125358-9a64854 - workerd: 1.20240925.0 + unenv: unenv-nightly@2.0.0-20241111-080453-894aa31 + workerd: 1.20241106.1 xxhash-wasm: 1.0.2 optionalDependencies: fsevents: 2.3.3 @@ -877,7 +792,7 @@ snapshots: - supports-color - utf-8-validate - ws@8.17.1: {} + ws@8.18.0: {} xxhash-wasm@1.0.2: {} diff --git a/src/lib.rs b/src/lib.rs index f08302e..74c9c45 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ -use log::{error, info, Level}; -use worker::{Env, event, Result, ScheduleContext, ScheduledEvent}; +use log::{error, info}; +use worker::{event, Env, Result, ScheduleContext, ScheduledEvent}; use crate::{ lil_nouns::LilNouns, @@ -20,58 +20,53 @@ mod utils; async fn start(event: &ScheduledEvent, env: &Env) -> Result<()> { match event.cron().as_str() { "*/5 * * * *" => { - if env.var("LIL_NOUNS_ENABLED").unwrap().to_string() == "true" { + if env.var("LIL_NOUNS_ENABLED")?.to_string() == "true" { match LilNouns::new_from_env(env) { Ok(result) => match result.start().await { Ok(_) => info!("LilNouns started successfully"), Err(error) => error!("Failed to start LilNouns: {:?}", error), }, - Err(error) => error!("Failed to create LilNouns: {:?}", error), } }; - if env.var("META_GOV_ENABLED").unwrap().to_string() == "true" { + if env.var("META_GOV_ENABLED")?.to_string() == "true" { match MetaGov::new_from_env(env) { Ok(result) => match result.start().await { Ok(_) => info!("MetaGov started successfully"), Err(error) => error!("Failed to start MetaGov: {:?}", error), }, - Err(error) => error!("Failed to create MetaGov: {:?}", error), } }; - if env.var("PROP_HOUSE_ENABLED").unwrap().to_string() == "true" { + if env.var("PROP_HOUSE_ENABLED")?.to_string() == "true" { match PropHouse::new_from_env(env) { Ok(result) => match result.start().await { Ok(_) => info!("PropHouse started successfully"), Err(error) => error!("Failed to start PropHouse: {:?}", error), }, - Err(error) => error!("Failed to create PropHouse: {:?}", error), } } - if env.var("PROP_LOT_ENABLED").unwrap().to_string() == "true" { + if env.var("PROP_LOT_ENABLED")?.to_string() == "true" { match PropLot::new_from_env(env) { Ok(result) => match result.start().await { Ok(_) => info!("PropLot started successfully"), Err(error) => error!("Failed to start PropLot: {:?}", error), }, - Err(error) => error!("Failed to create PropLot: {:?}", error), } } } "0 0 * * *" => { - if env.var("SECOND_MARKET_ENABLED").unwrap().to_string() == "true" { + if env.var("SECOND_MARKET_ENABLED")?.to_string() == "true" { match SecondMarket::new_from_env(env) { Ok(result) => match result.start().await { Ok(_) => info!("SecondMarket started successfully"), Err(error) => error!("Failed to start SecondMarket: {:?}", error), }, - Err(error) => error!("Failed to create SecondMarket: {:?}", error), } } @@ -84,7 +79,7 @@ async fn start(event: &ScheduledEvent, env: &Env) -> Result<()> { #[event(start)] pub fn start() { - worker_logger::init_with_level(&Level::Trace); + env_logger::init(); utils::set_panic_hook(); } diff --git a/src/lil_nouns/handler/farcaster.rs b/src/lil_nouns/handler/farcaster.rs index a814569..b538ada 100644 --- a/src/lil_nouns/handler/farcaster.rs +++ b/src/lil_nouns/handler/farcaster.rs @@ -3,8 +3,8 @@ use std::collections::HashMap; use async_trait::async_trait; use log::{debug, error, info}; use reqwest::{ + header::{HeaderMap, HeaderValue, ACCEPT, AUTHORIZATION, CONTENT_TYPE}, Client, - header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE, HeaderMap, HeaderValue}, Response, }; use serde_json::{json, to_string, Value}; @@ -163,7 +163,7 @@ impl Handler for FarcasterHandler { proposals_casts.insert(proposal.id.to_string(), cast_hash.to_string()); debug!("Proposals casts after insertion: {:?}", proposals_casts); - let proposals_casts_as_string = to_string(&proposals_casts).unwrap(); + let proposals_casts_as_string = to_string(&proposals_casts)?; debug!("Ideas casts as string: {}", proposals_casts_as_string); self diff --git a/src/lil_nouns/mod.rs b/src/lil_nouns/mod.rs index 528ad17..6d23648 100644 --- a/src/lil_nouns/mod.rs +++ b/src/lil_nouns/mod.rs @@ -47,12 +47,12 @@ impl LilNouns { let fetcher = GraphQLFetcher::new_from_env(env)?; let mut handlers = vec![]; - if env.var("LIL_NOUNS_DISCORD_ENABLED").unwrap().to_string() == "true" { + if env.var("LIL_NOUNS_DISCORD_ENABLED")?.to_string() == "true" { let discord_handler: Box = Box::new(DiscordHandler::new_from_env(env)?); handlers.push(discord_handler); } - if env.var("LIL_NOUNS_FARCASTER_ENABLED").unwrap().to_string() == "true" { + if env.var("LIL_NOUNS_FARCASTER_ENABLED")?.to_string() == "true" { let farcaster_handler: Box = Box::new(FarcasterHandler::new_from_env(env)?); handlers.push(farcaster_handler); } diff --git a/src/meta_gov/handler/farcaster.rs b/src/meta_gov/handler/farcaster.rs index b381cf8..ab97e0d 100644 --- a/src/meta_gov/handler/farcaster.rs +++ b/src/meta_gov/handler/farcaster.rs @@ -5,8 +5,8 @@ use ethers::utils::hex::ToHexExt; use log::{debug, error, info}; use regex::Regex; use reqwest::{ + header::{HeaderMap, HeaderValue, ACCEPT, AUTHORIZATION, CONTENT_TYPE}, Client, - header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE, HeaderMap, HeaderValue}, Response, }; use serde_json::{json, to_string, Value}; @@ -210,7 +210,7 @@ impl Handler for FarcasterHandler { proposals_casts.insert(proposal_id, cast_hash.to_string()); debug!("Proposals casts after insertion: {:?}", proposals_casts); - let proposals_casts_as_string = to_string(&proposals_casts).unwrap(); + let proposals_casts_as_string = to_string(&proposals_casts)?; debug!("Ideas casts as string: {}", proposals_casts_as_string); self diff --git a/src/meta_gov/mod.rs b/src/meta_gov/mod.rs index eefb138..bc9ac50 100644 --- a/src/meta_gov/mod.rs +++ b/src/meta_gov/mod.rs @@ -47,12 +47,12 @@ impl MetaGov { let fetcher = GraphQLFetcher::new_from_env(env)?; let mut handlers = vec![]; - if env.var("META_GOV_DISCORD_ENABLED").unwrap().to_string() == "true" { + if env.var("META_GOV_DISCORD_ENABLED")?.to_string() == "true" { let discord_handler: Box = Box::new(DiscordHandler::new_from_env(env)?); handlers.push(discord_handler); } - if env.var("META_GOV_FARCASTER_ENABLED").unwrap().to_string() == "true" { + if env.var("META_GOV_FARCASTER_ENABLED")?.to_string() == "true" { let farcaster_handler: Box = Box::new(FarcasterHandler::new_from_env(env)?); handlers.push(farcaster_handler); } diff --git a/src/prop_house/handler/farcaster.rs b/src/prop_house/handler/farcaster.rs index dbeabcf..07fd33c 100644 --- a/src/prop_house/handler/farcaster.rs +++ b/src/prop_house/handler/farcaster.rs @@ -3,8 +3,8 @@ use std::collections::HashMap; use async_trait::async_trait; use log::{debug, error, info}; use reqwest::{ + header::{HeaderMap, HeaderValue, ACCEPT, AUTHORIZATION, CONTENT_TYPE}, Client, - header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE, HeaderMap, HeaderValue}, Response, }; use serde_json::{json, to_string, Value}; @@ -12,7 +12,7 @@ use worker::{Env, Error, Result}; use crate::{ cache::Cache, - prop_house::{Auction, handler::Handler, Proposal, Vote}, + prop_house::{handler::Handler, Auction, Proposal, Vote}, utils::fname::get_username_by_address, }; @@ -194,7 +194,7 @@ impl Handler for FarcasterHandler { proposals_casts.insert(proposal.id, cast_hash.to_string()); debug!("Proposals casts after insertion: {:?}", proposals_casts); - let proposals_casts_as_string = to_string(&proposals_casts).unwrap(); + let proposals_casts_as_string = to_string(&proposals_casts)?; debug!("Ideas casts as string: {}", proposals_casts_as_string); self diff --git a/src/prop_house/mod.rs b/src/prop_house/mod.rs index c5e1c2d..d2e17b5 100644 --- a/src/prop_house/mod.rs +++ b/src/prop_house/mod.rs @@ -54,12 +54,12 @@ impl PropHouse { let fetcher = GraphQLFetcher::new_from_env(env)?; let mut handlers = vec![]; - if env.var("PROP_HOUSE_DISCORD_ENABLED").unwrap().to_string() == "true" { + if env.var("PROP_HOUSE_DISCORD_ENABLED")?.to_string() == "true" { let discord_handler: Box = Box::new(DiscordHandler::new_from_env(env)?); handlers.push(discord_handler); } - if env.var("PROP_HOUSE_FARCASTER_ENABLED").unwrap().to_string() == "true" { + if env.var("PROP_HOUSE_FARCASTER_ENABLED")?.to_string() == "true" { let farcaster_handler: Box = Box::new(FarcasterHandler::new_from_env(env)?); handlers.push(farcaster_handler); } diff --git a/src/prop_lot/handler/farcaster.rs b/src/prop_lot/handler/farcaster.rs index abe59ca..d886bf4 100644 --- a/src/prop_lot/handler/farcaster.rs +++ b/src/prop_lot/handler/farcaster.rs @@ -3,18 +3,17 @@ use std::collections::HashMap; use async_trait::async_trait; use log::{debug, error, info}; use reqwest::{ + header::{HeaderMap, HeaderValue, ACCEPT, AUTHORIZATION, CONTENT_TYPE}, Client, - header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE, HeaderMap, HeaderValue}, Response, }; use serde_json::{json, to_string, Value}; -use worker::{Env, Error, Result}; - use utils::link::Link; +use worker::{Env, Error, Result}; use crate::{ cache::Cache, - prop_lot::{Comment, handler::Handler, Idea, Vote}, + prop_lot::{handler::Handler, Comment, Idea, Vote}, utils, utils::fname::get_username_by_address, }; @@ -166,7 +165,7 @@ impl Handler for FarcasterHandler { ideas_casts.insert(idea.id.to_string(), cast_hash.to_string()); debug!("Ideas casts after insertion: {:?}", ideas_casts); - let ideas_casts_as_string = to_string(&ideas_casts).unwrap(); + let ideas_casts_as_string = to_string(&ideas_casts)?; debug!("Ideas casts as string: {}", ideas_casts_as_string); self diff --git a/src/prop_lot/mod.rs b/src/prop_lot/mod.rs index aaa9dd3..0e25a7b 100644 --- a/src/prop_lot/mod.rs +++ b/src/prop_lot/mod.rs @@ -58,12 +58,12 @@ impl PropLot { let fetcher = GraphQLFetcher::new_from_env(env)?; let mut handlers = vec![]; - if env.var("PROP_LOT_DISCORD_ENABLED").unwrap().to_string() == "true" { + if env.var("PROP_LOT_DISCORD_ENABLED")?.to_string() == "true" { let discord_handler: Box = Box::new(DiscordHandler::new_from_env(env)?); handlers.push(discord_handler); } - if env.var("PROP_LOT_FARCASTER_ENABLED").unwrap().to_string() == "true" { + if env.var("PROP_LOT_FARCASTER_ENABLED")?.to_string() == "true" { let farcaster_handler: Box = Box::new(FarcasterHandler::new_from_env(env)?); handlers.push(farcaster_handler); } diff --git a/src/second_market/mod.rs b/src/second_market/mod.rs index a619e4c..7930fac 100644 --- a/src/second_market/mod.rs +++ b/src/second_market/mod.rs @@ -42,22 +42,12 @@ impl SecondMarket { let fetcher = RestFetcher::new_from_env(env)?; let mut handlers = vec![]; - if env - .var("SECOND_MARKET_DISCORD_ENABLED") - .unwrap() - .to_string() - == "true" - { + if env.var("SECOND_MARKET_DISCORD_ENABLED")?.to_string() == "true" { let discord_handler: Box = Box::new(DiscordHandler::new_from_env(env)?); handlers.push(discord_handler); } - if env - .var("SECOND_MARKET_FARCASTER_ENABLED") - .unwrap() - .to_string() - == "true" - { + if env.var("SECOND_MARKET_FARCASTER_ENABLED")?.to_string() == "true" { let farcaster_handler: Box = Box::new(FarcasterHandler::new_from_env(env)?); handlers.push(farcaster_handler); }