amsdal_cli 0.4.15__tar.gz → 0.5.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.
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/PKG-INFO +5 -4
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/change-logs.md +12 -0
- amsdal_cli-0.5.0/latest-changelogs.md +5 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/license_check.py +4 -1
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/pyproject.toml +10 -3
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/Third-Party Materials - AMSDAL Dependencies - License Notices.md +36 -1
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/__about__.py +1 -1
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/deploy/sub_commands/deploy_new.py +4 -4
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/sub_commands/generate_tests.py +2 -2
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/sub_commands/apply.py +3 -4
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/sub_commands/list.py +4 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/sub_commands/make.py +2 -2
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/utils/migrate_models.py +7 -6
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/restore/command.py +82 -7
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/serve/utils.py +13 -9
- amsdal_cli-0.4.15/latest-changelogs.md +0 -9
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/.editorconfig +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/.gitignore +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/CONTRIBUTING.md +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/LICENSE.txt +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/README.md +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/release_notes/.gitkeep +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/scripts/release.sh +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/scripts/tag_check.sh +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/constants.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/data_models/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/data_models/custom_code.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/data_models/options.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/data_models/schemas_directory.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/extenders/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/extenders/custom_code_extender.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/extenders/options_extender.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/base.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/cli_custom_code_loader.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/cli_loader.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/cli_options_loader.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/cli_statics_loader.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/cli_transactions_loader.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/utils.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/mixins/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/mixins/enrich_schemas_mixin.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/schema_json_loader.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/utils/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/utils/merger.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/services/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/services/builder.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/services/mixin.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/utils/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/utils/build_config_file.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/callbacks.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/ci_cd/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/ci_cd/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/ci_cd/constants.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/ci_cd/templates/github.yml +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/clean/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/clean/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/dependency/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/dependency/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/dependency/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/dependency/sub_commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/dependency/sub_commands/dependency_delete.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/dependency/sub_commands/dependency_list.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/dependency/sub_commands/dependency_new.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/deploy/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/deploy/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/deploy/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/deploy/sub_commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/deploy/sub_commands/deploy_delete.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/deploy/sub_commands/deploy_list.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/enums.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/environments/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/environments/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/environments/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/environments/constants.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/environments/sub_commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/environments/sub_commands/env_checkout.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/environments/sub_commands/env_delete.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/environments/sub_commands/env_list.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/environments/sub_commands/env_new.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/environments/utils.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/secret/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/secret/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/secret/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/secret/constants.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/secret/sub_commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/secret/sub_commands/secret_delete.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/secret/sub_commands/secret_list.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/secret/sub_commands/secret_new.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/allowlist/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/allowlist/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/allowlist/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/allowlist/sub_commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/allowlist/sub_commands/allowlist_delete.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/allowlist/sub_commands/allowlist_new.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/basic_auth/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/basic_auth/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/basic_auth/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/basic_auth/sub_commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/basic_auth/sub_commands/basic_auth_delete.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/basic_auth/sub_commands/basic_auth_new.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/basic_auth/sub_commands/basic_auth_retrieve.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/security/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/sub_commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/sub_commands/expose_db.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/sub_commands/get_monitoring_info.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/cloud/sub_commands/sync_db.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/enums.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/sub_commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/sub_commands/generate_frontend_config.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/sub_commands/generate_hook.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/sub_commands/generate_model.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/sub_commands/generate_modifier.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/sub_commands/generate_permission.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/sub_commands/generate_property.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/sub_commands/generate_transaction.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/templates/async_transaction.pyt +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/templates/hook.pyt +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/templates/modifier/constructor.pyt +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/templates/modifier/display_name.pyt +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/templates/modifier/version_name.pyt +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/templates/property.pyt +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/templates/transaction.pyt +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/build_base_path.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/cast_to_attribute_type.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/model_attributes.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/tests/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/tests/async_mode_utils.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/tests/conftest_utils.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/tests/function_utils.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/tests/model_utils.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/tests/templates/async/conftest.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/tests/templates/sync/conftest.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/tests/type_utils.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/generate/utils/tests/unit.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/constants.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/sub_commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/new/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/new/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/new/templates/.amsdal/.dependencies +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/new/templates/.amsdal/.environment +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/new/templates/.amsdal/.secrets +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/new/templates/.amsdal-cli +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/new/templates/.gitignore +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/new/templates/README.md +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/new/templates/config.yml +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/new/templates/requirements.txt +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/utils/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/utils/build.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/utils/config_updater.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/utils/credentials.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/utils/initialize.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/utils/meta.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/utils/model_generator.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/register_connection/utils/tables.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/restore/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/restore/enums.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/serve/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/serve/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/serve/filters/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/serve/filters/models_watch_filter.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/serve/filters/static_files_watch_filter.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/serve/services/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/serve/services/supervisor.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/tests/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/tests/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/verify/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/verify/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/verify/models.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/verify/utils/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/verify/utils/verify_json_model.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/verify/utils/verify_python_file.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/worker/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/worker/app.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/worker/command.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/worker/sub_commands/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/worker/sub_commands/run.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/config/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/config/main.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/main.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/py.typed +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/alias_group.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/check_versions.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/cli_config.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/copier.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/markdown_patch.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/render_template.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/schema_repository.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/text.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/vcs/__init__.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/vcs/base.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/vcs/dummy.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/vcs/enums.py +0 -0
- {amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/utils/vcs/git.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: amsdal_cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: CLI for AMSDAL framework
|
|
5
5
|
Project-URL: Documentation, https://pypi.org/project/amsdal_cli/#readme
|
|
6
6
|
Project-URL: Issues, https://pypi.org/project/amsdal_cli/
|
|
@@ -121,14 +121,15 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
121
121
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
122
122
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
123
123
|
Requires-Python: >=3.11
|
|
124
|
-
Requires-Dist: amsdal-server==0.
|
|
124
|
+
Requires-Dist: amsdal-server==0.5.*
|
|
125
|
+
Requires-Dist: click<8.2.0
|
|
125
126
|
Requires-Dist: faker==27.*
|
|
126
127
|
Requires-Dist: gitpython~=3.1
|
|
127
128
|
Requires-Dist: jinja2~=3.1
|
|
128
129
|
Requires-Dist: pydantic-settings~=2.2
|
|
129
130
|
Requires-Dist: pydantic~=2.3
|
|
130
|
-
Requires-Dist: rich~=
|
|
131
|
-
Requires-Dist: typer~=0.15.
|
|
131
|
+
Requires-Dist: rich~=14.0
|
|
132
|
+
Requires-Dist: typer~=0.15.3
|
|
132
133
|
Requires-Dist: watchfiles~=0.21
|
|
133
134
|
Description-Content-Type: text/markdown
|
|
134
135
|
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [v0.5.0](https://pypi.org/project/amsdal_cli/0.5.0/) - 2025-05-23
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- Adjustments for the migrations improvements
|
|
6
|
+
|
|
7
|
+
## [v0.4.16](https://pypi.org/project/amsdal_cli/0.4.16/) - 2025-05-12
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Pin `click` version
|
|
12
|
+
|
|
1
13
|
## [v0.4.15](https://pypi.org/project/amsdal_cli/0.4.15/) - 2025-05-01
|
|
2
14
|
|
|
3
15
|
### Fixed
|
|
@@ -10,7 +10,10 @@ def extract_dependency_names():
|
|
|
10
10
|
|
|
11
11
|
project_dependencies = toml_content.get('project', {}).get('dependencies', [])
|
|
12
12
|
|
|
13
|
-
dependency_list = [
|
|
13
|
+
dependency_list = [
|
|
14
|
+
dep.split('==')[0].split('<=')[0].split('~=')[0].split('>=')[0].split('[')[0].split('<')[0]
|
|
15
|
+
for dep in project_dependencies
|
|
16
|
+
]
|
|
14
17
|
return dependency_list
|
|
15
18
|
|
|
16
19
|
|
|
@@ -33,15 +33,19 @@ classifiers = [
|
|
|
33
33
|
dependencies = [
|
|
34
34
|
"pydantic~=2.3",
|
|
35
35
|
"pydantic-settings~=2.2",
|
|
36
|
-
"typer~=0.15.
|
|
37
|
-
"
|
|
36
|
+
"typer~=0.15.3",
|
|
37
|
+
"click<8.2.0",
|
|
38
|
+
"rich~=14.0",
|
|
38
39
|
"jinja2~=3.1",
|
|
39
40
|
"watchfiles~=0.21",
|
|
40
41
|
"GitPython~=3.1",
|
|
41
|
-
"amsdal-server==0.
|
|
42
|
+
"amsdal-server==0.5.*",
|
|
42
43
|
"faker==27.*",
|
|
43
44
|
]
|
|
44
45
|
|
|
46
|
+
[tool.hatch.envs.default.env-vars]
|
|
47
|
+
COLUMNS = "200"
|
|
48
|
+
|
|
45
49
|
[project.urls]
|
|
46
50
|
Documentation = "https://pypi.org/project/amsdal_cli/#readme"
|
|
47
51
|
Issues = "https://pypi.org/project/amsdal_cli/"
|
|
@@ -99,6 +103,9 @@ all = [
|
|
|
99
103
|
change-logs = "towncrier {args:.}"
|
|
100
104
|
release = "rm latest-changelogs.md && towncrier build --yes --version {args:version} && (cat latest-changelogs.md; cat change-logs.md) > temp.md && mv temp.md change-logs.md && git add change-logs.md latest-changelogs.md release_notes && git commit -m 'Updated release notes'"
|
|
101
105
|
|
|
106
|
+
[tool.hatch.envs.local.env-vars]
|
|
107
|
+
COLUMNS = "200"
|
|
108
|
+
|
|
102
109
|
[tool.hatch.envs.local]
|
|
103
110
|
template = "local"
|
|
104
111
|
path = "../.venv/amsdal_cli_local"
|
|
@@ -1185,4 +1185,39 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
1185
1185
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1186
1186
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1187
1187
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1188
|
-
THE SOFTWARE.
|
|
1188
|
+
THE SOFTWARE.
|
|
1189
|
+
|
|
1190
|
+
## click **v8**
|
|
1191
|
+
|
|
1192
|
+
### [https://github.com/pallets/click/](https://github.com/pallets/click/)
|
|
1193
|
+
|
|
1194
|
+
### **BSD-3-Clause license**
|
|
1195
|
+
|
|
1196
|
+
Copyright 2014 Pallets
|
|
1197
|
+
|
|
1198
|
+
Redistribution and use in source and binary forms, with or without
|
|
1199
|
+
modification, are permitted provided that the following conditions are
|
|
1200
|
+
met:
|
|
1201
|
+
|
|
1202
|
+
1. Redistributions of source code must retain the above copyright
|
|
1203
|
+
notice, this list of conditions and the following disclaimer.
|
|
1204
|
+
|
|
1205
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
1206
|
+
notice, this list of conditions and the following disclaimer in the
|
|
1207
|
+
documentation and/or other materials provided with the distribution.
|
|
1208
|
+
|
|
1209
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
1210
|
+
contributors may be used to endorse or promote products derived from
|
|
1211
|
+
this software without specific prior written permission.
|
|
1212
|
+
|
|
1213
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
1214
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
1215
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
1216
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
1217
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
1218
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
1219
|
+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
1220
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
1221
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
1222
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
1223
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -246,7 +246,6 @@ def _check_missing_generated_migrations(
|
|
|
246
246
|
from amsdal.configs.constants import CORE_MIGRATIONS_PATH
|
|
247
247
|
from amsdal.configs.main import settings
|
|
248
248
|
from amsdal_models.migration.file_migration_generator import FileMigrationGenerator
|
|
249
|
-
from amsdal_utils.models.enums import ModuleType
|
|
250
249
|
|
|
251
250
|
from amsdal_cli.commands.migrations.constants import MIGRATIONS_DIR_NAME
|
|
252
251
|
from amsdal_cli.utils.cli_config import ModelsFormat
|
|
@@ -270,8 +269,9 @@ def _check_missing_generated_migrations(
|
|
|
270
269
|
app_migrations_path=migrations_dir,
|
|
271
270
|
contrib_migrations_directory_name=settings.CONTRIB_MODELS_PACKAGE_NAME,
|
|
272
271
|
)
|
|
272
|
+
generator.init_state()
|
|
273
273
|
|
|
274
|
-
operations = generator.generate_operations(schema_repository.user_schemas
|
|
274
|
+
operations = generator.app_file_migration_generator.generate_operations(schema_repository.user_schemas)
|
|
275
275
|
|
|
276
276
|
if operations:
|
|
277
277
|
rprint(rich_error('Missing generated migrations. Use `amsdal migrations new` to fix. Exiting...'))
|
|
@@ -295,7 +295,6 @@ async def _async_check_missing_generated_migrations(
|
|
|
295
295
|
from amsdal.configs.constants import CORE_MIGRATIONS_PATH
|
|
296
296
|
from amsdal.configs.main import settings
|
|
297
297
|
from amsdal_models.migration.file_migration_generator import AsyncFileMigrationGenerator
|
|
298
|
-
from amsdal_utils.models.enums import ModuleType
|
|
299
298
|
|
|
300
299
|
from amsdal_cli.commands.migrations.constants import MIGRATIONS_DIR_NAME
|
|
301
300
|
from amsdal_cli.utils.cli_config import ModelsFormat
|
|
@@ -321,8 +320,9 @@ async def _async_check_missing_generated_migrations(
|
|
|
321
320
|
app_migrations_path=migrations_dir,
|
|
322
321
|
contrib_migrations_directory_name=settings.CONTRIB_MODELS_PACKAGE_NAME,
|
|
323
322
|
)
|
|
323
|
+
await generator.init_state()
|
|
324
324
|
|
|
325
|
-
operations =
|
|
325
|
+
operations = generator.app_file_migration_generator.generate_operations(schema_repository.user_schemas)
|
|
326
326
|
|
|
327
327
|
if operations:
|
|
328
328
|
rprint(rich_error('Missing generated migrations. Use `amsdal migrations new` to fix. Exiting...'))
|
|
@@ -16,9 +16,9 @@ from amsdal_cli.commands.generate.enums import TestType
|
|
|
16
16
|
def generate_tests(
|
|
17
17
|
ctx: typer.Context,
|
|
18
18
|
model_name: str = typer.Option(..., help='The model name. It should be provided in PascalCase.'),
|
|
19
|
-
test_type: TestType = typer.Option(TestType.UNIT, help='The type of test to generate.'), # noqa: B008
|
|
19
|
+
test_type: TestType = typer.Option(TestType.UNIT.value, help='The type of test to generate.'), # noqa: B008
|
|
20
20
|
test_data_type: TestDataType = typer.Option( # noqa: B008
|
|
21
|
-
TestDataType.DYNAMIC,
|
|
21
|
+
TestDataType.DYNAMIC.value,
|
|
22
22
|
help='The type of test data to generate.',
|
|
23
23
|
),
|
|
24
24
|
config: Annotated[Path, typer.Option(..., '--config', '-c')] = None, # type: ignore # noqa: RUF013
|
{amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/sub_commands/apply.py
RENAMED
|
@@ -47,6 +47,7 @@ def _sync_apply(
|
|
|
47
47
|
app_migrations_loader = MigrationsLoader(
|
|
48
48
|
migrations_dir=build_dir / MIGRATIONS_DIR_NAME,
|
|
49
49
|
module_type=ModuleType.USER,
|
|
50
|
+
module_name=settings.MIGRATIONS_DIRECTORY_NAME,
|
|
50
51
|
)
|
|
51
52
|
schemas = MigrationSchemas()
|
|
52
53
|
|
|
@@ -101,7 +102,6 @@ async def _async_sync_apply(
|
|
|
101
102
|
from amsdal_models.migration.data_classes import MigrationResult
|
|
102
103
|
from amsdal_models.migration.executors.default_executor import DefaultAsyncMigrationExecutor
|
|
103
104
|
from amsdal_models.migration.file_migration_executor import AsyncFileMigrationExecutorManager
|
|
104
|
-
from amsdal_models.migration.file_migration_store import AsyncFileMigrationStore
|
|
105
105
|
from amsdal_models.migration.migrations import MigrationSchemas
|
|
106
106
|
from amsdal_models.migration.migrations_loader import MigrationsLoader
|
|
107
107
|
|
|
@@ -116,14 +116,13 @@ async def _async_sync_apply(
|
|
|
116
116
|
|
|
117
117
|
try:
|
|
118
118
|
amsdal_manager.authenticate()
|
|
119
|
-
store = AsyncFileMigrationStore(build_dir / MIGRATIONS_DIR_NAME)
|
|
120
119
|
|
|
121
|
-
await store.init_migration_table()
|
|
122
120
|
await amsdal_manager.post_setup()
|
|
123
121
|
|
|
124
122
|
app_migrations_loader = MigrationsLoader(
|
|
125
123
|
migrations_dir=build_dir / MIGRATIONS_DIR_NAME,
|
|
126
124
|
module_type=ModuleType.USER,
|
|
125
|
+
module_name=settings.MIGRATIONS_DIRECTORY_NAME,
|
|
127
126
|
)
|
|
128
127
|
schemas = MigrationSchemas()
|
|
129
128
|
|
|
@@ -211,7 +210,7 @@ def apply_migrations(
|
|
|
211
210
|
] = None, # type: ignore[assignment]
|
|
212
211
|
build_dir: Annotated[Path, typer.Option(..., '--build-dir', '-b')] = Path('.'),
|
|
213
212
|
*,
|
|
214
|
-
module_type: Annotated[ModuleType, typer.Option(..., '--module', '-m')] = ModuleType.USER,
|
|
213
|
+
module_type: Annotated[ModuleType, typer.Option(..., '--module', '-m')] = ModuleType.USER.value, # type: ignore
|
|
215
214
|
fake: Annotated[bool, typer.Option('--fake', '-f')] = False,
|
|
216
215
|
config: Annotated[Path, typer.Option(..., '--config', '-c')] = None, # type: ignore # noqa: RUF013
|
|
217
216
|
) -> None:
|
{amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/sub_commands/list.py
RENAMED
|
@@ -22,6 +22,8 @@ def _fetch_migrations(app_migrations_path: Path) -> list['MigrationFile']:
|
|
|
22
22
|
amsdal_manager.post_setup()
|
|
23
23
|
|
|
24
24
|
store = FileMigrationStore(app_migrations_path)
|
|
25
|
+
store.init_migration_table()
|
|
26
|
+
|
|
25
27
|
return store.fetch_migrations()
|
|
26
28
|
|
|
27
29
|
|
|
@@ -94,6 +96,7 @@ def list_migrations(
|
|
|
94
96
|
core_loader = MigrationsLoader(
|
|
95
97
|
migrations_dir=CORE_MIGRATIONS_PATH,
|
|
96
98
|
module_type=ModuleType.CORE,
|
|
99
|
+
module_name='amsdal.__migrations__',
|
|
97
100
|
)
|
|
98
101
|
contrib_loaders: list[tuple[str, MigrationsLoader]] = []
|
|
99
102
|
|
|
@@ -114,6 +117,7 @@ def list_migrations(
|
|
|
114
117
|
app_migrations_loader = MigrationsLoader(
|
|
115
118
|
migrations_dir=build_dir / MIGRATIONS_DIR_NAME,
|
|
116
119
|
module_type=ModuleType.USER,
|
|
120
|
+
module_name=settings.MIGRATIONS_DIRECTORY_NAME,
|
|
117
121
|
)
|
|
118
122
|
|
|
119
123
|
rprint(rich_success('Core:'))
|
{amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/migrations/sub_commands/make.py
RENAMED
|
@@ -44,7 +44,7 @@ def _sync_make_migrations(
|
|
|
44
44
|
generator = FileMigrationGenerator(
|
|
45
45
|
core_migrations_path=CORE_MIGRATIONS_PATH,
|
|
46
46
|
app_migrations_path=migrations_dir,
|
|
47
|
-
contrib_migrations_directory_name=settings.
|
|
47
|
+
contrib_migrations_directory_name=settings.CONTRIB_MIGRATIONS_DIRECTORY_NAME,
|
|
48
48
|
)
|
|
49
49
|
|
|
50
50
|
try:
|
|
@@ -122,7 +122,7 @@ def make_migrations(
|
|
|
122
122
|
build_dir: Annotated[Path, typer.Option('--build-dir', '-b')] = Path('.'),
|
|
123
123
|
*,
|
|
124
124
|
name: Annotated[str, typer.Option('--name', '-n', help='Migration name')] = None, # type: ignore # noqa: RUF013
|
|
125
|
-
is_data: Annotated[bool, typer.Option('--data', '-d',
|
|
125
|
+
is_data: Annotated[bool, typer.Option('--data', '-d', help='Create data migration')] = False,
|
|
126
126
|
config: Annotated[Path, typer.Option('--config', '-c')] = None, # type: ignore # noqa: RUF013
|
|
127
127
|
) -> None:
|
|
128
128
|
"""
|
|
@@ -72,7 +72,7 @@ def _migrate_models(config_path: Path) -> None:
|
|
|
72
72
|
from amsdal_models.classes.class_loader import ModelClassLoader
|
|
73
73
|
from amsdal_models.migration import migrations
|
|
74
74
|
from amsdal_models.migration.executors.default_executor import DefaultMigrationExecutor
|
|
75
|
-
from amsdal_models.migration.file_migration_generator import
|
|
75
|
+
from amsdal_models.migration.file_migration_generator import BaseFileMigrationGenerator
|
|
76
76
|
from amsdal_models.migration.file_migration_writer import FileMigrationWriter
|
|
77
77
|
from amsdal_models.migration.migrations import MigrationSchemas
|
|
78
78
|
from amsdal_models.schemas.class_schema_loader import ClassSchemaLoader
|
|
@@ -121,7 +121,8 @@ def _migrate_models(config_path: Path) -> None:
|
|
|
121
121
|
_schemas_map = {_schema.title: _schema for _schema in _schemas}
|
|
122
122
|
|
|
123
123
|
for object_schema in _schemas:
|
|
124
|
-
|
|
124
|
+
|
|
125
|
+
for _operation_data in BaseFileMigrationGenerator.build_operations(
|
|
125
126
|
ModuleType.USER,
|
|
126
127
|
object_schema,
|
|
127
128
|
None,
|
|
@@ -136,7 +137,7 @@ def _migrate_models(config_path: Path) -> None:
|
|
|
136
137
|
_operation.forward(executor)
|
|
137
138
|
|
|
138
139
|
for object_schema in _cycle_schemas:
|
|
139
|
-
for _operation_data in
|
|
140
|
+
for _operation_data in BaseFileMigrationGenerator.build_operations(
|
|
140
141
|
ModuleType.USER,
|
|
141
142
|
object_schema,
|
|
142
143
|
_schemas_map[object_schema.title],
|
|
@@ -163,7 +164,7 @@ async def _async_migrate_models(config_path: Path) -> None:
|
|
|
163
164
|
from amsdal_models.classes.class_loader import ModelClassLoader
|
|
164
165
|
from amsdal_models.migration import migrations
|
|
165
166
|
from amsdal_models.migration.executors.default_executor import DefaultAsyncMigrationExecutor
|
|
166
|
-
from amsdal_models.migration.file_migration_generator import
|
|
167
|
+
from amsdal_models.migration.file_migration_generator import BaseFileMigrationGenerator
|
|
167
168
|
from amsdal_models.migration.file_migration_writer import FileMigrationWriter
|
|
168
169
|
from amsdal_models.migration.migrations import MigrationSchemas
|
|
169
170
|
from amsdal_models.schemas.class_schema_loader import ClassSchemaLoader
|
|
@@ -211,7 +212,7 @@ async def _async_migrate_models(config_path: Path) -> None:
|
|
|
211
212
|
_schemas_map = {_schema.title: _schema for _schema in _schemas}
|
|
212
213
|
|
|
213
214
|
for object_schema in _schemas:
|
|
214
|
-
for _operation_data in
|
|
215
|
+
for _operation_data in BaseFileMigrationGenerator.build_operations(
|
|
215
216
|
ModuleType.USER,
|
|
216
217
|
object_schema,
|
|
217
218
|
None,
|
|
@@ -226,7 +227,7 @@ async def _async_migrate_models(config_path: Path) -> None:
|
|
|
226
227
|
_operation.forward(executor)
|
|
227
228
|
|
|
228
229
|
for object_schema in _cycle_schemas:
|
|
229
|
-
for _operation_data in
|
|
230
|
+
for _operation_data in BaseFileMigrationGenerator.build_operations(
|
|
230
231
|
ModuleType.USER,
|
|
231
232
|
object_schema,
|
|
232
233
|
_schemas_map[object_schema.title],
|
|
@@ -264,6 +264,8 @@ async def _async_restore_models(app_source_path: Path, cli_config: 'CliConfig')
|
|
|
264
264
|
|
|
265
265
|
def _restore_state_db(cli_config: 'CliConfig', config_path: Path | None) -> None:
|
|
266
266
|
from amsdal_data.connections.constants import SECONDARY_PARTITION_KEY
|
|
267
|
+
from amsdal_data.connections.historical.data_query_transform import META_FOREIGN_KEYS
|
|
268
|
+
from amsdal_data.connections.historical.data_query_transform import META_PRIMARY_KEY_FIELDS
|
|
267
269
|
from amsdal_data.utils import object_schema_to_glue_schema
|
|
268
270
|
from amsdal_utils.config.manager import AmsdalConfigManager
|
|
269
271
|
|
|
@@ -277,6 +279,12 @@ def _restore_state_db(cli_config: 'CliConfig', config_path: Path | None) -> None
|
|
|
277
279
|
|
|
278
280
|
class_object_ref, class_object_meta_ref = _get_class_object_reference(lakehouse_connection)
|
|
279
281
|
model_pks, model_fks, model_m2ms = _fetch_model_pks_and_fks(lakehouse_connection, class_object_ref)
|
|
282
|
+
|
|
283
|
+
expected_m2m_tables: set[str] = set()
|
|
284
|
+
for model_name, m2m_list in model_m2ms.items():
|
|
285
|
+
for _, m2m_value in m2m_list.items():
|
|
286
|
+
expected_m2m_tables.add(f'{model_name}{m2m_value[1]}')
|
|
287
|
+
|
|
280
288
|
user_schemas = _get_user_schemas(
|
|
281
289
|
lakehouse_connection,
|
|
282
290
|
class_object_ref,
|
|
@@ -287,7 +295,8 @@ def _restore_state_db(cli_config: 'CliConfig', config_path: Path | None) -> None
|
|
|
287
295
|
user_scheams_with_tries = [(table_ref, schema, 0) for table_ref, schema in user_schemas]
|
|
288
296
|
refs_by_name = {table_ref.name: table_ref for table_ref, _ in user_schemas}
|
|
289
297
|
|
|
290
|
-
|
|
298
|
+
m2m_schemas = [schema for schema in user_schemas if schema[0].name in expected_m2m_tables]
|
|
299
|
+
|
|
291
300
|
while user_scheams_with_tries:
|
|
292
301
|
table_ref, schema, current_iteration = user_scheams_with_tries.pop(0)
|
|
293
302
|
rprint(rich_info(f'Restoring {table_ref.name}'))
|
|
@@ -316,7 +325,7 @@ def _restore_state_db(cli_config: 'CliConfig', config_path: Path | None) -> None
|
|
|
316
325
|
|
|
317
326
|
from amsdal_data.connections.historical.data_query_transform import META_CLASS_NAME
|
|
318
327
|
|
|
319
|
-
data,
|
|
328
|
+
data, _ = _build_data(
|
|
320
329
|
item,
|
|
321
330
|
model_name=table_ref.metadata[META_CLASS_NAME], # type: ignore[index]
|
|
322
331
|
model_pks=model_pks,
|
|
@@ -325,7 +334,6 @@ def _restore_state_db(cli_config: 'CliConfig', config_path: Path | None) -> None
|
|
|
325
334
|
refs_by_name=refs_by_name,
|
|
326
335
|
)
|
|
327
336
|
|
|
328
|
-
m2m_all_data.extend(m2m_data)
|
|
329
337
|
state_connection.run_mutations(
|
|
330
338
|
mutations=[
|
|
331
339
|
glue.InsertData(
|
|
@@ -339,12 +347,79 @@ def _restore_state_db(cli_config: 'CliConfig', config_path: Path | None) -> None
|
|
|
339
347
|
],
|
|
340
348
|
)
|
|
341
349
|
rprint('.', end='')
|
|
350
|
+
|
|
342
351
|
rprint('Inserting m2m data...')
|
|
352
|
+
m2m_all_data = []
|
|
353
|
+
for schema_ref, schema in m2m_schemas:
|
|
354
|
+
_datas = []
|
|
355
|
+
_objects = lakehouse_connection.query(glue.QueryStatement(table=schema_ref))
|
|
356
|
+
field1, field2 = schema.required
|
|
357
|
+
prop1 = schema.properties[field1] # type: ignore[index]
|
|
358
|
+
prop2 = schema.properties[field2] # type: ignore[index]
|
|
359
|
+
|
|
360
|
+
rprint(rich_info(f'Found {len(_objects)} m2m objects for {schema_ref.name}...'))
|
|
361
|
+
for _item in _objects:
|
|
362
|
+
obj_id_1 = _item.data[field1]['ref']['object_id']
|
|
363
|
+
obj_id_2 = _item.data[field2]['ref']['object_id']
|
|
364
|
+
_datas.append(
|
|
365
|
+
glue.Data(
|
|
366
|
+
data={
|
|
367
|
+
f'{field1}_partition_key': obj_id_1,
|
|
368
|
+
f'{field2}_partition_key': obj_id_2,
|
|
369
|
+
},
|
|
370
|
+
metadata={
|
|
371
|
+
META_PRIMARY_KEY_FIELDS: {
|
|
372
|
+
f'{field1}_partition_key': str,
|
|
373
|
+
f'{field2}_partition_key': str,
|
|
374
|
+
},
|
|
375
|
+
META_FOREIGN_KEYS: {
|
|
376
|
+
f'{field1}_partition_key': {
|
|
377
|
+
'ref': {
|
|
378
|
+
'resource': 'statedb',
|
|
379
|
+
'class_name': prop1.type,
|
|
380
|
+
'object_id': obj_id_1,
|
|
381
|
+
'class_version': 'LATEST',
|
|
382
|
+
'object_version': 'LATEST',
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
f'{field2}_partition_key': {
|
|
386
|
+
'ref': {
|
|
387
|
+
'resource': 'statedb',
|
|
388
|
+
'class_name': prop2.type,
|
|
389
|
+
'object_id': obj_id_2,
|
|
390
|
+
'class_version': 'LATEST',
|
|
391
|
+
'object_version': 'LATEST',
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
},
|
|
396
|
+
)
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
if _datas:
|
|
400
|
+
m2m_all_data.append(
|
|
401
|
+
glue.InsertData(
|
|
402
|
+
schema=glue.SchemaReference(
|
|
403
|
+
name=schema_ref.name,
|
|
404
|
+
version=glue.Version.LATEST,
|
|
405
|
+
metadata=schema_ref.metadata,
|
|
406
|
+
),
|
|
407
|
+
data=_datas,
|
|
408
|
+
)
|
|
409
|
+
)
|
|
343
410
|
for _m2m_data in m2m_all_data:
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
411
|
+
for data in _m2m_data.data:
|
|
412
|
+
try:
|
|
413
|
+
state_connection.run_mutations(
|
|
414
|
+
mutations=[
|
|
415
|
+
glue.InsertData(
|
|
416
|
+
schema=_m2m_data.schema,
|
|
417
|
+
data=[data],
|
|
418
|
+
),
|
|
419
|
+
]
|
|
420
|
+
)
|
|
421
|
+
except Exception:
|
|
422
|
+
rprint('Error inserting m2m data')
|
|
348
423
|
|
|
349
424
|
rprint(rich_success('Done! All classes are restored.'))
|
|
350
425
|
|
|
@@ -175,7 +175,6 @@ def _check_migrations_generated_and_applied(
|
|
|
175
175
|
from amsdal.configs.constants import CORE_MIGRATIONS_PATH
|
|
176
176
|
from amsdal.configs.main import settings
|
|
177
177
|
from amsdal_models.migration.file_migration_generator import FileMigrationGenerator
|
|
178
|
-
from amsdal_utils.models.enums import ModuleType
|
|
179
178
|
|
|
180
179
|
from amsdal_cli.commands.generate.enums import SOURCES_DIR
|
|
181
180
|
from amsdal_cli.commands.migrations.constants import MIGRATIONS_DIR_NAME
|
|
@@ -192,10 +191,11 @@ def _check_migrations_generated_and_applied(
|
|
|
192
191
|
generator = FileMigrationGenerator(
|
|
193
192
|
core_migrations_path=CORE_MIGRATIONS_PATH,
|
|
194
193
|
app_migrations_path=migrations_dir,
|
|
195
|
-
contrib_migrations_directory_name=settings.
|
|
194
|
+
contrib_migrations_directory_name=settings.CONTRIB_MIGRATIONS_DIRECTORY_NAME,
|
|
196
195
|
)
|
|
196
|
+
generator.init_state()
|
|
197
197
|
|
|
198
|
-
operations = generator.generate_operations(schemas=schema_repository.user_schemas
|
|
198
|
+
operations = generator.app_file_migration_generator.generate_operations(schemas=schema_repository.user_schemas)
|
|
199
199
|
|
|
200
200
|
if operations:
|
|
201
201
|
rprint(
|
|
@@ -226,6 +226,7 @@ def _check_has_unapplied_migrations(
|
|
|
226
226
|
core_loader = MigrationsLoader(
|
|
227
227
|
migrations_dir=CORE_MIGRATIONS_PATH,
|
|
228
228
|
module_type=ModuleType.CORE,
|
|
229
|
+
module_name='amsdal.__migrations__',
|
|
229
230
|
)
|
|
230
231
|
|
|
231
232
|
schemas = DefaultMigrationSchemas()
|
|
@@ -251,6 +252,7 @@ def _check_has_unapplied_migrations(
|
|
|
251
252
|
MigrationsLoader(
|
|
252
253
|
migrations_dir=build_dir / MIGRATIONS_DIR_NAME,
|
|
253
254
|
module_type=ModuleType.USER,
|
|
255
|
+
module_name=settings.MIGRATIONS_DIRECTORY_NAME,
|
|
254
256
|
),
|
|
255
257
|
all_applied_migrations,
|
|
256
258
|
schemas,
|
|
@@ -263,7 +265,7 @@ def _check_has_unapplied_migrations_per_loader(
|
|
|
263
265
|
schemas: 'DefaultMigrationSchemas',
|
|
264
266
|
) -> bool:
|
|
265
267
|
from amsdal_models.migration.executors.state_executor import StateMigrationExecutor
|
|
266
|
-
from amsdal_models.migration.file_migration_executor import
|
|
268
|
+
from amsdal_models.migration.file_migration_executor import BaseMigrationExecutorManager
|
|
267
269
|
from amsdal_models.migration.migrations import MigrateData
|
|
268
270
|
|
|
269
271
|
from amsdal_cli.utils.text import rich_warning
|
|
@@ -278,7 +280,8 @@ def _check_has_unapplied_migrations_per_loader(
|
|
|
278
280
|
return True
|
|
279
281
|
else:
|
|
280
282
|
# Register classes from migrations
|
|
281
|
-
|
|
283
|
+
|
|
284
|
+
migration_class = BaseMigrationExecutorManager.get_migration_class(_migration)
|
|
282
285
|
migration_class_instance = migration_class()
|
|
283
286
|
state_executor = StateMigrationExecutor(
|
|
284
287
|
schemas,
|
|
@@ -451,6 +454,7 @@ async def _async_check_has_unapplied_migrations(
|
|
|
451
454
|
core_loader = MigrationsLoader(
|
|
452
455
|
migrations_dir=CORE_MIGRATIONS_PATH,
|
|
453
456
|
module_type=ModuleType.CORE,
|
|
457
|
+
module_name='amsdal.__migrations__',
|
|
454
458
|
)
|
|
455
459
|
schemas = DefaultMigrationSchemas()
|
|
456
460
|
|
|
@@ -475,6 +479,7 @@ async def _async_check_has_unapplied_migrations(
|
|
|
475
479
|
MigrationsLoader(
|
|
476
480
|
migrations_dir=build_dir / MIGRATIONS_DIR_NAME,
|
|
477
481
|
module_type=ModuleType.USER,
|
|
482
|
+
module_name=settings.MIGRATIONS_DIRECTORY_NAME,
|
|
478
483
|
),
|
|
479
484
|
all_applied_migrations,
|
|
480
485
|
schemas,
|
|
@@ -488,7 +493,6 @@ async def _async_check_migrations_generated_and_applied(
|
|
|
488
493
|
from amsdal.configs.constants import CORE_MIGRATIONS_PATH
|
|
489
494
|
from amsdal.configs.main import settings
|
|
490
495
|
from amsdal_models.migration.file_migration_generator import AsyncFileMigrationGenerator
|
|
491
|
-
from amsdal_utils.models.enums import ModuleType
|
|
492
496
|
|
|
493
497
|
from amsdal_cli.commands.generate.enums import SOURCES_DIR
|
|
494
498
|
from amsdal_cli.commands.migrations.constants import MIGRATIONS_DIR_NAME
|
|
@@ -505,11 +509,11 @@ async def _async_check_migrations_generated_and_applied(
|
|
|
505
509
|
generator = AsyncFileMigrationGenerator(
|
|
506
510
|
core_migrations_path=CORE_MIGRATIONS_PATH,
|
|
507
511
|
app_migrations_path=migrations_dir,
|
|
508
|
-
contrib_migrations_directory_name=settings.
|
|
512
|
+
contrib_migrations_directory_name=settings.CONTRIB_MIGRATIONS_DIRECTORY_NAME,
|
|
509
513
|
)
|
|
510
|
-
|
|
514
|
+
await generator.init_state()
|
|
515
|
+
operations = generator.app_file_migration_generator.generate_operations(
|
|
511
516
|
schemas=schema_repository.user_schemas,
|
|
512
|
-
module_type=ModuleType.USER,
|
|
513
517
|
)
|
|
514
518
|
|
|
515
519
|
if operations:
|
|
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
|
{amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/data_models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/data_models/options.py
RENAMED
|
File without changes
|
|
File without changes
|
{amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/extenders/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/__init__.py
RENAMED
|
File without changes
|
{amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/base.py
RENAMED
|
File without changes
|
|
File without changes
|
{amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/cli_loader.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{amsdal_cli-0.4.15 → amsdal_cli-0.5.0}/src/amsdal_cli/commands/build/schemas/loaders/utils.py
RENAMED
|
File without changes
|