sanka-cli 0.3.0__tar.gz → 0.3.1__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.
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/PKG-INFO +4 -2
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/README.md +3 -1
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/pyproject.toml +1 -1
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/tui/app.py +67 -19
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/tui/services.py +18 -1
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/__init__.py +1 -1
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_cli.py +1 -1
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_mcp_retirement.py +1 -1
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_sanka_facade.py +1 -1
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_tui.py +111 -2
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/.gitignore +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/LICENSES/AGPL-3.0-only.txt +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/LICENSES/Apache-2.0.txt +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/NOTICE +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/_client.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/_compact.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/_output.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/_research.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/_summary.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/py.typed +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/tui/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/tui/cloud.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/tui/history.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/tui/launch.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/tui/model.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/cli/tui/widgets.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/connector/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/connector/py.typed +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/__about__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/concurrency.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/connector_client.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/connector_host.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/engine.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/execution/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/execution/continuous.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/execution/errors.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/execution/local.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/execution/model.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/execution/report_codec.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/execution/routes.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/execution/scope.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/execution/state.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/execution/validate.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/extensions/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/extensions/artifacts.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/extensions/code_lifecycle.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/extensions/code_repair.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/extensions/discovery.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/extensions/lifecycle.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/extensions/model.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/extensions/runner.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/extensions/stage.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/extensions/store.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/extension.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/host.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/lifecycle.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/merge.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/model.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/native_verification.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/planner.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/sqlite.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/state.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/verification.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/flow/verification_plan.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/hashing.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/mapping/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/mapping/errors.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/mapping/mapping_candidates.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/mapping/model.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/mapping/owner_mapping.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/mapping/pending_relationships.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/mapping/record_mapping.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/planner.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/private_sqlite.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/py.typed +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/registry.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/safe_local_io.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/spec.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka/runtime/state.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/__main__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/bundle.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/certificates.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/client.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/cloud_source.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/ai.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/auth.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/cloud.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/cloud_fleet.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/cloud_github.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/cloud_migrate.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/code.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/code_cloud.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/doctor.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/fix.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/functions.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/migrate.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/profiles.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/resources.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/skill.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/workflow_templates.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/commands/workflows.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/config.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/main.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/output.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/runtime.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/skills/sanka-cli/SKILL.md +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_cli/state.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_connector/__about__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_connector/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_connector/credentials.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_connector/errors.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_connector/protocols.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_connector/provisioning.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_connector/py.typed +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_connector/records.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_connector/registration.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_connector/schema.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extension_sdk/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extension_sdk/contract.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extension_sdk/py.typed +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/code/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/code/contract.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/data/__about__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/data/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/data/credentials.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/data/errors.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/data/protocols.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/data/provisioning.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/data/py.typed +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/data/records.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/data/registration.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/data/schema.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/_wire.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/blueprint.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/definition.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/graph.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/identity.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/native.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/native_fixtures.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/native_process_recipes.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/native_profiles.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/native_recipes.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/native_task_recipes.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/native_verification.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/protocol.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/scenario.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/flow/source.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/py.typed +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/systems/__about__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/systems/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/systems/credentials.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/systems/errors.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/systems/protocols.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/systems/provisioning.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/systems/py.typed +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/systems/records.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/systems/registration.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/src/sanka_extensions/systems/schema.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/conftest.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/extension_drf_project/api/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/extension_drf_project/api/serializers.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/extension_drf_project/api/views.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/extension_drf_project/config/__init__.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/extension_drf_project/config/settings.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/extension_drf_project/config/urls.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/extension_drf_project/manage.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/extension_marketplace/drf-to-fastapi.json +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/extension_marketplace/marketplace.json +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/flow/synthetic_native_order_billing_blueprint.json +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/flow/synthetic_sales_created_estimate_blueprint.json +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/fixtures/flow/synthetic_sales_quote_blueprint.json +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/flow_wheel_acceptance.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_application_summary.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_business_flow_extension_acceptance.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_cli_developer_experience.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_code_bundle.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_code_commands.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_code_lifecycle.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_code_repair.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_concurrency.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_connector_client.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_connector_host.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_credential_provider.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_doctor.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_engine_e2e.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_engine_execution_adoption.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_engine_pg_to_clickhouse_e2e.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_engine_postgres_e2e.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_execution_continuous.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_execution_exact_scope.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_execution_local_store.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_execution_report_codec.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_execution_routes.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_execution_scope.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_execution_seam.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_execution_validate.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_extension_discovery.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_extension_lifecycle.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_extension_runner.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_extension_stage.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_extension_store.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_extension_wheel_acceptance.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_flow_extension.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_flow_extension_wheel_acceptance.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_flow_lifecycle.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_flow_merge.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_flow_native_lifecycle.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_flow_native_verification.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_flow_planner.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_flow_sdk_codec.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_flow_sqlite.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_flow_verification.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_hashing.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_help_shortcuts.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_hosted_cli.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_mapping_candidates.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_mapping_owner_mapping.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_mapping_pending_relationships.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_mapping_record_mapping.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_plan_input_hints.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_planner.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_registry.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_safe_local_io.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_skill_commands.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_spec.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_state_store.py +0 -0
- {sanka_cli-0.3.0 → sanka_cli-0.3.1}/tests/test_workflow_templates_cli.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sanka-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Sanka command-line interface and migration runtime
|
|
5
5
|
Project-URL: Repository, https://github.com/sankaHQ/sanka
|
|
6
6
|
Project-URL: Issues, https://github.com/sankaHQ/sanka/issues
|
|
@@ -61,7 +61,9 @@ The macOS/Linux uv prerequisite is `curl -LsSf https://astral.sh/uv/install.sh |
|
|
|
61
61
|
follow its printed shell setup instructions. Advanced pip users should use a
|
|
62
62
|
Python 3.12+ virtual environment and `python -m pip install sanka-cli`.
|
|
63
63
|
Bare `pip` can select an older system interpreter and report “No matching distribution found.”
|
|
64
|
-
|
|
64
|
+
Sanka CLI 0.3.0 includes the interactive TUI. The installer pins the CLI version
|
|
65
|
+
of its release (`sh install.sh --version X.Y.Z` selects another). See
|
|
66
|
+
[installation and recovery](https://github.com/sankaHQ/sanka/blob/main/docs/install.md)
|
|
65
67
|
for Homebrew upgrades, PATH conflicts, and project environments.
|
|
66
68
|
|
|
67
69
|
For AI agents using MCP, connect to the hosted Sanka MCP server at
|
|
@@ -33,7 +33,9 @@ The macOS/Linux uv prerequisite is `curl -LsSf https://astral.sh/uv/install.sh |
|
|
|
33
33
|
follow its printed shell setup instructions. Advanced pip users should use a
|
|
34
34
|
Python 3.12+ virtual environment and `python -m pip install sanka-cli`.
|
|
35
35
|
Bare `pip` can select an older system interpreter and report “No matching distribution found.”
|
|
36
|
-
|
|
36
|
+
Sanka CLI 0.3.0 includes the interactive TUI. The installer pins the CLI version
|
|
37
|
+
of its release (`sh install.sh --version X.Y.Z` selects another). See
|
|
38
|
+
[installation and recovery](https://github.com/sankaHQ/sanka/blob/main/docs/install.md)
|
|
37
39
|
for Homebrew upgrades, PATH conflicts, and project environments.
|
|
38
40
|
|
|
39
41
|
For AI agents using MCP, connect to the hosted Sanka MCP server at
|
|
@@ -45,7 +45,7 @@ from sanka.cli.tui.model import (
|
|
|
45
45
|
format_elapsed,
|
|
46
46
|
parse_endpoints,
|
|
47
47
|
)
|
|
48
|
-
from sanka.cli.tui.services import TuiServices, cloud_exit_code
|
|
48
|
+
from sanka.cli.tui.services import TuiServices, cloud_exit_code, preferred_extension
|
|
49
49
|
from sanka.cli.tui.widgets import ActivityLog, CliLine, EmptyState, KeysBar, StageHeader
|
|
50
50
|
from sanka_cli import __version__
|
|
51
51
|
|
|
@@ -1520,7 +1520,7 @@ class ExtensionListScreen(SankaScreen):
|
|
|
1520
1520
|
choice.id,
|
|
1521
1521
|
f"{choice.label} {choice.kind} {', '.join(choice.targets) or '-'}",
|
|
1522
1522
|
)
|
|
1523
|
-
for choice in self.
|
|
1523
|
+
for choice in self._choices()
|
|
1524
1524
|
)
|
|
1525
1525
|
self.app.push_screen(SearchModal("Search extensions", options), self._picked)
|
|
1526
1526
|
|
|
@@ -1531,9 +1531,18 @@ class ExtensionListScreen(SankaScreen):
|
|
|
1531
1531
|
table.move_cursor(row=self._ids.index(extension_id))
|
|
1532
1532
|
table.focus()
|
|
1533
1533
|
|
|
1534
|
+
def _choices(self) -> tuple[ExtensionChoice, ...]:
|
|
1535
|
+
catalog = self.sanka.services.extensions("")
|
|
1536
|
+
return tuple(
|
|
1537
|
+
choice
|
|
1538
|
+
for extension_id in dict.fromkeys(item.id for item in catalog)
|
|
1539
|
+
if (choice := preferred_extension(catalog, extension_id)) is not None
|
|
1540
|
+
)
|
|
1541
|
+
|
|
1534
1542
|
def _fill(self) -> None:
|
|
1535
|
-
choices = self.
|
|
1543
|
+
choices = self._choices()
|
|
1536
1544
|
table = self.query_one(DataTable)
|
|
1545
|
+
selected = self._selected() if hasattr(self, "_ids") else None
|
|
1537
1546
|
table.clear()
|
|
1538
1547
|
self._ids = [choice.id for choice in choices]
|
|
1539
1548
|
for choice in choices:
|
|
@@ -1544,6 +1553,8 @@ class ExtensionListScreen(SankaScreen):
|
|
|
1544
1553
|
choice.status_label,
|
|
1545
1554
|
choice.version_label,
|
|
1546
1555
|
)
|
|
1556
|
+
if selected in self._ids:
|
|
1557
|
+
table.move_cursor(row=self._ids.index(selected))
|
|
1547
1558
|
|
|
1548
1559
|
def _selected(self) -> str | None:
|
|
1549
1560
|
table = self.query_one(DataTable)
|
|
@@ -1578,7 +1589,9 @@ class ExtensionListScreen(SankaScreen):
|
|
|
1578
1589
|
self.app.call_from_thread(self.notify, "That extension is incompatible with this CLI.")
|
|
1579
1590
|
return
|
|
1580
1591
|
try:
|
|
1581
|
-
message = self.sanka.services.install(
|
|
1592
|
+
message = self.sanka.services.install(
|
|
1593
|
+
extension_id, choice.marketplace if choice else None
|
|
1594
|
+
)
|
|
1582
1595
|
except Exception as error:
|
|
1583
1596
|
message = str(error)
|
|
1584
1597
|
self.app.call_from_thread(self._installed, message)
|
|
@@ -1591,6 +1604,10 @@ class ExtensionListScreen(SankaScreen):
|
|
|
1591
1604
|
self._fill()
|
|
1592
1605
|
self.query_one("#catalog-status", Static).update("")
|
|
1593
1606
|
|
|
1607
|
+
def on_screen_resume(self) -> None:
|
|
1608
|
+
super().on_screen_resume()
|
|
1609
|
+
self._fill()
|
|
1610
|
+
|
|
1594
1611
|
def _remove(self, extension_id: str) -> None:
|
|
1595
1612
|
self.run_worker(lambda: self._remove_work(extension_id), thread=True)
|
|
1596
1613
|
|
|
@@ -1624,6 +1641,13 @@ class ExtensionDetailScreen(SankaScreen):
|
|
|
1624
1641
|
self.refresh_footer()
|
|
1625
1642
|
self._show()
|
|
1626
1643
|
|
|
1644
|
+
def on_catalog_refreshed(self) -> None:
|
|
1645
|
+
self._show()
|
|
1646
|
+
|
|
1647
|
+
def on_screen_resume(self) -> None:
|
|
1648
|
+
super().on_screen_resume()
|
|
1649
|
+
self._show()
|
|
1650
|
+
|
|
1627
1651
|
def _choice(self) -> ExtensionChoice | None:
|
|
1628
1652
|
return self.sanka.services.extension(self.extension_id)
|
|
1629
1653
|
|
|
@@ -1631,6 +1655,8 @@ class ExtensionDetailScreen(SankaScreen):
|
|
|
1631
1655
|
choice = self._choice()
|
|
1632
1656
|
if choice is None:
|
|
1633
1657
|
self.query_one("#detail", Static).update(f"{self.extension_id} is not in the catalog.")
|
|
1658
|
+
for action in ("install", "update", "enable", "disable", "uninstall"):
|
|
1659
|
+
self.query_one(f"#{action}", Button).display = False
|
|
1634
1660
|
return
|
|
1635
1661
|
used = self.sanka.services.used_extension_id(self.sanka.session.target)
|
|
1636
1662
|
used_line = (
|
|
@@ -1663,9 +1689,11 @@ class ExtensionDetailScreen(SankaScreen):
|
|
|
1663
1689
|
)
|
|
1664
1690
|
installed = bool(choice.status.intersection({"installed", "locked", "update_available"}))
|
|
1665
1691
|
incompatible = "incompatible" in choice.status
|
|
1666
|
-
self.query_one("#install", Button).display =
|
|
1692
|
+
self.query_one("#install", Button).display = (
|
|
1693
|
+
not installed and "disabled" not in choice.status and not incompatible
|
|
1694
|
+
)
|
|
1667
1695
|
self.query_one("#update", Button).display = "update_available" in choice.status
|
|
1668
|
-
self.query_one("#enable", Button).display = "disabled" in choice.status
|
|
1696
|
+
self.query_one("#enable", Button).display = "disabled" in choice.status and not incompatible
|
|
1669
1697
|
self.query_one("#disable", Button).display = installed and not incompatible
|
|
1670
1698
|
self.query_one("#uninstall", Button).display = installed or "disabled" in choice.status
|
|
1671
1699
|
|
|
@@ -1683,20 +1711,39 @@ class ExtensionDetailScreen(SankaScreen):
|
|
|
1683
1711
|
if action == "disable":
|
|
1684
1712
|
self._run("disable")
|
|
1685
1713
|
return
|
|
1686
|
-
if action
|
|
1714
|
+
if action == "update":
|
|
1715
|
+
choice = self._choice()
|
|
1716
|
+
if choice is None or "update_available" not in choice.status:
|
|
1717
|
+
self.notify("No update is available in the current marketplace snapshot.")
|
|
1718
|
+
return
|
|
1719
|
+
self.app.push_screen(
|
|
1720
|
+
ConfirmScreen(
|
|
1721
|
+
f"Update {choice.id} to {choice.version} from {choice.marketplace}? "
|
|
1722
|
+
"This changes the project lock. Review a new plan before applying."
|
|
1723
|
+
),
|
|
1724
|
+
callback=lambda yes: self._run("update", choice) if yes else None,
|
|
1725
|
+
)
|
|
1726
|
+
return
|
|
1727
|
+
if action in {"install", "enable"}:
|
|
1687
1728
|
self._run("install")
|
|
1688
1729
|
|
|
1689
|
-
def _run(self, action: str) -> None:
|
|
1690
|
-
self.run_worker(lambda: self._work(action), thread=True)
|
|
1730
|
+
def _run(self, action: str, choice: ExtensionChoice | None = None) -> None:
|
|
1731
|
+
self.run_worker(lambda: self._work(action, choice), thread=True)
|
|
1691
1732
|
|
|
1692
|
-
def _work(self, action: str) -> None:
|
|
1733
|
+
def _work(self, action: str, choice: ExtensionChoice | None = None) -> None:
|
|
1693
1734
|
try:
|
|
1735
|
+
if action == "update" and self._choice() != choice:
|
|
1736
|
+
raise ValueError("The available extension changed. Review the update again.")
|
|
1694
1737
|
if action == "remove":
|
|
1695
1738
|
message = self.sanka.services.remove(self.extension_id)
|
|
1696
1739
|
elif action == "disable":
|
|
1697
1740
|
message = self.sanka.services.disable(self.extension_id)
|
|
1698
1741
|
else:
|
|
1699
|
-
|
|
1742
|
+
choice = choice or self._choice()
|
|
1743
|
+
message = self.sanka.services.install(
|
|
1744
|
+
self.extension_id,
|
|
1745
|
+
choice.marketplace if choice else None,
|
|
1746
|
+
)
|
|
1700
1747
|
except Exception as error:
|
|
1701
1748
|
message = str(error)
|
|
1702
1749
|
self.app.call_from_thread(self._done, message)
|
|
@@ -1736,7 +1783,7 @@ class MarketplaceScreen(SankaScreen):
|
|
|
1736
1783
|
self.refresh_footer()
|
|
1737
1784
|
catalog = self.query_one("#catalog", DataTable)
|
|
1738
1785
|
catalog.cursor_type = "row"
|
|
1739
|
-
catalog.add_columns("Name", "Type", "Targets", "Status", "Version")
|
|
1786
|
+
catalog.add_columns("Name", "Marketplace", "Type", "Targets", "Status", "Version")
|
|
1740
1787
|
snapshots = self.query_one("#snapshots", DataTable)
|
|
1741
1788
|
snapshots.cursor_type = "row"
|
|
1742
1789
|
snapshots.add_columns("Name", "Identity", "Revision", "Trusted")
|
|
@@ -1766,12 +1813,14 @@ class MarketplaceScreen(SankaScreen):
|
|
|
1766
1813
|
|
|
1767
1814
|
def _fill(self) -> None:
|
|
1768
1815
|
choices = self.sanka.services.extensions("")
|
|
1816
|
+
self._choices = choices
|
|
1769
1817
|
table = self.query_one("#catalog", DataTable)
|
|
1770
1818
|
table.clear()
|
|
1771
1819
|
self._ids = [choice.id for choice in choices]
|
|
1772
1820
|
for choice in choices:
|
|
1773
1821
|
table.add_row(
|
|
1774
1822
|
choice.label,
|
|
1823
|
+
choice.marketplace,
|
|
1775
1824
|
choice.kind,
|
|
1776
1825
|
", ".join(choice.targets) or "-",
|
|
1777
1826
|
choice.status_label,
|
|
@@ -1810,9 +1859,10 @@ class MarketplaceScreen(SankaScreen):
|
|
|
1810
1859
|
self.app.push_screen(ExtensionDetailScreen(extension_id))
|
|
1811
1860
|
return
|
|
1812
1861
|
if event.button.id == "install":
|
|
1813
|
-
|
|
1814
|
-
if
|
|
1815
|
-
|
|
1862
|
+
row = self.query_one("#catalog", DataTable).cursor_row
|
|
1863
|
+
if row is not None and 0 <= row < len(self._choices):
|
|
1864
|
+
choice = self._choices[row]
|
|
1865
|
+
self.run_worker(lambda: self._install(choice), thread=True)
|
|
1816
1866
|
return
|
|
1817
1867
|
if event.button.id == "add-snapshot":
|
|
1818
1868
|
source = self.query_one("#source", Input).value.strip()
|
|
@@ -1836,11 +1886,9 @@ class MarketplaceScreen(SankaScreen):
|
|
|
1836
1886
|
callback=lambda yes: self._drop_snapshot(name) if yes else None,
|
|
1837
1887
|
)
|
|
1838
1888
|
|
|
1839
|
-
def _install(self,
|
|
1840
|
-
choice = self.sanka.services.extension(extension_id)
|
|
1841
|
-
marketplace = choice.marketplace_identity if choice else None
|
|
1889
|
+
def _install(self, choice: ExtensionChoice) -> None:
|
|
1842
1890
|
try:
|
|
1843
|
-
message = self.sanka.services.install(
|
|
1891
|
+
message = self.sanka.services.install(choice.id, choice.marketplace)
|
|
1844
1892
|
except Exception as error:
|
|
1845
1893
|
message = str(error)
|
|
1846
1894
|
self.app.call_from_thread(self._done, message)
|
|
@@ -9,6 +9,8 @@ from datetime import UTC, datetime
|
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from typing import Any, Protocol
|
|
11
11
|
|
|
12
|
+
from packaging.version import Version
|
|
13
|
+
|
|
12
14
|
from sanka.cli.tui.history import append_history, load_history
|
|
13
15
|
from sanka.cli.tui.model import (
|
|
14
16
|
EndpointChoice,
|
|
@@ -127,6 +129,18 @@ def _choice_from_record(
|
|
|
127
129
|
)
|
|
128
130
|
|
|
129
131
|
|
|
132
|
+
def preferred_extension(
|
|
133
|
+
choices: tuple[ExtensionChoice, ...], extension_id: str
|
|
134
|
+
) -> ExtensionChoice | None:
|
|
135
|
+
matching = [item for item in choices if item.id == extension_id]
|
|
136
|
+
active = [item for item in matching if item.status.intersection({"locked", "update_available"})]
|
|
137
|
+
return max(
|
|
138
|
+
active or matching,
|
|
139
|
+
key=lambda item: (Version(item.version), "update_available" in item.status),
|
|
140
|
+
default=None,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
|
|
130
144
|
def read_plan_hash(root: Path, artifact_dir: str) -> str | None:
|
|
131
145
|
path = root / artifact_dir / "plan.json"
|
|
132
146
|
try:
|
|
@@ -235,7 +249,7 @@ class HostServices:
|
|
|
235
249
|
return tuple(choices)
|
|
236
250
|
|
|
237
251
|
def extension(self, extension_id: str) -> ExtensionChoice | None:
|
|
238
|
-
return
|
|
252
|
+
return preferred_extension(self.extensions(), extension_id)
|
|
239
253
|
|
|
240
254
|
def marketplaces(self) -> tuple[MarketplaceView, ...]:
|
|
241
255
|
store = self._store()
|
|
@@ -305,6 +319,9 @@ class HostServices:
|
|
|
305
319
|
return parse_endpoints(payload)
|
|
306
320
|
|
|
307
321
|
def install(self, extension_id: str, marketplace: str | None = None) -> str:
|
|
322
|
+
if marketplace is None:
|
|
323
|
+
choice = self.extension(extension_id)
|
|
324
|
+
marketplace = choice.marketplace if choice else None
|
|
308
325
|
store = self._store()
|
|
309
326
|
try:
|
|
310
327
|
entry = store.add_extension(extension_id, marketplace=marketplace)
|
|
@@ -609,7 +609,7 @@ def test_api_client_uses_public_branded_base_and_unwraps_data() -> None:
|
|
|
609
609
|
assert request.get_method() == "POST"
|
|
610
610
|
assert isinstance(request.data, bytes)
|
|
611
611
|
assert json.loads(request.data) == {"source": "SAP ECC", "lang": "ja"}
|
|
612
|
-
assert request.get_header("User-agent") == "sanka-cli/0.3.
|
|
612
|
+
assert request.get_header("User-agent") == "sanka-cli/0.3.1"
|
|
613
613
|
assert request.get_header("Content-type") == "application/json"
|
|
614
614
|
assert timeout == 10.0
|
|
615
615
|
|
|
@@ -8,11 +8,12 @@ from typing import Any
|
|
|
8
8
|
|
|
9
9
|
import pytest
|
|
10
10
|
from click.testing import CliRunner
|
|
11
|
-
from textual.widgets import DataTable, Input, OptionList, Select, Static, TextArea
|
|
11
|
+
from textual.widgets import Button, DataTable, Input, OptionList, Select, Static, TextArea
|
|
12
12
|
|
|
13
13
|
from sanka.cli import main
|
|
14
14
|
from sanka.cli.tui.app import (
|
|
15
15
|
CloudMonitorScreen,
|
|
16
|
+
ExtensionDetailScreen,
|
|
16
17
|
SankaApp,
|
|
17
18
|
StageScreen,
|
|
18
19
|
StatusScreen,
|
|
@@ -31,6 +32,7 @@ from sanka.cli.tui.model import (
|
|
|
31
32
|
StageRun,
|
|
32
33
|
parse_endpoints,
|
|
33
34
|
)
|
|
35
|
+
from sanka.cli.tui.services import HostServices, preferred_extension
|
|
34
36
|
from sanka.cli.tui.widgets import CliLine, KeysBar
|
|
35
37
|
from sanka.runtime.extensions.model import ExtensionError
|
|
36
38
|
from sanka.runtime.extensions.store import ExtensionStore
|
|
@@ -64,6 +66,7 @@ class FakeServices:
|
|
|
64
66
|
def __init__(self) -> None:
|
|
65
67
|
self.calls: list[dict[str, Any]] = []
|
|
66
68
|
self.installed: list[str] = []
|
|
69
|
+
self.installed_marketplaces: list[str | None] = []
|
|
67
70
|
self.disabled: list[str] = []
|
|
68
71
|
self.catalog: tuple[ExtensionChoice, ...] = (
|
|
69
72
|
_choice("sanka/drf-to-fastapi", "1.2.0", installed=True, targets=("fastapi",)),
|
|
@@ -147,7 +150,7 @@ class FakeServices:
|
|
|
147
150
|
return tuple(rows)
|
|
148
151
|
|
|
149
152
|
def extension(self, extension_id: str) -> ExtensionChoice | None:
|
|
150
|
-
return
|
|
153
|
+
return preferred_extension(self.catalog, extension_id)
|
|
151
154
|
|
|
152
155
|
def marketplaces(self) -> tuple[MarketplaceView, ...]:
|
|
153
156
|
return (
|
|
@@ -174,6 +177,7 @@ class FakeServices:
|
|
|
174
177
|
|
|
175
178
|
def install(self, extension_id: str, marketplace: str | None = None) -> str:
|
|
176
179
|
self.installed.append(extension_id)
|
|
180
|
+
self.installed_marketplaces.append(marketplace)
|
|
177
181
|
self.catalog = tuple(
|
|
178
182
|
replace(choice, status=frozenset({"available", "installed", "locked"}))
|
|
179
183
|
if choice.id == extension_id
|
|
@@ -661,6 +665,111 @@ async def test_extension_marketplace_lists_installs_and_filters() -> None:
|
|
|
661
665
|
assert menu.get_option_at_index(highlighted).id == "marketplace"
|
|
662
666
|
|
|
663
667
|
|
|
668
|
+
def test_extension_detail_prefers_newer_update_over_old_lock(tmp_path: Path) -> None:
|
|
669
|
+
services = HostServices(tmp_path)
|
|
670
|
+
locked = _choice("sanka/drf-to-fastapi", "0.1.0a17", installed=True, targets=("fastapi",))
|
|
671
|
+
update = replace(
|
|
672
|
+
locked, version="0.1.0a18", status=frozenset({"available", "update_available"})
|
|
673
|
+
)
|
|
674
|
+
services.extensions = lambda query="", **filters: (locked, update) # type: ignore[method-assign]
|
|
675
|
+
assert services.extension(locked.id) == update
|
|
676
|
+
services.extensions = lambda query="", **filters: (update, locked) # type: ignore[method-assign]
|
|
677
|
+
assert services.extension(locked.id) == update
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
def test_host_install_resolves_duplicate_marketplace_before_store_selection(tmp_path: Path) -> None:
|
|
681
|
+
services = HostServices(tmp_path)
|
|
682
|
+
choice = replace(
|
|
683
|
+
_choice("sanka/drf-to-fastapi", "0.1.0a18", installed=False, targets=("fastapi",)),
|
|
684
|
+
marketplace="fastapi-0-1-0a18",
|
|
685
|
+
)
|
|
686
|
+
services.extension = lambda _extension_id: choice # type: ignore[assignment]
|
|
687
|
+
|
|
688
|
+
class Store:
|
|
689
|
+
def add_extension(self, extension_id: str, *, marketplace: str | None) -> Any:
|
|
690
|
+
assert (extension_id, marketplace) == (choice.id, choice.marketplace)
|
|
691
|
+
return choice
|
|
692
|
+
|
|
693
|
+
def close(self) -> None:
|
|
694
|
+
pass
|
|
695
|
+
|
|
696
|
+
services._store = Store # type: ignore[method-assign]
|
|
697
|
+
assert services.install(choice.id) == f"Installed {choice.id} {choice.version}"
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
@pytest.mark.asyncio
|
|
701
|
+
async def test_disabled_extension_enables_from_its_selected_marketplace() -> None:
|
|
702
|
+
services = FakeServices()
|
|
703
|
+
custom = replace(
|
|
704
|
+
_choice("sanka/drf-to-fastapi", "0.1.0a18", installed=False, targets=("fastapi",)),
|
|
705
|
+
marketplace="fastapi-0-1-0a18",
|
|
706
|
+
status=frozenset({"available", "disabled"}),
|
|
707
|
+
)
|
|
708
|
+
services.catalog = (custom, replace(custom, marketplace="official"))
|
|
709
|
+
app = SankaApp(services, Session(project_root="/work/demo"), start="extensions")
|
|
710
|
+
async with app.run_test(size=(120, 40)) as pilot:
|
|
711
|
+
await pilot.click("#details")
|
|
712
|
+
await pilot.pause()
|
|
713
|
+
assert not app.screen.query_one("#install", Button).display
|
|
714
|
+
assert app.screen.query_one("#enable", Button).display
|
|
715
|
+
await pilot.click("#enable")
|
|
716
|
+
await app.workers.wait_for_complete()
|
|
717
|
+
assert services.installed_marketplaces == [custom.marketplace]
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
@pytest.mark.asyncio
|
|
721
|
+
async def test_marketplace_installs_selected_snapshot_when_ids_repeat() -> None:
|
|
722
|
+
services = FakeServices()
|
|
723
|
+
custom = replace(
|
|
724
|
+
_choice("sanka/drf-to-fastapi", "0.1.0a18", installed=False, targets=("fastapi",)),
|
|
725
|
+
marketplace="fastapi-0-1-0a18",
|
|
726
|
+
)
|
|
727
|
+
services.catalog = (custom, replace(custom, marketplace="official"))
|
|
728
|
+
app = SankaApp(services, Session(project_root="/work/demo"), start="marketplace")
|
|
729
|
+
async with app.run_test(size=(120, 40)) as pilot:
|
|
730
|
+
table = app.screen.query_one("#catalog", DataTable)
|
|
731
|
+
table.move_cursor(row=1)
|
|
732
|
+
await pilot.click("#install")
|
|
733
|
+
await app.workers.wait_for_complete()
|
|
734
|
+
assert services.installed_marketplaces == ["official"]
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
@pytest.mark.asyncio
|
|
738
|
+
async def test_extension_update_appears_after_refresh_and_requires_confirmation() -> None:
|
|
739
|
+
services = FakeServices()
|
|
740
|
+
app = SankaApp(services, Session(project_root="/work/demo"), start="extensions")
|
|
741
|
+
async with app.run_test(size=(120, 40)) as pilot:
|
|
742
|
+
await app.workers.wait_for_complete()
|
|
743
|
+
await pilot.click("#details")
|
|
744
|
+
await pilot.pause()
|
|
745
|
+
assert not app.screen.query_one("#update", Button).display
|
|
746
|
+
|
|
747
|
+
current = services.catalog[0]
|
|
748
|
+
services.catalog = (
|
|
749
|
+
current,
|
|
750
|
+
replace(current, version="1.3.0", status=frozenset({"available", "update_available"})),
|
|
751
|
+
*services.catalog[1:],
|
|
752
|
+
)
|
|
753
|
+
assert isinstance(app.screen, ExtensionDetailScreen)
|
|
754
|
+
app.screen.on_catalog_refreshed()
|
|
755
|
+
await pilot.pause()
|
|
756
|
+
assert app.screen.query_one("#update", Button).display
|
|
757
|
+
await pilot.click("#update")
|
|
758
|
+
await pilot.pause()
|
|
759
|
+
assert "1.3.0" in str(app.screen.query_one("#confirm-message", Static).content)
|
|
760
|
+
assert services.installed == []
|
|
761
|
+
await pilot.press("escape")
|
|
762
|
+
await pilot.pause()
|
|
763
|
+
assert services.installed == []
|
|
764
|
+
|
|
765
|
+
await pilot.click("#update")
|
|
766
|
+
await pilot.click("#yes")
|
|
767
|
+
await app.workers.wait_for_complete()
|
|
768
|
+
assert services.installed == [current.id]
|
|
769
|
+
assert services.installed_marketplaces == [current.marketplace]
|
|
770
|
+
assert not app.screen.query_one("#update", Button).display
|
|
771
|
+
|
|
772
|
+
|
|
664
773
|
@pytest.mark.asyncio
|
|
665
774
|
async def test_marketplace_search_filters_by_target() -> None:
|
|
666
775
|
app = SankaApp(FakeServices(), Session(project_root="/work/demo"), start="marketplace")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|