smbcloud-cli 0.3.39__tar.gz → 0.4.0__tar.gz
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.
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/Cargo.lock +17 -17
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/Cargo.toml +9 -9
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/PKG-INFO +9 -9
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/README.md +8 -8
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/Cargo.toml +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/README.md +11 -9
- smbcloud_cli-0.4.0/crates/cli/src/account/cli.rs +13 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/account/forgot/mod.rs +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/account/lib.rs +6 -16
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/account/login/process.rs +23 -29
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/account/logout/mod.rs +2 -4
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/detect_runner.rs +11 -3
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/mod.rs +1 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/process_deploy.rs +6 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/process_deploy_nextjs_ssr.rs +89 -43
- smbcloud_cli-0.4.0/crates/cli/src/deploy/process_deploy_rust.rs +310 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/setup_create_new_project.rs +7 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/project/crud_create.rs +11 -4
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/project/crud_update.rs +7 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/Cargo.toml +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/README.md +2 -2
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/login.rs +13 -4
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/resend_reset_password_instruction.rs +18 -6
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-mail/Cargo.toml +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-mail/README.md +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/Cargo.toml +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/README.md +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/account.rs +10 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/error_codes.rs +2 -2
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/runner.rs +6 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-network/Cargo.toml +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-network/README.md +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking/Cargo.toml +1 -1
- smbcloud_cli-0.4.0/crates/smbcloud-networking/README.md +15 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/Cargo.toml +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/README.md +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-utils/Cargo.toml +1 -1
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-utils/README.md +1 -1
- smbcloud_cli-0.3.39/crates/cli/src/account/cli.rs +0 -13
- smbcloud_cli-0.3.39/crates/smbcloud-networking/README.md +0 -15
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/account/login/mod.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/account/me/mod.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/account/mod.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/account/signup/mod.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/account/signup/process.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/cli/mod.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/config.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/git.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/known_hosts.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/process_deploy_rails.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/process_deploy_vite_spa.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/remote_messages.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/rsync_deploy.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/setup.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/setup_project.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/deploy/setup_select_project.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/lib.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/mail/cli.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/mail/current_project.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/mail/process.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/mail/render.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/mail.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/main.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/project/cli.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/project/crud_delete.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/project/crud_read.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/project/deployment.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/project/mod.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/project/process.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/token/clear_smb_token.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/token/get_smb_token.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/token/is_logged_in.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/token/mod.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/token/smb_token_file_path.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/ui/confirm_dialog.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/ui/deployment_detail_view.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/ui/deployment_table.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/ui/me_view.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/ui/mod.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/ui/project_detail_view.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/ui/project_table.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/cli/src/ui/theme.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/.gitignore +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/apple.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/check_email.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/client_credentials.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/lib.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/logout.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/me.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/oauth/get_account_status.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/oauth/get_consent_url.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/oauth/get_profile.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/oauth/get_token.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/oauth/mod.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/oauth/provider.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/oidc.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/remove.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/resend_email_verification.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/reset_password.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-auth/src/signup.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-mail/src/mail_app.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-mail/src/mail_inbox.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-mail/src/mail_message.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-mail/src/request.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-mail/src/smbcloud_mail.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-mail/src/url_builder.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/app_auth.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/forgot.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/frontend_app.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/lib.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/login.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/mail.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/oauth.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/project.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/repository.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/reset_password_response.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-model/src/signup.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-network/src/environment.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-network/src/lib.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-network/src/network.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking/src/constants.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking/src/lib.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking/src/smb_client.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/src/crud_frontend_app_read.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/src/crud_project_create.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/src/crud_project_delete.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/src/crud_project_deployment_create.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/src/crud_project_deployment_read.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/src/crud_project_deployment_update.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/src/crud_project_read.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/src/crud_project_update.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/src/lib.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-networking-project/src/url_builder.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-utils/src/config.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-utils/src/lib.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/crates/smbcloud-utils/src/write_config.rs +0 -0
- {smbcloud_cli-0.3.39 → smbcloud_cli-0.4.0}/pyproject.toml +0 -0
|
@@ -2220,10 +2220,6 @@ version = "1.0.23"
|
|
|
2220
2220
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2221
2221
|
checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
|
|
2222
2222
|
|
|
2223
|
-
[[package]]
|
|
2224
|
-
name = "s6n"
|
|
2225
|
-
version = "0.3.39"
|
|
2226
|
-
|
|
2227
2223
|
[[package]]
|
|
2228
2224
|
name = "same-file"
|
|
2229
2225
|
version = "1.0.6"
|
|
@@ -2463,7 +2459,7 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|
|
2463
2459
|
|
|
2464
2460
|
[[package]]
|
|
2465
2461
|
name = "smbcloud-auth"
|
|
2466
|
-
version = "0.
|
|
2462
|
+
version = "0.4.0"
|
|
2467
2463
|
dependencies = [
|
|
2468
2464
|
"log",
|
|
2469
2465
|
"reqwest",
|
|
@@ -2478,7 +2474,7 @@ dependencies = [
|
|
|
2478
2474
|
|
|
2479
2475
|
[[package]]
|
|
2480
2476
|
name = "smbcloud-auth-sdk"
|
|
2481
|
-
version = "0.
|
|
2477
|
+
version = "0.4.0"
|
|
2482
2478
|
dependencies = [
|
|
2483
2479
|
"base64",
|
|
2484
2480
|
"reqwest",
|
|
@@ -2493,7 +2489,7 @@ dependencies = [
|
|
|
2493
2489
|
|
|
2494
2490
|
[[package]]
|
|
2495
2491
|
name = "smbcloud-auth-sdk-py"
|
|
2496
|
-
version = "0.
|
|
2492
|
+
version = "0.4.0"
|
|
2497
2493
|
dependencies = [
|
|
2498
2494
|
"pyo3",
|
|
2499
2495
|
"pythonize",
|
|
@@ -2507,7 +2503,7 @@ dependencies = [
|
|
|
2507
2503
|
|
|
2508
2504
|
[[package]]
|
|
2509
2505
|
name = "smbcloud-auth-sdk-wasm"
|
|
2510
|
-
version = "0.
|
|
2506
|
+
version = "0.4.0"
|
|
2511
2507
|
dependencies = [
|
|
2512
2508
|
"serde-wasm-bindgen",
|
|
2513
2509
|
"smbcloud-auth-sdk",
|
|
@@ -2520,7 +2516,7 @@ dependencies = [
|
|
|
2520
2516
|
|
|
2521
2517
|
[[package]]
|
|
2522
2518
|
name = "smbcloud-cli"
|
|
2523
|
-
version = "0.
|
|
2519
|
+
version = "0.4.0"
|
|
2524
2520
|
dependencies = [
|
|
2525
2521
|
"anyhow",
|
|
2526
2522
|
"chrono",
|
|
@@ -2563,7 +2559,7 @@ dependencies = [
|
|
|
2563
2559
|
|
|
2564
2560
|
[[package]]
|
|
2565
2561
|
name = "smbcloud-gresiq"
|
|
2566
|
-
version = "0.
|
|
2562
|
+
version = "0.4.0"
|
|
2567
2563
|
dependencies = [
|
|
2568
2564
|
"native-tls",
|
|
2569
2565
|
"postgres-native-tls",
|
|
@@ -2577,7 +2573,7 @@ dependencies = [
|
|
|
2577
2573
|
|
|
2578
2574
|
[[package]]
|
|
2579
2575
|
name = "smbcloud-gresiq-sdk"
|
|
2580
|
-
version = "0.
|
|
2576
|
+
version = "0.4.0"
|
|
2581
2577
|
dependencies = [
|
|
2582
2578
|
"anyhow",
|
|
2583
2579
|
"log",
|
|
@@ -2591,7 +2587,7 @@ dependencies = [
|
|
|
2591
2587
|
|
|
2592
2588
|
[[package]]
|
|
2593
2589
|
name = "smbcloud-mail"
|
|
2594
|
-
version = "0.
|
|
2590
|
+
version = "0.4.0"
|
|
2595
2591
|
dependencies = [
|
|
2596
2592
|
"reqwest",
|
|
2597
2593
|
"serde",
|
|
@@ -2603,7 +2599,7 @@ dependencies = [
|
|
|
2603
2599
|
|
|
2604
2600
|
[[package]]
|
|
2605
2601
|
name = "smbcloud-model"
|
|
2606
|
-
version = "0.
|
|
2602
|
+
version = "0.4.0"
|
|
2607
2603
|
dependencies = [
|
|
2608
2604
|
"chrono",
|
|
2609
2605
|
"log",
|
|
@@ -2619,7 +2615,7 @@ dependencies = [
|
|
|
2619
2615
|
|
|
2620
2616
|
[[package]]
|
|
2621
2617
|
name = "smbcloud-network"
|
|
2622
|
-
version = "0.
|
|
2618
|
+
version = "0.4.0"
|
|
2623
2619
|
dependencies = [
|
|
2624
2620
|
"clap 4.6.1",
|
|
2625
2621
|
"log",
|
|
@@ -2632,7 +2628,7 @@ dependencies = [
|
|
|
2632
2628
|
|
|
2633
2629
|
[[package]]
|
|
2634
2630
|
name = "smbcloud-networking"
|
|
2635
|
-
version = "0.
|
|
2631
|
+
version = "0.4.0"
|
|
2636
2632
|
dependencies = [
|
|
2637
2633
|
"smbcloud-network",
|
|
2638
2634
|
"url-builder",
|
|
@@ -2640,7 +2636,7 @@ dependencies = [
|
|
|
2640
2636
|
|
|
2641
2637
|
[[package]]
|
|
2642
2638
|
name = "smbcloud-networking-project"
|
|
2643
|
-
version = "0.
|
|
2639
|
+
version = "0.4.0"
|
|
2644
2640
|
dependencies = [
|
|
2645
2641
|
"anyhow",
|
|
2646
2642
|
"async-trait",
|
|
@@ -2656,9 +2652,13 @@ dependencies = [
|
|
|
2656
2652
|
"thiserror 2.0.18",
|
|
2657
2653
|
]
|
|
2658
2654
|
|
|
2655
|
+
[[package]]
|
|
2656
|
+
name = "smbcloud-s6n"
|
|
2657
|
+
version = "0.4.0"
|
|
2658
|
+
|
|
2659
2659
|
[[package]]
|
|
2660
2660
|
name = "smbcloud-utils"
|
|
2661
|
-
version = "0.
|
|
2661
|
+
version = "0.4.0"
|
|
2662
2662
|
dependencies = [
|
|
2663
2663
|
"anyhow",
|
|
2664
2664
|
"dirs",
|
|
@@ -26,15 +26,15 @@ reqwest = { version = "0.12.18", default-features = false }
|
|
|
26
26
|
serde = "1"
|
|
27
27
|
serde_json = "1.0.82"
|
|
28
28
|
serde_repr = "0.1"
|
|
29
|
-
smbcloud-auth = { version = "0.
|
|
30
|
-
smbcloud-auth-sdk = { version = "0.
|
|
31
|
-
smbcloud-gresiq-sdk = { version = "0.
|
|
32
|
-
smbcloud-mail = { version = "0.
|
|
33
|
-
smbcloud-model = { version = "0.
|
|
34
|
-
smbcloud-network = { version = "0.
|
|
35
|
-
smbcloud-networking = { version = "0.
|
|
36
|
-
smbcloud-networking-project = { version = "0.
|
|
37
|
-
smbcloud-utils = { version = "0.
|
|
29
|
+
smbcloud-auth = { version = "0.4.0", path = "crates/smbcloud-auth" }
|
|
30
|
+
smbcloud-auth-sdk = { version = "0.4.0", path = "crates/smbcloud-auth-sdk" }
|
|
31
|
+
smbcloud-gresiq-sdk = { version = "0.4.0", path = "crates/smbcloud-gresiq-sdk" }
|
|
32
|
+
smbcloud-mail = { version = "0.4.0", path = "crates/smbcloud-mail" }
|
|
33
|
+
smbcloud-model = { version = "0.4.0", path = "crates/smbcloud-model" }
|
|
34
|
+
smbcloud-network = { version = "0.4.0", path = "crates/smbcloud-network" }
|
|
35
|
+
smbcloud-networking = { version = "0.4.0", path = "crates/smbcloud-networking" }
|
|
36
|
+
smbcloud-networking-project = { version = "0.4.0", path = "crates/smbcloud-networking-project" }
|
|
37
|
+
smbcloud-utils = { version = "0.4.0", path = "crates/smbcloud-utils" }
|
|
38
38
|
spinners = "4.1.0"
|
|
39
39
|
strum = "0.27"
|
|
40
40
|
strum_macros = "0.27"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: smbcloud-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Environment :: Console
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -31,7 +31,7 @@ Project-URL: Repository, https://github.com/smbcloudXYZ/smbcloud-cli
|
|
|
31
31
|
<br>smbCloud CLI
|
|
32
32
|
</h1>
|
|
33
33
|
<p align="center">
|
|
34
|
-
Deploy
|
|
34
|
+
Deploy with smbCloud from your terminal.
|
|
35
35
|
<br />
|
|
36
36
|
<br />
|
|
37
37
|
<a href="https://smbcloud.xyz/">Website</a>
|
|
@@ -54,9 +54,9 @@ Project-URL: Repository, https://github.com/smbcloudXYZ/smbcloud-cli
|
|
|
54
54
|
|
|
55
55
|
## About
|
|
56
56
|
|
|
57
|
-
**`smb`** is the command-line interface for [smbCloud](https://smbcloud.xyz/)
|
|
57
|
+
**`smb`** is the command-line interface for [smbCloud](https://smbcloud.xyz/).
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
Install it with `pip`, then run the native `smb` binary for your platform.
|
|
60
60
|
|
|
61
61
|
## Install
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ Ship your Rust, Node.js, Ruby, or Swift app with a single, magical command.
|
|
|
64
64
|
pip install smbcloud-cli
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
This package installs the native `smb` executable for your platform
|
|
67
|
+
This package installs the native `smb` executable for your platform. You do not need Node.js or Docker.
|
|
68
68
|
|
|
69
69
|
## Quick Start
|
|
70
70
|
|
|
@@ -74,7 +74,7 @@ smb init
|
|
|
74
74
|
smb deploy
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
That
|
|
77
|
+
That gets you from login to first deploy.
|
|
78
78
|
|
|
79
79
|
## Other Installation Methods
|
|
80
80
|
|
|
@@ -127,11 +127,11 @@ This package ships pre-built native binaries for:
|
|
|
127
127
|
|
|
128
128
|
## Source & Issues
|
|
129
129
|
|
|
130
|
-
This
|
|
130
|
+
This package ships the native `smb` binary through PyPI.
|
|
131
|
+
Source code and issue tracker:
|
|
131
132
|
[github.com/smbcloudXYZ/smbcloud-cli](https://github.com/smbcloudXYZ/smbcloud-cli).
|
|
132
|
-
Please report bugs and feature requests there.
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
See the [smbCloud documentation](https://smbcloud.xyz/posts) for setup and deployment guides.
|
|
135
135
|
|
|
136
136
|
## License
|
|
137
137
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<br>smbCloud CLI
|
|
6
6
|
</h1>
|
|
7
7
|
<p align="center">
|
|
8
|
-
Deploy
|
|
8
|
+
Deploy with smbCloud from your terminal.
|
|
9
9
|
<br />
|
|
10
10
|
<br />
|
|
11
11
|
<a href="https://smbcloud.xyz/">Website</a>
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
|
|
29
29
|
## About
|
|
30
30
|
|
|
31
|
-
**`smb`** is the command-line interface for [smbCloud](https://smbcloud.xyz/)
|
|
31
|
+
**`smb`** is the command-line interface for [smbCloud](https://smbcloud.xyz/).
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Install it with `pip`, then run the native `smb` binary for your platform.
|
|
34
34
|
|
|
35
35
|
## Install
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ Ship your Rust, Node.js, Ruby, or Swift app with a single, magical command.
|
|
|
38
38
|
pip install smbcloud-cli
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
This package installs the native `smb` executable for your platform
|
|
41
|
+
This package installs the native `smb` executable for your platform. You do not need Node.js or Docker.
|
|
42
42
|
|
|
43
43
|
## Quick Start
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ smb init
|
|
|
48
48
|
smb deploy
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
That
|
|
51
|
+
That gets you from login to first deploy.
|
|
52
52
|
|
|
53
53
|
## Other Installation Methods
|
|
54
54
|
|
|
@@ -101,11 +101,11 @@ This package ships pre-built native binaries for:
|
|
|
101
101
|
|
|
102
102
|
## Source & Issues
|
|
103
103
|
|
|
104
|
-
This
|
|
104
|
+
This package ships the native `smb` binary through PyPI.
|
|
105
|
+
Source code and issue tracker:
|
|
105
106
|
[github.com/smbcloudXYZ/smbcloud-cli](https://github.com/smbcloudXYZ/smbcloud-cli).
|
|
106
|
-
Please report bugs and feature requests there.
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
See the [smbCloud documentation](https://smbcloud.xyz/posts) for setup and deployment guides.
|
|
109
109
|
|
|
110
110
|
## License
|
|
111
111
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<br>smbCloud CLI
|
|
6
6
|
</h1>
|
|
7
7
|
<p align="center">
|
|
8
|
-
Deploy
|
|
8
|
+
Deploy with smbCloud from your terminal.
|
|
9
9
|
<br />
|
|
10
10
|
<br />
|
|
11
11
|
<a href="https://smbcloud.xyz/">Website</a>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
## Installation
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
You can install the CLI a few different ways.
|
|
26
26
|
|
|
27
27
|
### With Cargo
|
|
28
28
|
|
|
@@ -51,7 +51,7 @@ pip install smbcloud-cli
|
|
|
51
51
|
|
|
52
52
|
## Update
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
To update the CLI, run the same install command again.
|
|
55
55
|
|
|
56
56
|
## Uninstall
|
|
57
57
|
|
|
@@ -76,20 +76,22 @@ pip uninstall smbcloud-cli
|
|
|
76
76
|
smb --help
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
##
|
|
79
|
+
## Contributing
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
To work on the CLI locally:
|
|
82
|
+
|
|
83
|
+
- Set up your Rust tooling.
|
|
82
84
|
- Clone the repo.
|
|
83
|
-
-
|
|
85
|
+
- Add the required environment variables to `.env.local`.
|
|
84
86
|
- Run `cargo run`.
|
|
85
87
|
|
|
86
88
|
## Credits
|
|
87
89
|
|
|
88
|
-
This repo
|
|
90
|
+
This repo draws inspiration from [Sugar](https://github.com/metaplex-foundation/sugar).
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
It also borrows ideas from [the 12 factor CLI app](https://medium.com/@jdxcode/12-factor-cli-apps-dd3c227a0e46).
|
|
91
93
|
|
|
92
|
-
|
|
94
|
+
More CLI and deployment guides live in the [smbCloud docs](https://smbcloud.xyz/posts).
|
|
93
95
|
|
|
94
96
|
## License
|
|
95
97
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
use clap::Subcommand;
|
|
2
|
+
|
|
3
|
+
#[derive(Subcommand)]
|
|
4
|
+
pub enum Commands {
|
|
5
|
+
#[clap(about = "Create an account with your email address.")]
|
|
6
|
+
Signup {},
|
|
7
|
+
#[clap(about = "Log in to your account. If you need one first, run `smb signup`.")]
|
|
8
|
+
Login {},
|
|
9
|
+
#[clap(about = "Log out of your current session.")]
|
|
10
|
+
Logout {},
|
|
11
|
+
#[clap(about = "Start the password reset flow.")]
|
|
12
|
+
Forgot {},
|
|
13
|
+
}
|
|
@@ -13,7 +13,7 @@ use smbcloud_utils::email_validation;
|
|
|
13
13
|
use spinners::Spinner;
|
|
14
14
|
|
|
15
15
|
pub async fn process_forgot(env: Environment) -> Result<CommandResult> {
|
|
16
|
-
println!("
|
|
16
|
+
println!("Enter your email address.");
|
|
17
17
|
let email = Input::<String>::with_theme(&ColorfulTheme::default())
|
|
18
18
|
.with_prompt("Email")
|
|
19
19
|
.validate_with(|email: &String| email_validation(email))
|
|
@@ -25,9 +25,7 @@ use {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
pub async fn authorize_github(env: &Environment) -> Result<SmbAuthorization> {
|
|
28
|
-
//
|
|
29
|
-
// setup_oauth_callback_server();
|
|
30
|
-
// Open the GitHub OAuth URL in the user's browser
|
|
28
|
+
// Listen for the GitHub OAuth callback on localhost, then open the browser.
|
|
31
29
|
let mut spinner = Spinner::new(
|
|
32
30
|
spinners::Spinners::BouncingBall,
|
|
33
31
|
style("🚀 Getting your GitHub information...")
|
|
@@ -61,7 +59,6 @@ pub async fn authorize_github(env: &Environment) -> Result<SmbAuthorization> {
|
|
|
61
59
|
match rx.recv() {
|
|
62
60
|
Ok(code) => {
|
|
63
61
|
debug!("Got code from channel: {:#?}", &code);
|
|
64
|
-
//Err(anyhow!("Failed to get code from channel."))
|
|
65
62
|
process_connect_github(*env, code).await
|
|
66
63
|
}
|
|
67
64
|
Err(e) => {
|
|
@@ -144,7 +141,6 @@ fn handle_connection(mut stream: TcpStream, tx: Sender<String>) {
|
|
|
144
141
|
stream.flush().unwrap();
|
|
145
142
|
}
|
|
146
143
|
|
|
147
|
-
// Get access token
|
|
148
144
|
pub async fn process_connect_github(env: Environment, code: String) -> Result<SmbAuthorization> {
|
|
149
145
|
let response = Client::new()
|
|
150
146
|
.post(build_authorize_smb_url(env))
|
|
@@ -160,10 +156,8 @@ pub async fn process_connect_github(env: Environment, code: String) -> Result<Sm
|
|
|
160
156
|
.bold()
|
|
161
157
|
.to_string(),
|
|
162
158
|
);
|
|
163
|
-
// println!("Response: {:#?}", &response);
|
|
164
159
|
match response.status() {
|
|
165
160
|
StatusCode::OK => {
|
|
166
|
-
// Account authorized and token received
|
|
167
161
|
spinner.stop_and_persist("✅", "You are logged in with your GitHub account!".into());
|
|
168
162
|
save_token(env, &response).await?;
|
|
169
163
|
let result = response.json().await?;
|
|
@@ -171,21 +165,16 @@ pub async fn process_connect_github(env: Environment, code: String) -> Result<Sm
|
|
|
171
165
|
Ok(result)
|
|
172
166
|
}
|
|
173
167
|
StatusCode::NOT_FOUND => {
|
|
174
|
-
|
|
175
|
-
spinner.stop_and_persist("🥲", "Account not found. Please signup!".into());
|
|
168
|
+
spinner.stop_and_persist("🥲", "Account not found. Please sign up.".into());
|
|
176
169
|
let result = response.json().await?;
|
|
177
|
-
// println!("Result: {:#?}", &result);
|
|
178
170
|
Ok(result)
|
|
179
171
|
}
|
|
180
172
|
StatusCode::UNPROCESSABLE_ENTITY => {
|
|
181
|
-
|
|
182
|
-
spinner.stop_and_persist("🥹", "Unverified email!".into());
|
|
173
|
+
spinner.stop_and_persist("🥹", "Please verify your email address.".into());
|
|
183
174
|
let result = response.json().await?;
|
|
184
|
-
// println!("Result: {:#?}", &result);
|
|
185
175
|
Ok(result)
|
|
186
176
|
}
|
|
187
177
|
_ => {
|
|
188
|
-
// Other errors
|
|
189
178
|
let error = anyhow!("Error while authorizing with GitHub.");
|
|
190
179
|
Err(error)
|
|
191
180
|
}
|
|
@@ -222,13 +211,14 @@ fn github_base_url_builder() -> URLBuilder {
|
|
|
222
211
|
|
|
223
212
|
pub async fn save_token(env: Environment, response: &Response) -> Result<()> {
|
|
224
213
|
let headers = response.headers();
|
|
225
|
-
// println!("Headers: {:#?}", &headers);
|
|
226
214
|
match headers.get("Authorization") {
|
|
227
215
|
Some(token) => {
|
|
228
216
|
debug!("{}", token.to_str()?);
|
|
229
217
|
store_token(env, token.to_str()?.to_string()).await
|
|
230
218
|
}
|
|
231
|
-
None => Err(anyhow!(
|
|
219
|
+
None => Err(anyhow!(
|
|
220
|
+
"Failed to get the access token from the server response."
|
|
221
|
+
)),
|
|
232
222
|
}
|
|
233
223
|
}
|
|
234
224
|
|
|
@@ -23,8 +23,9 @@ use {
|
|
|
23
23
|
smbcloud_model::{
|
|
24
24
|
account::{
|
|
25
25
|
ErrorCode::{
|
|
26
|
-
self as AccountErrorCode,
|
|
27
|
-
|
|
26
|
+
self as AccountErrorCode, EmailAlreadyExist, EmailConfirmationFailed,
|
|
27
|
+
EmailNotFound, EmailUnverified, GithubNotLinked, HostedMailAccountUnverified,
|
|
28
|
+
InvalidPassword, PasswordNotSet,
|
|
28
29
|
},
|
|
29
30
|
GithubInfo, SmbAuthorization, User,
|
|
30
31
|
},
|
|
@@ -78,8 +79,6 @@ pub async fn process_login(env: Environment, is_logged_in: Option<bool>) -> Resu
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
// Private functions
|
|
82
|
-
|
|
83
82
|
async fn login_with_github(env: Environment) -> Result<CommandResult> {
|
|
84
83
|
match authorize_github(&env).await {
|
|
85
84
|
Ok(result) => process_authorization(env, result).await,
|
|
@@ -91,30 +90,33 @@ async fn login_with_github(env: Environment) -> Result<CommandResult> {
|
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
async fn process_authorization(env: Environment, auth: SmbAuthorization) -> Result<CommandResult> {
|
|
94
|
-
//
|
|
95
|
-
// Check error_code first
|
|
93
|
+
// Handle the account state returned by the OAuth flow before treating it as a login.
|
|
96
94
|
if let Some(error_code) = auth.error_code {
|
|
97
95
|
debug!("{}", error_code);
|
|
98
96
|
match error_code {
|
|
99
97
|
EmailNotFound => return create_new_account(env, auth.user_email, auth.user_info).await,
|
|
100
98
|
EmailUnverified => return send_email_verification(env, auth.user).await,
|
|
101
99
|
PasswordNotSet => {
|
|
102
|
-
// Only for email and password login
|
|
103
100
|
let error = anyhow!("Password not set.");
|
|
104
101
|
return Err(error);
|
|
105
102
|
}
|
|
106
103
|
GithubNotLinked => return connect_github_account(env, auth).await,
|
|
104
|
+
EmailConfirmationFailed
|
|
105
|
+
| EmailAlreadyExist
|
|
106
|
+
| InvalidPassword
|
|
107
|
+
| HostedMailAccountUnverified => {
|
|
108
|
+
let error = anyhow!(error_code.to_string());
|
|
109
|
+
return Err(error);
|
|
110
|
+
}
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
113
|
|
|
110
|
-
//
|
|
111
|
-
// Token handling is in the lib.rs account module.
|
|
114
|
+
// Token handling lives in the account module.
|
|
112
115
|
if let Some(user) = auth.user {
|
|
113
116
|
let spinner = Spinner::new(
|
|
114
117
|
spinners::Spinners::SimpleDotsScrolling,
|
|
115
118
|
style("Logging you in...").green().bold().to_string(),
|
|
116
119
|
);
|
|
117
|
-
// We're logged in with GitHub.
|
|
118
120
|
return Ok(CommandResult {
|
|
119
121
|
spinner,
|
|
120
122
|
symbol: "✅".to_owned(),
|
|
@@ -142,7 +144,6 @@ async fn create_new_account(
|
|
|
142
144
|
}
|
|
143
145
|
};
|
|
144
146
|
|
|
145
|
-
// Create account if user confirms
|
|
146
147
|
if !confirm {
|
|
147
148
|
let spinner = Spinner::new(
|
|
148
149
|
spinners::Spinners::SimpleDotsScrolling,
|
|
@@ -169,11 +170,10 @@ async fn create_new_account(
|
|
|
169
170
|
return do_signup(env, ¶ms).await;
|
|
170
171
|
}
|
|
171
172
|
|
|
172
|
-
Err(anyhow!("
|
|
173
|
+
Err(anyhow!("GitHub returned incomplete account details."))
|
|
173
174
|
}
|
|
174
175
|
|
|
175
176
|
async fn send_email_verification(env: Environment, user: Option<User>) -> Result<CommandResult> {
|
|
176
|
-
// Return early if user is null
|
|
177
177
|
if let Some(user) = user {
|
|
178
178
|
let confirm = match Confirm::with_theme(&ColorfulTheme::default())
|
|
179
179
|
.with_prompt("Do you want to send a new verification email?")
|
|
@@ -186,16 +186,15 @@ async fn send_email_verification(env: Environment, user: Option<User>) -> Result
|
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
-
// Send verification email if user confirms
|
|
190
189
|
if !confirm {
|
|
191
190
|
let spinner = Spinner::new(
|
|
192
191
|
spinners::Spinners::SimpleDotsScrolling,
|
|
193
|
-
style("
|
|
192
|
+
style("Cancelled.").green().bold().to_string(),
|
|
194
193
|
);
|
|
195
194
|
return Ok(CommandResult {
|
|
196
195
|
spinner,
|
|
197
196
|
symbol: succeed_symbol(),
|
|
198
|
-
msg: succeed_message("
|
|
197
|
+
msg: succeed_message("Cancelled."),
|
|
199
198
|
});
|
|
200
199
|
}
|
|
201
200
|
resend_email_verification(env, user).await
|
|
@@ -238,16 +237,15 @@ async fn connect_github_account(env: Environment, auth: SmbAuthorization) -> Res
|
|
|
238
237
|
}
|
|
239
238
|
};
|
|
240
239
|
|
|
241
|
-
// Link GitHub account if user confirms
|
|
242
240
|
if !confirm {
|
|
243
241
|
let spinner = Spinner::new(
|
|
244
242
|
spinners::Spinners::SimpleDotsScrolling,
|
|
245
|
-
succeed_message("
|
|
243
|
+
succeed_message("Cancelled."),
|
|
246
244
|
);
|
|
247
245
|
return Ok(CommandResult {
|
|
248
246
|
spinner,
|
|
249
247
|
symbol: succeed_symbol(),
|
|
250
|
-
msg: succeed_message("
|
|
248
|
+
msg: succeed_message("Cancelled."),
|
|
251
249
|
});
|
|
252
250
|
}
|
|
253
251
|
|
|
@@ -278,7 +276,7 @@ async fn connect_github_account(env: Environment, auth: SmbAuthorization) -> Res
|
|
|
278
276
|
}
|
|
279
277
|
|
|
280
278
|
async fn login_with_email(env: Environment) -> Result<CommandResult> {
|
|
281
|
-
println!("
|
|
279
|
+
println!("Enter your login details.");
|
|
282
280
|
let username = match Input::<String>::with_theme(&ColorfulTheme::default())
|
|
283
281
|
.with_prompt("Email")
|
|
284
282
|
.validate_with(|email: &String| email_validation(email))
|
|
@@ -293,9 +291,7 @@ async fn login_with_email(env: Environment) -> Result<CommandResult> {
|
|
|
293
291
|
|
|
294
292
|
match check_email(env, client(), &username).await {
|
|
295
293
|
Ok(auth) => {
|
|
296
|
-
// Only continue with password input if email is found and confirmed.
|
|
297
294
|
if auth.error_code.is_some() {
|
|
298
|
-
// Check if email is in the database, unconfirmed. Only presents password input if email is found and confirmed.
|
|
299
295
|
let spinner = Spinner::new(
|
|
300
296
|
spinners::Spinners::SimpleDotsScrolling,
|
|
301
297
|
succeed_message("Checking email"),
|
|
@@ -382,11 +378,11 @@ async fn after_checking_email_step(
|
|
|
382
378
|
}
|
|
383
379
|
_ => {
|
|
384
380
|
spinner.stop_and_persist(&fail_symbol(), fail_message("An error occurred."));
|
|
385
|
-
Err(anyhow!("
|
|
381
|
+
Err(anyhow!("The server returned an unexpected account state."))
|
|
386
382
|
}
|
|
387
383
|
}
|
|
388
384
|
}
|
|
389
|
-
None => Err(anyhow!("
|
|
385
|
+
None => Err(anyhow!("The server did not return an account state.")),
|
|
390
386
|
}
|
|
391
387
|
}
|
|
392
388
|
|
|
@@ -421,13 +417,12 @@ async fn action_on_account_status(
|
|
|
421
417
|
}
|
|
422
418
|
_ => {
|
|
423
419
|
spinner.stop_and_persist(&fail_symbol(), fail_message("An error occurred."));
|
|
424
|
-
Err(anyhow!("
|
|
420
|
+
Err(anyhow!("The server returned an unexpected account state."))
|
|
425
421
|
}
|
|
426
422
|
}
|
|
427
423
|
}
|
|
428
424
|
|
|
429
425
|
async fn send_reset_password(env: Environment, user: Option<User>) -> Result<CommandResult> {
|
|
430
|
-
// Return early if user is null
|
|
431
426
|
if let Some(user) = user {
|
|
432
427
|
let confirm = match Confirm::with_theme(&ColorfulTheme::default())
|
|
433
428
|
.with_prompt("Do you want to reset your password?")
|
|
@@ -440,16 +435,15 @@ async fn send_reset_password(env: Environment, user: Option<User>) -> Result<Com
|
|
|
440
435
|
}
|
|
441
436
|
};
|
|
442
437
|
|
|
443
|
-
// Send verification email if user confirms
|
|
444
438
|
if !confirm {
|
|
445
439
|
let spinner = Spinner::new(
|
|
446
440
|
spinners::Spinners::SimpleDotsScrolling,
|
|
447
|
-
style("
|
|
441
|
+
style("Cancelled.").green().bold().to_string(),
|
|
448
442
|
);
|
|
449
443
|
return Ok(CommandResult {
|
|
450
444
|
spinner,
|
|
451
445
|
symbol: succeed_symbol(),
|
|
452
|
-
msg: succeed_message("
|
|
446
|
+
msg: succeed_message("Cancelled."),
|
|
453
447
|
});
|
|
454
448
|
}
|
|
455
449
|
resend_reset_password_instruction(env, user).await
|
|
@@ -14,7 +14,6 @@ use {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
pub async fn process_logout(env: Environment) -> Result<CommandResult> {
|
|
17
|
-
// Logout if user confirms
|
|
18
17
|
if let Some(token_path) = smb_token_file_path(env) {
|
|
19
18
|
let confirm = match Confirm::with_theme(&ColorfulTheme::default())
|
|
20
19
|
.with_prompt("Do you want to logout? y/n")
|
|
@@ -30,10 +29,10 @@ pub async fn process_logout(env: Environment) -> Result<CommandResult> {
|
|
|
30
29
|
return Ok(CommandResult {
|
|
31
30
|
spinner: Spinner::new(
|
|
32
31
|
spinners::Spinners::SimpleDotsScrolling,
|
|
33
|
-
succeed_message("
|
|
32
|
+
succeed_message("Cancelled."),
|
|
34
33
|
),
|
|
35
34
|
symbol: succeed_symbol(),
|
|
36
|
-
msg: succeed_message("
|
|
35
|
+
msg: succeed_message("Cancelled."),
|
|
37
36
|
});
|
|
38
37
|
}
|
|
39
38
|
|
|
@@ -42,7 +41,6 @@ pub async fn process_logout(env: Environment) -> Result<CommandResult> {
|
|
|
42
41
|
succeed_message("Logging you out"),
|
|
43
42
|
);
|
|
44
43
|
|
|
45
|
-
// Call backend
|
|
46
44
|
match do_process_logout(env).await {
|
|
47
45
|
Ok(_) => {
|
|
48
46
|
fs::remove_file(token_path)?;
|