reallink-cli 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rust/Cargo.lock +197 -1
- package/rust/Cargo.toml +2 -1
- package/rust/src/main.rs +5 -1
package/package.json
CHANGED
package/rust/Cargo.lock
CHANGED
|
@@ -98,6 +98,12 @@ dependencies = [
|
|
|
98
98
|
"shlex",
|
|
99
99
|
]
|
|
100
100
|
|
|
101
|
+
[[package]]
|
|
102
|
+
name = "cesu8"
|
|
103
|
+
version = "1.1.0"
|
|
104
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
105
|
+
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
|
|
106
|
+
|
|
101
107
|
[[package]]
|
|
102
108
|
name = "cfg-if"
|
|
103
109
|
version = "1.0.4"
|
|
@@ -156,6 +162,32 @@ version = "1.0.4"
|
|
|
156
162
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
163
|
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
|
158
164
|
|
|
165
|
+
[[package]]
|
|
166
|
+
name = "combine"
|
|
167
|
+
version = "4.6.7"
|
|
168
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
169
|
+
checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
|
|
170
|
+
dependencies = [
|
|
171
|
+
"bytes",
|
|
172
|
+
"memchr",
|
|
173
|
+
]
|
|
174
|
+
|
|
175
|
+
[[package]]
|
|
176
|
+
name = "core-foundation"
|
|
177
|
+
version = "0.10.1"
|
|
178
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
179
|
+
checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
|
|
180
|
+
dependencies = [
|
|
181
|
+
"core-foundation-sys",
|
|
182
|
+
"libc",
|
|
183
|
+
]
|
|
184
|
+
|
|
185
|
+
[[package]]
|
|
186
|
+
name = "core-foundation-sys"
|
|
187
|
+
version = "0.8.7"
|
|
188
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
189
|
+
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
190
|
+
|
|
159
191
|
[[package]]
|
|
160
192
|
name = "dirs"
|
|
161
193
|
version = "5.0.1"
|
|
@@ -499,6 +531,28 @@ version = "1.0.17"
|
|
|
499
531
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
500
532
|
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
|
501
533
|
|
|
534
|
+
[[package]]
|
|
535
|
+
name = "jni"
|
|
536
|
+
version = "0.21.1"
|
|
537
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
538
|
+
checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
|
|
539
|
+
dependencies = [
|
|
540
|
+
"cesu8",
|
|
541
|
+
"cfg-if",
|
|
542
|
+
"combine",
|
|
543
|
+
"jni-sys",
|
|
544
|
+
"log",
|
|
545
|
+
"thiserror 1.0.69",
|
|
546
|
+
"walkdir",
|
|
547
|
+
"windows-sys 0.45.0",
|
|
548
|
+
]
|
|
549
|
+
|
|
550
|
+
[[package]]
|
|
551
|
+
name = "jni-sys"
|
|
552
|
+
version = "0.3.0"
|
|
553
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
554
|
+
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
|
555
|
+
|
|
502
556
|
[[package]]
|
|
503
557
|
name = "js-sys"
|
|
504
558
|
version = "0.3.91"
|
|
@@ -559,6 +613,37 @@ dependencies = [
|
|
|
559
613
|
"windows-sys 0.61.2",
|
|
560
614
|
]
|
|
561
615
|
|
|
616
|
+
[[package]]
|
|
617
|
+
name = "ndk-context"
|
|
618
|
+
version = "0.1.1"
|
|
619
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
620
|
+
checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
|
|
621
|
+
|
|
622
|
+
[[package]]
|
|
623
|
+
name = "objc2"
|
|
624
|
+
version = "0.6.4"
|
|
625
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
626
|
+
checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"
|
|
627
|
+
dependencies = [
|
|
628
|
+
"objc2-encode",
|
|
629
|
+
]
|
|
630
|
+
|
|
631
|
+
[[package]]
|
|
632
|
+
name = "objc2-encode"
|
|
633
|
+
version = "4.1.0"
|
|
634
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
635
|
+
checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"
|
|
636
|
+
|
|
637
|
+
[[package]]
|
|
638
|
+
name = "objc2-foundation"
|
|
639
|
+
version = "0.3.2"
|
|
640
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
641
|
+
checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
|
|
642
|
+
dependencies = [
|
|
643
|
+
"bitflags",
|
|
644
|
+
"objc2",
|
|
645
|
+
]
|
|
646
|
+
|
|
562
647
|
[[package]]
|
|
563
648
|
name = "once_cell"
|
|
564
649
|
version = "1.21.3"
|
|
@@ -723,7 +808,7 @@ dependencies = [
|
|
|
723
808
|
|
|
724
809
|
[[package]]
|
|
725
810
|
name = "reallink-cli"
|
|
726
|
-
version = "0.1.
|
|
811
|
+
version = "0.1.1"
|
|
727
812
|
dependencies = [
|
|
728
813
|
"anyhow",
|
|
729
814
|
"clap",
|
|
@@ -732,6 +817,7 @@ dependencies = [
|
|
|
732
817
|
"serde",
|
|
733
818
|
"serde_json",
|
|
734
819
|
"tokio",
|
|
820
|
+
"webbrowser",
|
|
735
821
|
]
|
|
736
822
|
|
|
737
823
|
[[package]]
|
|
@@ -850,6 +936,15 @@ version = "1.0.23"
|
|
|
850
936
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
851
937
|
checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
|
|
852
938
|
|
|
939
|
+
[[package]]
|
|
940
|
+
name = "same-file"
|
|
941
|
+
version = "1.0.6"
|
|
942
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
943
|
+
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
|
944
|
+
dependencies = [
|
|
945
|
+
"winapi-util",
|
|
946
|
+
]
|
|
947
|
+
|
|
853
948
|
[[package]]
|
|
854
949
|
name = "serde"
|
|
855
950
|
version = "1.0.228"
|
|
@@ -1189,6 +1284,16 @@ version = "0.2.2"
|
|
|
1189
1284
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1190
1285
|
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|
1191
1286
|
|
|
1287
|
+
[[package]]
|
|
1288
|
+
name = "walkdir"
|
|
1289
|
+
version = "2.5.0"
|
|
1290
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1291
|
+
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
|
|
1292
|
+
dependencies = [
|
|
1293
|
+
"same-file",
|
|
1294
|
+
"winapi-util",
|
|
1295
|
+
]
|
|
1296
|
+
|
|
1192
1297
|
[[package]]
|
|
1193
1298
|
name = "want"
|
|
1194
1299
|
version = "0.3.1"
|
|
@@ -1292,6 +1397,22 @@ dependencies = [
|
|
|
1292
1397
|
"wasm-bindgen",
|
|
1293
1398
|
]
|
|
1294
1399
|
|
|
1400
|
+
[[package]]
|
|
1401
|
+
name = "webbrowser"
|
|
1402
|
+
version = "1.1.0"
|
|
1403
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1404
|
+
checksum = "3f00bb839c1cf1e3036066614cbdcd035ecf215206691ea646aa3c60a24f68f2"
|
|
1405
|
+
dependencies = [
|
|
1406
|
+
"core-foundation",
|
|
1407
|
+
"jni",
|
|
1408
|
+
"log",
|
|
1409
|
+
"ndk-context",
|
|
1410
|
+
"objc2",
|
|
1411
|
+
"objc2-foundation",
|
|
1412
|
+
"url",
|
|
1413
|
+
"web-sys",
|
|
1414
|
+
]
|
|
1415
|
+
|
|
1295
1416
|
[[package]]
|
|
1296
1417
|
name = "webpki-roots"
|
|
1297
1418
|
version = "1.0.6"
|
|
@@ -1301,12 +1422,30 @@ dependencies = [
|
|
|
1301
1422
|
"rustls-pki-types",
|
|
1302
1423
|
]
|
|
1303
1424
|
|
|
1425
|
+
[[package]]
|
|
1426
|
+
name = "winapi-util"
|
|
1427
|
+
version = "0.1.11"
|
|
1428
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1429
|
+
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
|
1430
|
+
dependencies = [
|
|
1431
|
+
"windows-sys 0.61.2",
|
|
1432
|
+
]
|
|
1433
|
+
|
|
1304
1434
|
[[package]]
|
|
1305
1435
|
name = "windows-link"
|
|
1306
1436
|
version = "0.2.1"
|
|
1307
1437
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1308
1438
|
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
1309
1439
|
|
|
1440
|
+
[[package]]
|
|
1441
|
+
name = "windows-sys"
|
|
1442
|
+
version = "0.45.0"
|
|
1443
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1444
|
+
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
|
|
1445
|
+
dependencies = [
|
|
1446
|
+
"windows-targets 0.42.2",
|
|
1447
|
+
]
|
|
1448
|
+
|
|
1310
1449
|
[[package]]
|
|
1311
1450
|
name = "windows-sys"
|
|
1312
1451
|
version = "0.48.0"
|
|
@@ -1343,6 +1482,21 @@ dependencies = [
|
|
|
1343
1482
|
"windows-link",
|
|
1344
1483
|
]
|
|
1345
1484
|
|
|
1485
|
+
[[package]]
|
|
1486
|
+
name = "windows-targets"
|
|
1487
|
+
version = "0.42.2"
|
|
1488
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1489
|
+
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
|
|
1490
|
+
dependencies = [
|
|
1491
|
+
"windows_aarch64_gnullvm 0.42.2",
|
|
1492
|
+
"windows_aarch64_msvc 0.42.2",
|
|
1493
|
+
"windows_i686_gnu 0.42.2",
|
|
1494
|
+
"windows_i686_msvc 0.42.2",
|
|
1495
|
+
"windows_x86_64_gnu 0.42.2",
|
|
1496
|
+
"windows_x86_64_gnullvm 0.42.2",
|
|
1497
|
+
"windows_x86_64_msvc 0.42.2",
|
|
1498
|
+
]
|
|
1499
|
+
|
|
1346
1500
|
[[package]]
|
|
1347
1501
|
name = "windows-targets"
|
|
1348
1502
|
version = "0.48.5"
|
|
@@ -1391,6 +1545,12 @@ dependencies = [
|
|
|
1391
1545
|
"windows_x86_64_msvc 0.53.1",
|
|
1392
1546
|
]
|
|
1393
1547
|
|
|
1548
|
+
[[package]]
|
|
1549
|
+
name = "windows_aarch64_gnullvm"
|
|
1550
|
+
version = "0.42.2"
|
|
1551
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1552
|
+
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
|
1553
|
+
|
|
1394
1554
|
[[package]]
|
|
1395
1555
|
name = "windows_aarch64_gnullvm"
|
|
1396
1556
|
version = "0.48.5"
|
|
@@ -1409,6 +1569,12 @@ version = "0.53.1"
|
|
|
1409
1569
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1410
1570
|
checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
|
|
1411
1571
|
|
|
1572
|
+
[[package]]
|
|
1573
|
+
name = "windows_aarch64_msvc"
|
|
1574
|
+
version = "0.42.2"
|
|
1575
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1576
|
+
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
|
1577
|
+
|
|
1412
1578
|
[[package]]
|
|
1413
1579
|
name = "windows_aarch64_msvc"
|
|
1414
1580
|
version = "0.48.5"
|
|
@@ -1427,6 +1593,12 @@ version = "0.53.1"
|
|
|
1427
1593
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1428
1594
|
checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
|
|
1429
1595
|
|
|
1596
|
+
[[package]]
|
|
1597
|
+
name = "windows_i686_gnu"
|
|
1598
|
+
version = "0.42.2"
|
|
1599
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1600
|
+
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
|
1601
|
+
|
|
1430
1602
|
[[package]]
|
|
1431
1603
|
name = "windows_i686_gnu"
|
|
1432
1604
|
version = "0.48.5"
|
|
@@ -1457,6 +1629,12 @@ version = "0.53.1"
|
|
|
1457
1629
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1458
1630
|
checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
|
|
1459
1631
|
|
|
1632
|
+
[[package]]
|
|
1633
|
+
name = "windows_i686_msvc"
|
|
1634
|
+
version = "0.42.2"
|
|
1635
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1636
|
+
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
|
1637
|
+
|
|
1460
1638
|
[[package]]
|
|
1461
1639
|
name = "windows_i686_msvc"
|
|
1462
1640
|
version = "0.48.5"
|
|
@@ -1475,6 +1653,12 @@ version = "0.53.1"
|
|
|
1475
1653
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1476
1654
|
checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
|
|
1477
1655
|
|
|
1656
|
+
[[package]]
|
|
1657
|
+
name = "windows_x86_64_gnu"
|
|
1658
|
+
version = "0.42.2"
|
|
1659
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1660
|
+
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
|
1661
|
+
|
|
1478
1662
|
[[package]]
|
|
1479
1663
|
name = "windows_x86_64_gnu"
|
|
1480
1664
|
version = "0.48.5"
|
|
@@ -1493,6 +1677,12 @@ version = "0.53.1"
|
|
|
1493
1677
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1494
1678
|
checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
|
|
1495
1679
|
|
|
1680
|
+
[[package]]
|
|
1681
|
+
name = "windows_x86_64_gnullvm"
|
|
1682
|
+
version = "0.42.2"
|
|
1683
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1684
|
+
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
|
1685
|
+
|
|
1496
1686
|
[[package]]
|
|
1497
1687
|
name = "windows_x86_64_gnullvm"
|
|
1498
1688
|
version = "0.48.5"
|
|
@@ -1511,6 +1701,12 @@ version = "0.53.1"
|
|
|
1511
1701
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1512
1702
|
checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
|
|
1513
1703
|
|
|
1704
|
+
[[package]]
|
|
1705
|
+
name = "windows_x86_64_msvc"
|
|
1706
|
+
version = "0.42.2"
|
|
1707
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1708
|
+
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
|
1709
|
+
|
|
1514
1710
|
[[package]]
|
|
1515
1711
|
name = "windows_x86_64_msvc"
|
|
1516
1712
|
version = "0.48.5"
|
package/rust/Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "reallink-cli"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.1"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
description = "CLI for Reallink auth and token workflows"
|
|
6
6
|
license = "MIT"
|
|
@@ -13,3 +13,4 @@ reqwest = { version = "0.12", default-features = false, features = ["json", "rus
|
|
|
13
13
|
serde = { version = "1.0", features = ["derive"] }
|
|
14
14
|
serde_json = "1.0"
|
|
15
15
|
tokio = { version = "1.42", features = ["macros", "rt-multi-thread", "time"] }
|
|
16
|
+
webbrowser = "1.0"
|
package/rust/src/main.rs
CHANGED
|
@@ -324,6 +324,10 @@ async fn login_command(client: &reqwest::Client, args: LoginArgs) -> Result<()>
|
|
|
324
324
|
println!("Open this URL in your browser and approve the login:");
|
|
325
325
|
println!("{}", device_code.verification_uri_complete);
|
|
326
326
|
println!("User code: {}", device_code.user_code);
|
|
327
|
+
match webbrowser::open(&device_code.verification_uri_complete) {
|
|
328
|
+
Ok(_) => println!("Browser opened for device approval."),
|
|
329
|
+
Err(_) => println!("Could not open browser automatically. Open the URL manually."),
|
|
330
|
+
}
|
|
327
331
|
|
|
328
332
|
let expires_at = std::time::Instant::now() + Duration::from_secs(device_code.expires_in);
|
|
329
333
|
let mut poll_interval = Duration::from_secs(device_code.interval.max(1));
|
|
@@ -471,7 +475,7 @@ async fn token_revoke_command(client: &reqwest::Client, args: TokenRevokeArgs) -
|
|
|
471
475
|
async fn main() -> Result<()> {
|
|
472
476
|
let cli = Cli::parse();
|
|
473
477
|
let client = reqwest::Client::builder()
|
|
474
|
-
.user_agent("reallink-cli/0.1.
|
|
478
|
+
.user_agent("reallink-cli/0.1.1")
|
|
475
479
|
.build()?;
|
|
476
480
|
|
|
477
481
|
match cli.command {
|