feat(cli)!: refactor --cloud option to accept URL strings #790
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Refactors the CLI
--cloudoption from boolean flags to a string-based URL parameter, removing exposure of internal environment URLs (--alpha,--staging) and providing more flexibility.Changes
Breaking Changes
--alphaflag - Use--cloud https://alpha.uipath.cominstead--stagingflag - Use--cloud https://staging.uipath.cominstead--cloudoption - Now accepts any URL string (defaults tohttps://cloud.uipath.com)Implementation
environment_optionsdecorator to use string-based--cloudoptionresolve_domain()to handle URL strings with proper validationAuthServiceto usecloud_urlparameter instead ofenvironmentbuild_tenant_url()andresolve_tenant_info()Usage Examples
Testing
✅ All tests pass (608 passed)
test_auth.pywith new URL-based scenariostest_portal_service_refresh_token.pyfor new parameter.envfile creationDocumentation
📚 Docs will auto-update when merged to
mainbecause:cli_auth.pydocstringmkdocs-clickauto-generates docs from source codepyproject.tomlchange triggers docs workflowMigration Guide
For users currently using:
Change to: