@smbcloud / cli / commits / 8c7e64a

add runner and repository

Seto committed Sep 18, 2025 at 12:17 UTC 8c7e64a2a7daca55c9f62595b657cfa16e5f0d24
8 files changed +473 -49
Cargo.lock
+345 -36
@@ -48,6 +48,15 @@ dependencies = [
48 "libc",
49 ]
50
51 +[[package]]
52 +name = "ansi_term"
53 +version = "0.12.1"
54 +source = "registry+https://github.com/rust-lang/crates.io-index"
55 +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
56 +dependencies = [
57 + "winapi",
58 +]
59 +
60 [[package]]
61 name = "anstream"
62 version = "0.6.20"
@@ -121,6 +130,17 @@ version = "1.1.2"
130 source = "registry+https://github.com/rust-lang/crates.io-index"
131 checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
132
133 +[[package]]
134 +name = "atty"
135 +version = "0.2.14"
136 +source = "registry+https://github.com/rust-lang/crates.io-index"
137 +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
138 +dependencies = [
139 + "hermit-abi",
140 + "libc",
141 + "winapi",
142 +]
143 +
144 [[package]]
145 name = "autocfg"
146 version = "1.5.0"
@@ -148,6 +168,12 @@ version = "0.22.1"
168 source = "registry+https://github.com/rust-lang/crates.io-index"
169 checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
170
171 +[[package]]
172 +name = "bitflags"
173 +version = "1.3.2"
174 +source = "registry+https://github.com/rust-lang/crates.io-index"
175 +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
176 +
177 [[package]]
178 name = "bitflags"
179 version = "2.9.4"
@@ -219,6 +245,21 @@ dependencies = [
245 "windows-link 0.2.0",
246 ]
247
248 +[[package]]
249 +name = "clap"
250 +version = "2.34.0"
251 +source = "registry+https://github.com/rust-lang/crates.io-index"
252 +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
253 +dependencies = [
254 + "ansi_term",
255 + "atty",
256 + "bitflags 1.3.2",
257 + "strsim 0.8.0",
258 + "textwrap",
259 + "unicode-width 0.1.14",
260 + "vec_map",
261 +]
262 +
263 [[package]]
264 name = "clap"
265 version = "4.5.47"
@@ -238,7 +279,7 @@ dependencies = [
279 "anstream",
280 "anstyle",
281 "clap_lex",
241 - "strsim",
282 + "strsim 0.11.1",
283 ]
284
285 [[package]]
@@ -265,7 +306,7 @@ version = "0.2.29"
306 source = "registry+https://github.com/rust-lang/crates.io-index"
307 checksum = "27b4c3c54b30f0d9adcb47f25f61fcce35c4dd8916638c6b82fbd5f4fb4179e2"
308 dependencies = [
268 - "clap",
309 + "clap 4.5.47",
310 "roff",
311 ]
312
@@ -284,7 +325,7 @@ dependencies = [
325 "encode_unicode",
326 "libc",
327 "once_cell",
287 - "unicode-width",
328 + "unicode-width 0.2.1",
329 "windows-sys 0.59.0",
330 ]
331
@@ -297,10 +338,19 @@ dependencies = [
338 "encode_unicode",
339 "libc",
340 "once_cell",
300 - "unicode-width",
341 + "unicode-width 0.2.1",
342 "windows-sys 0.61.0",
343 ]
344
345 +[[package]]
346 +name = "convert_case"
347 +version = "0.6.0"
348 +source = "registry+https://github.com/rust-lang/crates.io-index"
349 +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
350 +dependencies = [
351 + "unicode-segmentation",
352 +]
353 +
354 [[package]]
355 name = "core-foundation"
356 version = "0.9.4"
@@ -534,6 +584,19 @@ dependencies = [
584 "slab",
585 ]
586
587 +[[package]]
588 +name = "generator"
589 +version = "0.7.5"
590 +source = "registry+https://github.com/rust-lang/crates.io-index"
591 +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e"
592 +dependencies = [
593 + "cc",
594 + "libc",
595 + "log",
596 + "rustversion",
597 + "windows",
598 +]
599 +
600 [[package]]
601 name = "generic-array"
602 version = "0.14.7"
@@ -589,7 +652,7 @@ version = "0.20.2"
652 source = "registry+https://github.com/rust-lang/crates.io-index"
653 checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110"
654 dependencies = [
592 - "bitflags",
655 + "bitflags 2.9.4",
656 "libc",
657 "libgit2-sys",
658 "log",
@@ -631,6 +694,15 @@ version = "0.15.5"
694 source = "registry+https://github.com/rust-lang/crates.io-index"
695 checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
696
697 +[[package]]
698 +name = "heck"
699 +version = "0.3.3"
700 +source = "registry+https://github.com/rust-lang/crates.io-index"
701 +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
702 +dependencies = [
703 + "unicode-segmentation",
704 +]
705 +
706 [[package]]
707 name = "heck"
708 version = "0.4.1"
@@ -643,6 +715,15 @@ version = "0.5.0"
715 source = "registry+https://github.com/rust-lang/crates.io-index"
716 checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
717
718 +[[package]]
719 +name = "hermit-abi"
720 +version = "0.1.19"
721 +source = "registry+https://github.com/rust-lang/crates.io-index"
722 +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
723 +dependencies = [
724 + "libc",
725 +]
726 +
727 [[package]]
728 name = "hmac"
729 version = "0.12.1"
@@ -931,7 +1012,7 @@ dependencies = [
1012 "console 0.15.11",
1013 "number_prefix",
1014 "portable-atomic",
934 - "unicode-width",
1015 + "unicode-width 0.2.1",
1016 "web-time",
1017 ]
1018
@@ -941,7 +1022,7 @@ version = "0.7.10"
1022 source = "registry+https://github.com/rust-lang/crates.io-index"
1023 checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b"
1024 dependencies = [
944 - "bitflags",
1025 + "bitflags 2.9.4",
1026 "cfg-if",
1027 "libc",
1028 ]
@@ -1005,9 +1086,9 @@ dependencies = [
1086
1087 [[package]]
1088 name = "js-sys"
1008 -version = "0.3.78"
1089 +version = "0.3.80"
1090 source = "registry+https://github.com/rust-lang/crates.io-index"
1010 -checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738"
1091 +checksum = "852f13bec5eba4ba9afbeb93fd7c13fe56147f055939ae21c43a29a0ecb2702e"
1092 dependencies = [
1093 "once_cell",
1094 "wasm-bindgen",
@@ -1045,7 +1126,7 @@ version = "0.1.10"
1126 source = "registry+https://github.com/rust-lang/crates.io-index"
1127 checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb"
1128 dependencies = [
1048 - "bitflags",
1129 + "bitflags 2.9.4",
1130 "libc",
1131 "redox_syscall",
1132 ]
@@ -1104,6 +1185,21 @@ version = "0.4.28"
1185 source = "registry+https://github.com/rust-lang/crates.io-index"
1186 checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
1187
1188 +[[package]]
1189 +name = "loom"
1190 +version = "0.5.6"
1191 +source = "registry+https://github.com/rust-lang/crates.io-index"
1192 +checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5"
1193 +dependencies = [
1194 + "cfg-if",
1195 + "generator",
1196 + "scoped-tls",
1197 + "serde",
1198 + "serde_json",
1199 + "tracing",
1200 + "tracing-subscriber",
1201 +]
1202 +
1203 [[package]]
1204 name = "maplit"
1205 version = "1.0.2"
@@ -1257,7 +1353,7 @@ version = "0.10.73"
1353 source = "registry+https://github.com/rust-lang/crates.io-index"
1354 checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8"
1355 dependencies = [
1260 - "bitflags",
1356 + "bitflags 2.9.4",
1357 "cfg-if",
1358 "foreign-types",
1359 "libc",
@@ -1309,7 +1405,7 @@ checksum = "6978128c8b51d8f4080631ceb2302ab51e32cc6e8615f735ee2f83fd269ae3f1"
1405 dependencies = [
1406 "bytecount",
1407 "fnv",
1312 - "unicode-width",
1408 + "unicode-width 0.2.1",
1409 ]
1410
1411 [[package]]
@@ -1442,6 +1538,30 @@ dependencies = [
1538 "zerocopy",
1539 ]
1540
1541 +[[package]]
1542 +name = "proc-macro-error"
1543 +version = "1.0.4"
1544 +source = "registry+https://github.com/rust-lang/crates.io-index"
1545 +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
1546 +dependencies = [
1547 + "proc-macro-error-attr",
1548 + "proc-macro2",
1549 + "quote",
1550 + "syn 1.0.109",
1551 + "version_check",
1552 +]
1553 +
1554 +[[package]]
1555 +name = "proc-macro-error-attr"
1556 +version = "1.0.4"
1557 +source = "registry+https://github.com/rust-lang/crates.io-index"
1558 +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
1559 +dependencies = [
1560 + "proc-macro2",
1561 + "quote",
1562 + "version_check",
1563 +]
1564 +
1565 [[package]]
1566 name = "proc-macro-error-attr2"
1567 version = "2.0.0"
@@ -1523,7 +1643,7 @@ version = "0.5.17"
1643 source = "registry+https://github.com/rust-lang/crates.io-index"
1644 checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77"
1645 dependencies = [
1526 - "bitflags",
1646 + "bitflags 2.9.4",
1647 ]
1648
1649 [[package]]
@@ -1638,7 +1758,7 @@ version = "1.1.2"
1758 source = "registry+https://github.com/rust-lang/crates.io-index"
1759 checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
1760 dependencies = [
1641 - "bitflags",
1761 + "bitflags 2.9.4",
1762 "errno",
1763 "libc",
1764 "linux-raw-sys",
@@ -1690,6 +1810,15 @@ version = "1.0.20"
1810 source = "registry+https://github.com/rust-lang/crates.io-index"
1811 checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
1812
1813 +[[package]]
1814 +name = "same-file"
1815 +version = "1.0.6"
1816 +source = "registry+https://github.com/rust-lang/crates.io-index"
1817 +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
1818 +dependencies = [
1819 + "winapi-util",
1820 +]
1821 +
1822 [[package]]
1823 name = "schannel"
1824 version = "0.1.28"
@@ -1699,6 +1828,12 @@ dependencies = [
1828 "windows-sys 0.61.0",
1829 ]
1830
1831 +[[package]]
1832 +name = "scoped-tls"
1833 +version = "1.0.1"
1834 +source = "registry+https://github.com/rust-lang/crates.io-index"
1835 +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
1836 +
1837 [[package]]
1838 name = "scopeguard"
1839 version = "1.2.0"
@@ -1711,7 +1846,7 @@ version = "2.11.1"
1846 source = "registry+https://github.com/rust-lang/crates.io-index"
1847 checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
1848 dependencies = [
1714 - "bitflags",
1849 + "bitflags 2.9.4",
1850 "core-foundation",
1851 "core-foundation-sys",
1852 "libc",
@@ -1879,7 +2014,7 @@ version = "0.3.26"
2014 dependencies = [
2015 "anyhow",
2016 "chrono",
1882 - "clap",
2017 + "clap 4.5.47",
2018 "clap_mangen",
2019 "console 0.16.1",
2020 "dialoguer",
@@ -1924,13 +2059,14 @@ dependencies = [
2059 "strum 0.27.2",
2060 "strum_macros 0.27.2",
2061 "thiserror 2.0.16",
2062 + "tsync",
2063 ]
2064
2065 [[package]]
2066 name = "smbcloud-network"
2067 version = "0.3.25"
2068 dependencies = [
1933 - "clap",
2069 + "clap 4.5.47",
2070 "log",
2071 "reqwest",
2072 "serde",
@@ -2037,6 +2173,15 @@ version = "1.2.0"
2173 source = "registry+https://github.com/rust-lang/crates.io-index"
2174 checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
2175
2176 +[[package]]
2177 +name = "state"
2178 +version = "0.6.0"
2179 +source = "registry+https://github.com/rust-lang/crates.io-index"
2180 +checksum = "2b8c4a4445d81357df8b1a650d0d0d6fbbbfe99d064aa5e02f3e4022061476d8"
2181 +dependencies = [
2182 + "loom",
2183 +]
2184 +
2185 [[package]]
2186 name = "stringprep"
2187 version = "0.1.5"
@@ -2048,12 +2193,42 @@ dependencies = [
2193 "unicode-properties",
2194 ]
2195
2196 +[[package]]
2197 +name = "strsim"
2198 +version = "0.8.0"
2199 +source = "registry+https://github.com/rust-lang/crates.io-index"
2200 +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
2201 +
2202 [[package]]
2203 name = "strsim"
2204 version = "0.11.1"
2205 source = "registry+https://github.com/rust-lang/crates.io-index"
2206 checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
2207
2208 +[[package]]
2209 +name = "structopt"
2210 +version = "0.3.26"
2211 +source = "registry+https://github.com/rust-lang/crates.io-index"
2212 +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
2213 +dependencies = [
2214 + "clap 2.34.0",
2215 + "lazy_static",
2216 + "structopt-derive",
2217 +]
2218 +
2219 +[[package]]
2220 +name = "structopt-derive"
2221 +version = "0.4.18"
2222 +source = "registry+https://github.com/rust-lang/crates.io-index"
2223 +checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
2224 +dependencies = [
2225 + "heck 0.3.3",
2226 + "proc-macro-error",
2227 + "proc-macro2",
2228 + "quote",
2229 + "syn 1.0.109",
2230 +]
2231 +
2232 [[package]]
2233 name = "strum"
2234 version = "0.24.1"
@@ -2148,7 +2323,7 @@ version = "0.6.1"
2323 source = "registry+https://github.com/rust-lang/crates.io-index"
2324 checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
2325 dependencies = [
2151 - "bitflags",
2326 + "bitflags 2.9.4",
2327 "core-foundation",
2328 "system-configuration-sys",
2329 ]
@@ -2206,7 +2381,16 @@ version = "0.3.0"
2381 source = "registry+https://github.com/rust-lang/crates.io-index"
2382 checksum = "0f8daae29995a24f65619e19d8d31dea5b389f3d853d8bf297bbf607cd0014cc"
2383 dependencies = [
2209 - "unicode-width",
2384 + "unicode-width 0.2.1",
2385 +]
2386 +
2387 +[[package]]
2388 +name = "textwrap"
2389 +version = "0.11.0"
2390 +source = "registry+https://github.com/rust-lang/crates.io-index"
2391 +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
2392 +dependencies = [
2393 + "unicode-width 0.1.14",
2394 ]
2395
2396 [[package]]
@@ -2382,9 +2566,9 @@ dependencies = [
2566
2567 [[package]]
2568 name = "tokio-rustls"
2385 -version = "0.26.2"
2569 +version = "0.26.3"
2570 source = "registry+https://github.com/rust-lang/crates.io-index"
2387 -checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b"
2571 +checksum = "05f63835928ca123f1bef57abbcd23bb2ba0ac9ae1235f1e65bda0d06e7786bd"
2572 dependencies = [
2573 "rustls",
2574 "tokio",
@@ -2465,7 +2649,7 @@ version = "0.6.6"
2649 source = "registry+https://github.com/rust-lang/crates.io-index"
2650 checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"
2651 dependencies = [
2468 - "bitflags",
2652 + "bitflags 2.9.4",
2653 "bytes",
2654 "futures-util",
2655 "http",
@@ -2586,6 +2770,28 @@ version = "0.2.5"
2770 source = "registry+https://github.com/rust-lang/crates.io-index"
2771 checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
2772
2773 +[[package]]
2774 +name = "tsync"
2775 +version = "2.2.1"
2776 +source = "registry+https://github.com/rust-lang/crates.io-index"
2777 +checksum = "4fc20a25899c5ae43735253244214f3d5eb75dd28d9cc8491732294a985adb8c"
2778 +dependencies = [
2779 + "convert_case",
2780 + "proc-macro2",
2781 + "quote",
2782 + "state",
2783 + "structopt",
2784 + "syn 2.0.106",
2785 + "tsync-macro",
2786 + "walkdir",
2787 +]
2788 +
2789 +[[package]]
2790 +name = "tsync-macro"
2791 +version = "0.1.0"
2792 +source = "registry+https://github.com/rust-lang/crates.io-index"
2793 +checksum = "8acc9e35a3072d9ea375093f321b3738ea3ac4fdebc18d2789b01581e5c2e4ae"
2794 +
2795 [[package]]
2796 name = "typenum"
2797 version = "1.18.0"
@@ -2619,6 +2825,18 @@ version = "0.1.3"
2825 source = "registry+https://github.com/rust-lang/crates.io-index"
2826 checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0"
2827
2828 +[[package]]
2829 +name = "unicode-segmentation"
2830 +version = "1.12.0"
2831 +source = "registry+https://github.com/rust-lang/crates.io-index"
2832 +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
2833 +
2834 +[[package]]
2835 +name = "unicode-width"
2836 +version = "0.1.14"
2837 +source = "registry+https://github.com/rust-lang/crates.io-index"
2838 +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
2839 +
2840 [[package]]
2841 name = "unicode-width"
2842 version = "0.2.1"
@@ -2673,12 +2891,28 @@ version = "0.2.15"
2891 source = "registry+https://github.com/rust-lang/crates.io-index"
2892 checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
2893
2894 +[[package]]
2895 +name = "vec_map"
2896 +version = "0.8.2"
2897 +source = "registry+https://github.com/rust-lang/crates.io-index"
2898 +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
2899 +
2900 [[package]]
2901 name = "version_check"
2902 version = "0.9.5"
2903 source = "registry+https://github.com/rust-lang/crates.io-index"
2904 checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
2905
2906 +[[package]]
2907 +name = "walkdir"
2908 +version = "2.5.0"
2909 +source = "registry+https://github.com/rust-lang/crates.io-index"
2910 +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
2911 +dependencies = [
2912 + "same-file",
2913 + "winapi-util",
2914 +]
2915 +
2916 [[package]]
2917 name = "want"
2918 version = "0.3.1"
@@ -2720,9 +2954,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b"
2954
2955 [[package]]
2956 name = "wasm-bindgen"
2723 -version = "0.2.101"
2957 +version = "0.2.103"
2958 source = "registry+https://github.com/rust-lang/crates.io-index"
2725 -checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b"
2959 +checksum = "ab10a69fbd0a177f5f649ad4d8d3305499c42bab9aef2f7ff592d0ec8f833819"
2960 dependencies = [
2961 "cfg-if",
2962 "once_cell",
@@ -2733,9 +2967,9 @@ dependencies = [
2967
2968 [[package]]
2969 name = "wasm-bindgen-backend"
2736 -version = "0.2.101"
2970 +version = "0.2.103"
2971 source = "registry+https://github.com/rust-lang/crates.io-index"
2738 -checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb"
2972 +checksum = "0bb702423545a6007bbc368fde243ba47ca275e549c8a28617f56f6ba53b1d1c"
2973 dependencies = [
2974 "bumpalo",
2975 "log",
@@ -2747,9 +2981,9 @@ dependencies = [
2981
2982 [[package]]
2983 name = "wasm-bindgen-futures"
2750 -version = "0.4.51"
2984 +version = "0.4.53"
2985 source = "registry+https://github.com/rust-lang/crates.io-index"
2752 -checksum = "0ca85039a9b469b38336411d6d6ced91f3fc87109a2a27b0c197663f5144dffe"
2986 +checksum = "a0b221ff421256839509adbb55998214a70d829d3a28c69b4a6672e9d2a42f67"
2987 dependencies = [
2988 "cfg-if",
2989 "js-sys",
@@ -2760,9 +2994,9 @@ dependencies = [
2994
2995 [[package]]
2996 name = "wasm-bindgen-macro"
2763 -version = "0.2.101"
2997 +version = "0.2.103"
2998 source = "registry+https://github.com/rust-lang/crates.io-index"
2765 -checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d"
2999 +checksum = "fc65f4f411d91494355917b605e1480033152658d71f722a90647f56a70c88a0"
3000 dependencies = [
3001 "quote",
3002 "wasm-bindgen-macro-support",
@@ -2770,9 +3004,9 @@ dependencies = [
3004
3005 [[package]]
3006 name = "wasm-bindgen-macro-support"
2773 -version = "0.2.101"
3007 +version = "0.2.103"
3008 source = "registry+https://github.com/rust-lang/crates.io-index"
2775 -checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa"
3009 +checksum = "ffc003a991398a8ee604a401e194b6b3a39677b3173d6e74495eb51b82e99a32"
3010 dependencies = [
3011 "proc-macro2",
3012 "quote",
@@ -2783,18 +3017,18 @@ dependencies = [
3017
3018 [[package]]
3019 name = "wasm-bindgen-shared"
2786 -version = "0.2.101"
3020 +version = "0.2.103"
3021 source = "registry+https://github.com/rust-lang/crates.io-index"
2788 -checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1"
3022 +checksum = "293c37f4efa430ca14db3721dfbe48d8c33308096bd44d80ebaa775ab71ba1cf"
3023 dependencies = [
3024 "unicode-ident",
3025 ]
3026
3027 [[package]]
3028 name = "web-sys"
2795 -version = "0.3.78"
3029 +version = "0.3.80"
3030 source = "registry+https://github.com/rust-lang/crates.io-index"
2797 -checksum = "77e4b637749ff0d92b8fad63aa1f7cff3cbe125fd49c175cd6345e7272638b12"
3031 +checksum = "fbe734895e869dc429d78c4b433f8d17d95f8d05317440b4fad5ab2d33e596dc"
3032 dependencies = [
3033 "js-sys",
3034 "wasm-bindgen",
@@ -2837,12 +3071,30 @@ version = "0.4.0"
3071 source = "registry+https://github.com/rust-lang/crates.io-index"
3072 checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
3073
3074 +[[package]]
3075 +name = "winapi-util"
3076 +version = "0.1.11"
3077 +source = "registry+https://github.com/rust-lang/crates.io-index"
3078 +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
3079 +dependencies = [
3080 + "windows-sys 0.61.0",
3081 +]
3082 +
3083 [[package]]
3084 name = "winapi-x86_64-pc-windows-gnu"
3085 version = "0.4.0"
3086 source = "registry+https://github.com/rust-lang/crates.io-index"
3087 checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
3088
3089 +[[package]]
3090 +name = "windows"
3091 +version = "0.48.0"
3092 +source = "registry+https://github.com/rust-lang/crates.io-index"
3093 +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
3094 +dependencies = [
3095 + "windows-targets 0.48.5",
3096 +]
3097 +
3098 [[package]]
3099 name = "windows-core"
3100 version = "0.62.0"
@@ -2973,6 +3225,21 @@ dependencies = [
3225 "windows-link 0.2.0",
3226 ]
3227
3228 +[[package]]
3229 +name = "windows-targets"
3230 +version = "0.48.5"
3231 +source = "registry+https://github.com/rust-lang/crates.io-index"
3232 +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
3233 +dependencies = [
3234 + "windows_aarch64_gnullvm 0.48.5",
3235 + "windows_aarch64_msvc 0.48.5",
3236 + "windows_i686_gnu 0.48.5",
3237 + "windows_i686_msvc 0.48.5",
3238 + "windows_x86_64_gnu 0.48.5",
3239 + "windows_x86_64_gnullvm 0.48.5",
3240 + "windows_x86_64_msvc 0.48.5",
3241 +]
3242 +
3243 [[package]]
3244 name = "windows-targets"
3245 version = "0.52.6"
@@ -3006,6 +3273,12 @@ dependencies = [
3273 "windows_x86_64_msvc 0.53.0",
3274 ]
3275
3276 +[[package]]
3277 +name = "windows_aarch64_gnullvm"
3278 +version = "0.48.5"
3279 +source = "registry+https://github.com/rust-lang/crates.io-index"
3280 +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
3281 +
3282 [[package]]
3283 name = "windows_aarch64_gnullvm"
3284 version = "0.52.6"
@@ -3018,6 +3291,12 @@ version = "0.53.0"
3291 source = "registry+https://github.com/rust-lang/crates.io-index"
3292 checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
3293
3294 +[[package]]
3295 +name = "windows_aarch64_msvc"
3296 +version = "0.48.5"
3297 +source = "registry+https://github.com/rust-lang/crates.io-index"
3298 +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
3299 +
3300 [[package]]
3301 name = "windows_aarch64_msvc"
3302 version = "0.52.6"
@@ -3030,6 +3309,12 @@ version = "0.53.0"
3309 source = "registry+https://github.com/rust-lang/crates.io-index"
3310 checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
3311
3312 +[[package]]
3313 +name = "windows_i686_gnu"
3314 +version = "0.48.5"
3315 +source = "registry+https://github.com/rust-lang/crates.io-index"
3316 +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
3317 +
3318 [[package]]
3319 name = "windows_i686_gnu"
3320 version = "0.52.6"
@@ -3054,6 +3339,12 @@ version = "0.53.0"
3339 source = "registry+https://github.com/rust-lang/crates.io-index"
3340 checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
3341
3342 +[[package]]
3343 +name = "windows_i686_msvc"
3344 +version = "0.48.5"
3345 +source = "registry+https://github.com/rust-lang/crates.io-index"
3346 +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
3347 +
3348 [[package]]
3349 name = "windows_i686_msvc"
3350 version = "0.52.6"
@@ -3066,6 +3357,12 @@ version = "0.53.0"
3357 source = "registry+https://github.com/rust-lang/crates.io-index"
3358 checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
3359
3360 +[[package]]
3361 +name = "windows_x86_64_gnu"
3362 +version = "0.48.5"
3363 +source = "registry+https://github.com/rust-lang/crates.io-index"
3364 +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
3365 +
3366 [[package]]
3367 name = "windows_x86_64_gnu"
3368 version = "0.52.6"
@@ -3078,6 +3375,12 @@ version = "0.53.0"
3375 source = "registry+https://github.com/rust-lang/crates.io-index"
3376 checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
3377
3378 +[[package]]
3379 +name = "windows_x86_64_gnullvm"
3380 +version = "0.48.5"
3381 +source = "registry+https://github.com/rust-lang/crates.io-index"
3382 +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
3383 +
3384 [[package]]
3385 name = "windows_x86_64_gnullvm"
3386 version = "0.52.6"
@@ -3090,6 +3393,12 @@ version = "0.53.0"
3393 source = "registry+https://github.com/rust-lang/crates.io-index"
3394 checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
3395
3396 +[[package]]
3397 +name = "windows_x86_64_msvc"
3398 +version = "0.48.5"
3399 +source = "registry+https://github.com/rust-lang/crates.io-index"
3400 +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
3401 +
3402 [[package]]
3403 name = "windows_x86_64_msvc"
3404 version = "0.52.6"
Cargo.toml
+1
@@ -39,5 +39,6 @@ toml = "0.8"
39 tracing = "0.1.35"
40 tracing-bunyan-formatter = "0.3.3"
41 tracing-subscriber = "0.3.14"
42 +tsync = "2"
43 url-builder = "0.1.1"
44 wasm-bindgen = "0.2"
crates/cli/src/deploy/git.rs
+8 -6
@@ -1,9 +1,11 @@
1 -use crate::project::runner::Runner;
2 -use crate::ui::{fail_message, fail_symbol, succeed_message, succeed_symbol};
3 -use anyhow::{anyhow, Result};
4 -use console::style;
5 -use git2::{Remote, Repository};
6 -use spinners::Spinner;
1 +use {
2 + crate::project::runner::Runner,
3 + crate::ui::{fail_message, fail_symbol, succeed_message, succeed_symbol},
4 + anyhow::{anyhow, Result},
5 + console::style,
6 + git2::{Remote, Repository},
7 + spinners::Spinner,
8 +};
9
10 pub async fn remote_deployment_setup<'a>(
11 runner: &Runner,
crates/smbcloud-model/Cargo.toml
+1
@@ -30,3 +30,4 @@ spinners = { workspace = true }
30 strum = { workspace = true }
31 strum_macros = { workspace = true }
32 thiserror = { workspace = true }
33 +tsync = { workspace = true }
crates/smbcloud-model/src/error_codes.rs
+13 -7
@@ -1,10 +1,12 @@
1 -use core::fmt;
2 -use log::debug;
3 -use serde::{Deserialize, Serialize};
4 -use serde_repr::{Deserialize_repr, Serialize_repr};
5 -use std::fmt::{Display, Formatter};
6 -use strum_macros::{EnumIter, IntoStaticStr};
7 -use thiserror::Error;
1 +use {
2 + core::fmt,
3 + log::debug,
4 + serde::{Deserialize, Serialize},
5 + serde_repr::{Deserialize_repr, Serialize_repr},
6 + std::fmt::{Display, Formatter},
7 + strum_macros::{EnumIter, IntoStaticStr},
8 + thiserror::Error,
9 +};
10
11 #[derive(Error, Serialize, Deserialize, Debug)]
12 #[serde(untagged)]
@@ -45,6 +47,8 @@ pub enum ErrorCode {
47 // Projects
48 #[error("Project not found.")]
49 ProjectNotFound = 1000,
50 + #[error("Runner not supported.")]
51 + UnsupportedRunner = 1001,
52 }
53
54 impl ErrorCode {
@@ -81,6 +85,8 @@ impl ErrorCode {
85 ErrorCode::InputError => "Input error.",
86 ErrorCode::MissingConfig => "Missing config.",
87 ErrorCode::Cancel => "Cancelled operation.",
88 + // Projects
89 + ErrorCode::UnsupportedRunner => "Unsupported runner.",
90 }
91 }
92
crates/smbcloud-model/src/lib.rs
+2
@@ -4,6 +4,8 @@ pub mod error_codes;
4 pub mod forgot;
5 pub mod login;
6 pub mod project;
7 +pub mod repository;
8 +pub mod runner;
9 pub mod signup;
10
11 pub mod ar_date_format {
crates/smbcloud-model/src/repository.rs new
+13
@@ -0,0 +1,13 @@
1 +use {
2 + crate::runner::Runner,
3 + serde::{Deserialize, Serialize},
4 +};
5 +
6 +#[derive(Debug, Serialize, Deserialize)]
7 +#[tsync::tsync]
8 +pub struct Repository {
9 + pub short_name: String,
10 + pub name: String,
11 + pub path: String,
12 + pub runner: Runner,
13 +}
crates/smbcloud-model/src/runner.rs new
+90
@@ -0,0 +1,90 @@
1 +use {
2 + crate::error_codes::{ErrorCode::UnsupportedRunner, ErrorResponse},
3 + serde::{Deserialize, Serialize},
4 + std::{fs, path::PathBuf},
5 +};
6 +
7 +#[derive(Debug, Serialize, Deserialize)]
8 +#[tsync::tsync]
9 +pub enum Runner {
10 + NodeJs,
11 + Ruby,
12 + Swift,
13 +}
14 +
15 +#[derive(Debug, Serialize, Deserialize)]
16 +#[tsync::tsync]
17 +pub enum NodeJsFramework {
18 + NextJs,
19 + Astro,
20 +}
21 +
22 +#[derive(Debug, Serialize, Deserialize)]
23 +#[tsync::tsync]
24 +pub enum RubyFramework {
25 + Rails,
26 +}
27 +
28 +#[derive(Debug, Serialize, Deserialize)]
29 +#[tsync::tsync]
30 +pub enum SwiftFramework {
31 + Vapor,
32 +}
33 +
34 +impl Runner {
35 + pub fn from(repo_path: &PathBuf) -> Result<Runner, ErrorResponse> {
36 + if repo_path.join("package.json").exists()
37 + && (next_config_exists() || astro_config_exists())
38 + {
39 + if next_config_exists() {
40 + return Ok(Runner::NodeJs);
41 + } else if astro_config_exists() {
42 + return Ok(Runner::NodeJs);
43 + } else {
44 + return Err(ErrorResponse::Error {
45 + error_code: UnsupportedRunner,
46 + message: UnsupportedRunner.message(None).to_string(),
47 + });
48 + };
49 + }
50 +
51 + if repo_path.join("Gemfile").exists() {
52 + return Ok(Runner::Ruby);
53 + }
54 + if repo_path.join("Package.swift").exists() {
55 + return Ok(Runner::Swift);
56 + }
57 + return Err(ErrorResponse::Error {
58 + error_code: UnsupportedRunner,
59 + message: UnsupportedRunner.message(None).to_string(),
60 + });
61 + }
62 +}
63 +
64 +// Helper function to detect any next.config.* file
65 +fn next_config_exists() -> bool {
66 + if let Ok(entries) = fs::read_dir(".") {
67 + for entry in entries.flatten() {
68 + let filename = entry.file_name();
69 + let filename_str = filename.to_string_lossy();
70 + if filename_str.starts_with("next.config.") {
71 + return true;
72 + }
73 + }
74 + }
75 + false
76 +}
77 +
78 +// Helper function to detect any astro.config.* file
79 +fn astro_config_exists() -> bool {
80 + if let Ok(entries) = fs::read_dir(".") {
81 + for entry in entries.flatten() {
82 + let filename = entry.file_name();
83 + let filename_str = filename.to_string_lossy();
84 + if filename_str.starts_with("astro.config.") {
85 + return true;
86 + }
87 + }
88 + }
89 + false
90 +}