Compare commits

..
Author SHA1 Message Date
phoenix bc64274e68 cargo update
swoosh pr / Rustfmt (pull_request) Successful in 53s
Release Tagging / release (pull_request) Successful in 32s
swoosh pr / Clippy (pull_request) Successful in 1m33s
swoosh pr / Check (pull_request) Successful in 1m40s
2026-07-05 17:05:06 -04:00
phoenix 2b43b1ad5f swoosh: bump 2026-07-05 17:04:43 -04:00
phoenix 5eb31348d5 bump: textsender_models 2026-07-05 17:04:06 -04:00
phoenix 8f7213b648 bump: rust
swoosh pr / Rustfmt (pull_request) Successful in 1m23s
swoosh pr / Check (pull_request) Successful in 1m37s
Release Tagging / release (pull_request) Successful in 29s
swoosh pr / Clippy (pull_request) Successful in 1m37s
2026-07-05 16:54:22 -04:00
phoenix c343a4da82 bump: rust ci 2026-07-05 16:54:13 -04:00
8 changed files with 102 additions and 95 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: |
mkdir -p ~/.ssh
@@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt
- run: |
@@ -58,7 +58,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: rustup component add clippy
- run: |
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
components: cargo
- name: Extract Version from Cargo.toml
+5 -5
View File
@@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: |
mkdir -p ~/.ssh
@@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: |
mkdir -p ~/.ssh
@@ -57,7 +57,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt
- run: |
@@ -78,7 +78,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: rustup component add clippy
- run: |
@@ -99,7 +99,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: |
mkdir -p ~/.ssh
Generated
+81 -48
View File
@@ -81,9 +81,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "base64-ng"
version = "1.3.7"
version = "1.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78dbdaa3c8250efc13282f483f2ae92733e407c9cf6ffc2fe7918ce1ee420724"
checksum = "2b87dbd7e45c4885ad3432a2d125ddb155c5ee87046ab23bad043dfe84fedfa2"
[[package]]
name = "bitflags"
@@ -126,15 +126,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
version = "1.12.1"
version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593"
[[package]]
name = "cc"
version = "1.2.67"
version = "1.2.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e17dd265a7d0f31ef544e1b20e03add05d3b45b491b633b10d67145d2acc1a38"
checksum = "f5d6cac793997bd970000024b2934968efe83b382de4fdcf4fcb46b6ee4ad996"
dependencies = [
"find-msvc-tools",
"jobserver",
@@ -290,18 +290,18 @@ dependencies = [
[[package]]
name = "crossbeam-queue"
version = "0.3.13"
version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "803d13fb3b09d88be9f4dbc29062c66b19bf7170867ceb746d2a8689bf6c7a26"
checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.22"
version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crypto-common"
@@ -620,6 +620,18 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "getrandom"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
dependencies = [
"cfg-if",
"libc",
"r-efi 5.3.0",
"wasip2",
]
[[package]]
name = "getrandom"
version = "0.4.3"
@@ -629,7 +641,7 @@ dependencies = [
"cfg-if",
"js-sys",
"libc",
"r-efi",
"r-efi 6.0.0",
"rand_core",
"wasm-bindgen",
]
@@ -996,11 +1008,11 @@ dependencies = [
[[package]]
name = "jobserver"
version = "0.1.35"
version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"
checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
dependencies = [
"getrandom 0.4.3",
"getrandom 0.3.4",
"libc",
]
@@ -1108,9 +1120,9 @@ dependencies = [
[[package]]
name = "memchr"
version = "2.8.3"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4"
[[package]]
name = "mime"
@@ -1367,6 +1379,12 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "r-efi"
version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "r-efi"
version = "6.0.0"
@@ -1410,9 +1428,9 @@ dependencies = [
[[package]]
name = "regex"
version = "1.13.0"
version = "1.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a0e75113e14dc5acb068cd0786884f214f1312650a3d36d269f5c4f3cdee8a2"
checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba"
dependencies = [
"aho-corasick",
"memchr",
@@ -1422,9 +1440,9 @@ dependencies = [
[[package]]
name = "regex-automata"
version = "0.4.15"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f388202e4b80542a0921078cc23b6333bcf1409c1e3f86404cae4766a6131db"
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
dependencies = [
"aho-corasick",
"memchr",
@@ -1527,9 +1545,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.42"
version = "0.23.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c54fcab019b409d04215d3a17cb438fd7fbf192ee61461f20f4fe18704bc138"
checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f"
dependencies = [
"aws-lc-rs",
"once_cell",
@@ -1602,9 +1620,9 @@ dependencies = [
[[package]]
name = "rustversion"
version = "1.0.23"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
[[package]]
name = "ryu"
@@ -1630,22 +1648,6 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "schedtxt_models"
version = "0.5.3"
source = "git+ssh://git@git.kundeng.us/phoenix/schedtxt_models.git?tag=v0.5.3#597af4e84c082bb437cc94817bb19592614681a5"
dependencies = [
"const_format",
"dotenvy",
"josekit",
"serde",
"serde_json",
"sqlx",
"time",
"utoipa",
"uuid",
]
[[package]]
name = "scopeguard"
version = "1.2.0"
@@ -2037,13 +2039,13 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "swoosh"
version = "0.5.4"
version = "0.5.2"
dependencies = [
"base64-ng",
"reqwest",
"schedtxt_models",
"serde",
"serde_json",
"textsender_models",
"time",
]
@@ -2112,6 +2114,22 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "textsender_models"
version = "0.5.1"
source = "git+ssh://git@git.kundeng.us/phoenix/textsender_models.git?tag=v0.5.1#151eeaacf64e255bde56a48df03f4c46ec77c235"
dependencies = [
"const_format",
"dotenvy",
"josekit",
"serde",
"serde_json",
"sqlx",
"time",
"utoipa",
"uuid",
]
[[package]]
name = "thiserror"
version = "2.0.18"
@@ -2174,9 +2192,9 @@ dependencies = [
[[package]]
name = "tinyvec"
version = "1.12.0"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f"
checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3"
dependencies = [
"tinyvec_macros",
]
@@ -2413,9 +2431,9 @@ dependencies = [
[[package]]
name = "uuid"
version = "1.23.5"
version = "1.23.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea5fab0d6c3c01ae70085a09cb03d4c7a1d6314e2b3e075392783396d724ca0a"
checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53"
dependencies = [
"getrandom 0.4.3",
"js-sys",
@@ -2460,6 +2478,15 @@ version = "0.11.1+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
name = "wasip2"
version = "1.0.4+wasi-0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
dependencies = [
"wit-bindgen",
]
[[package]]
name = "wasm-bindgen"
version = "0.2.126"
@@ -2689,6 +2716,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "wit-bindgen"
version = "0.57.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
[[package]]
name = "writeable"
version = "0.6.3"
@@ -2780,6 +2813,6 @@ dependencies = [
[[package]]
name = "zmij"
version = "1.0.23"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
+5 -6
View File
@@ -1,17 +1,16 @@
[package]
name = "swoosh"
version = "0.5.4"
version = "0.5.2"
edition = "2024"
rust-version = "1.97"
license = "MIT"
rust-version = "1.96.1"
description = "Library to send text messages"
[dependencies]
serde = { version = "1.0.228", features = ["derive"] }
serde_json = { version = "1.0.150" }
reqwest = { version = "0.13.4", features = ["form", "json", "blocking", "multipart", "stream"] }
time = { version = "0.3.53", features = ["formatting", "macros", "parsing", "serde"] }
base64-ng = { version = "1.3.7" }
schedtxt_models = { git = "ssh://git@git.kundeng.us/phoenix/schedtxt_models.git", tag = "v0.5.3", features = ["config", "contact", "message"] }
time = { version = "0.3.49", features = ["formatting", "macros", "parsing", "serde"] }
base64-ng = { version = "1.3.5" }
textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender_models.git", tag = "v0.5.1", features = ["config", "contact", "message"] }
[dev-dependencies]
-22
View File
@@ -1,22 +0,0 @@
Copyright (c) 2026 Kun Deng.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
-3
View File
@@ -1,3 +0,0 @@
# swoosh
A library used to send text messages and is used in conjunction of the `schedtxt`
project.
+7 -7
View File
@@ -14,10 +14,10 @@ pub use send_message as send_mssage;
/// Send a message
pub async fn send_message(
msg: &schedtxt_models::message::Message,
contact: &schedtxt_models::contact::Contact,
msg: &textsender_models::message::Message,
contact: &textsender_models::contact::Contact,
param: &crate::twilio::types::Parameters,
config: &schedtxt_models::config::auxiliary::TwilioConfig,
config: &textsender_models::config::auxiliary::TwilioConfig,
) -> Result<reqwest::Response, std::io::Error> {
if config.account_sid.is_empty() {
Err(std::io::Error::other("Account SID is empty"))
@@ -145,9 +145,9 @@ pub fn initial_params(
}
fn init_params(
contact: &schedtxt_models::contact::Contact,
message: &schedtxt_models::message::Message,
config: &schedtxt_models::config::auxiliary::TwilioConfig,
contact: &textsender_models::contact::Contact,
message: &textsender_models::message::Message,
config: &textsender_models::config::auxiliary::TwilioConfig,
param: &crate::twilio::types::Parameters,
) -> std::collections::HashMap<String, String> {
let now = time::OffsetDateTime::now_utc();
@@ -213,7 +213,7 @@ fn convert_time_to_iso(time: time::OffsetDateTime) -> Result<String, time::error
}
fn generate_auth(
config: &schedtxt_models::config::auxiliary::TwilioConfig,
config: &textsender_models::config::auxiliary::TwilioConfig,
) -> Result<String, base64_ng::EncodeError> {
let input = format!("{}:{}", config.account_sid, config.auth_token);
match base64_ng::encode(input.as_bytes()) {