zrb 0.6.0__py3-none-any.whl → 0.6.1__py3-none-any.whl
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.
- zrb/__init__.py +24 -20
- zrb/__main__.py +5 -5
- zrb/action/runner.py +22 -30
- zrb/advertisement.py +10 -9
- zrb/builtin/__init__.py +18 -16
- zrb/builtin/base64.py +13 -18
- zrb/builtin/devtool/__init__.py +14 -3
- zrb/builtin/devtool/devtool_install.py +207 -221
- zrb/builtin/env.py +9 -12
- zrb/builtin/eval.py +9 -9
- zrb/builtin/explain.py +73 -74
- zrb/builtin/generator/__init__.py +7 -11
- zrb/builtin/generator/app_generator/add.py +86 -87
- zrb/builtin/generator/app_generator/template/base/_automate/generate_snake_zrb_meta_template_name/add.py +78 -77
- zrb/builtin/generator/app_generator/template/base/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/_checker.py +6 -6
- zrb/builtin/generator/app_generator/template/base/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/_common.py +14 -15
- zrb/builtin/generator/app_generator/template/base/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/container.py +32 -32
- zrb/builtin/generator/app_generator/template/base/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/deployment.py +29 -30
- zrb/builtin/generator/app_generator/template/base/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/image.py +1 -3
- zrb/builtin/generator/app_generator/template/base/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/local.py +5 -4
- zrb/builtin/generator/app_generator/template/base/_automate/generate_snake_zrb_meta_template_name/template/src/kebab-zrb-app-name/deployment/__main__.py +24 -32
- zrb/builtin/generator/app_generator/template/build-custom-image/_automate/generate_snake_zrb_meta_template_name/add.py +89 -87
- zrb/builtin/generator/app_generator/template/build-custom-image/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/_common.py +14 -15
- zrb/builtin/generator/app_generator/template/build-custom-image/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/container.py +42 -54
- zrb/builtin/generator/app_generator/template/build-custom-image/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/deployment.py +34 -32
- zrb/builtin/generator/app_generator/template/build-custom-image/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/image.py +19 -22
- zrb/builtin/generator/app_generator/template/build-custom-image/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/local.py +18 -18
- zrb/builtin/generator/app_generator/template/http-port/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/_checker.py +10 -10
- zrb/builtin/generator/app_generator/template/http-port-build-custom-image/_automate/generate_snake_zrb_meta_template_name/template/_automate/snake_zrb_app_name/local.py +19 -19
- zrb/builtin/generator/app_generator/template/use-helm/_automate/generate_snake_zrb_meta_template_name/template/src/kebab-zrb-app-name/deployment/__main__.py +12 -14
- zrb/builtin/generator/cmd_task/add.py +23 -25
- zrb/builtin/generator/cmd_task/template/_automate/snake_zrb_task_name.py +3 -5
- zrb/builtin/generator/common/helper.py +15 -20
- zrb/builtin/generator/common/task_factory.py +29 -26
- zrb/builtin/generator/common/task_input.py +97 -91
- zrb/builtin/generator/docker_compose_task/add.py +38 -39
- zrb/builtin/generator/docker_compose_task/template/_automate/snake_zrb_task_name.py +13 -19
- zrb/builtin/generator/docker_compose_task/template/src/kebab-zrb-task-name/image/main.py +18 -14
- zrb/builtin/generator/fastapp/add.py +94 -90
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/_checker.py +28 -27
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/_config.py +68 -39
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/_env.py +24 -22
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/_env_file.py +12 -12
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/_get_start_microservices.py +43 -41
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/_helper.py +23 -24
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/_input.py +21 -20
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/cmd/app-load-test.sh +1 -1
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/cmd/app-start.sh +1 -1
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/cmd/app-test.sh +2 -2
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/container.py +46 -39
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/deployment.py +28 -20
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/frontend.py +21 -27
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/image.py +23 -18
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/load_test.py +35 -36
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/local.py +68 -58
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/test.py +24 -38
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/deployment/__main__.py +23 -21
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/deployment/_common.py +72 -75
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/deployment/app_helper.py +70 -75
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/deployment/helm_postgresql_helper.py +18 -21
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/deployment/helm_rabbitmq_helper.py +11 -19
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/deployment/helm_redpanda_helper.py +18 -15
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/deployment/helm_signoz_helper.py +17 -21
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/docker-compose.yml +12 -12
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/loadtest/locustfile.py +10 -12
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/Dockerfile +1 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/app.py +35 -30
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/app_lifespan.py +21 -17
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/app_state.py +3 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/db_connection.py +18 -20
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/frontend_index.py +5 -6
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/log.py +7 -15
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/messagebus.py +38 -34
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/rpc.py +19 -18
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/config.py +68 -103
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/error.py +11 -10
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/messagebus/__init__.py +2 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/messagebus/kafka/admin.py +38 -35
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/messagebus/kafka/consumer.py +38 -45
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/messagebus/kafka/publisher.py +26 -29
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/messagebus/messagebus.py +8 -14
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/messagebus/mock.py +12 -8
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/messagebus/rabbitmq/admin.py +37 -44
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/messagebus/rabbitmq/consumer.py +42 -67
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/messagebus/rabbitmq/publisher.py +32 -55
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/model/repo_model.py +11 -10
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/repo/__init__.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/repo/db_entity_mixin.py +3 -6
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/repo/db_repo.py +76 -83
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/repo/repo.py +5 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/repo/search_filter.py +1 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/rpc/__init__.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/rpc/messagebus/caller.py +17 -19
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/rpc/messagebus/server.py +14 -18
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/rpc/rpc.py +15 -28
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/schema/__init__.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/schema/base_schema.py +6 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/serializer/__init__.py +1 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/serializer/serializer.py +3 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/helper/async_task.py +3 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/helper/conversion.py +10 -10
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/helper/migration.py +6 -10
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/migrate.py +3 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/api.py +7 -12
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/__init__.py +4 -6
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/access_token_scheme.py +9 -10
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/access_token_util.py +6 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/authorizer.py +4 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/bearer_token_scheme.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/model/user_model.py +8 -10
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/password_hasher.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/refresh_token_util.py +7 -6
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/repo/group_repo.py +3 -8
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/repo/permission_repo.py +3 -7
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/repo/user_repo.py +3 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/user.py +12 -7
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/core/__init__.py +7 -12
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/core/access_token/scheme.py +7 -12
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/core/access_token/util.py +20 -30
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/core/authorizer/authorizer.py +1 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/core/authorizer/rpc_authorizer.py +5 -12
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/core/password_hasher/bcrypt_password_hasher.py +3 -8
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/core/password_hasher/password_hasher.py +0 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/core/refresh_token/util.py +15 -21
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/api.py +42 -49
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/model.py +3 -7
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/repo.py +18 -16
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/rpc.py +26 -41
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/permission/api.py +46 -51
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/permission/model.py +5 -7
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/permission/repo.py +11 -8
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/permission/rpc.py +28 -45
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/table.py +10 -10
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/api.py +60 -72
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/model.py +32 -61
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/repo.py +33 -36
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/rpc.py +42 -61
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/event.py +2 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/migrate.py +3 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/register_module.py +11 -12
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/register_permission.py +19 -26
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/rpc.py +5 -13
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/schema/group.py +6 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/schema/permission.py +3 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/schema/request.py +1 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/schema/token.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/schema/user.py +4 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/api.py +4 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/component/model/activity_model.py +3 -9
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/component/repo/activity_repo.py +3 -7
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/core/historical_repo_model.py +13 -13
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/activity/api.py +22 -23
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/activity/event.py +5 -7
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/activity/model.py +2 -6
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/activity/repo.py +8 -8
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/activity/rpc.py +28 -45
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/table.py +3 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/event.py +4 -8
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/migrate.py +2 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/register_module.py +10 -11
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/rpc.py +3 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/schema/activity.py +3 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/requirements.txt +12 -12
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/test/auth/test_group_crud.py +76 -106
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/test/auth/test_permission_crud.py +73 -103
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/test/auth/test_user_crud.py +92 -122
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/test/auth/test_user_login.py +107 -134
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/test/conftest.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/test/test_liveness_and_readiness.py +8 -15
- zrb/builtin/generator/fastapp_crud/add.py +74 -79
- zrb/builtin/generator/fastapp_crud/helper.py +51 -48
- zrb/builtin/generator/fastapp_crud/task_factory.py +17 -14
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/component/model/snake_zrb_entity_name_model.py +2 -2
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/component/repo/snake_zrb_entity_name_repo.py +3 -2
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/snake_zrb_entity_name/api.py +58 -40
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/snake_zrb_entity_name/model.py +7 -3
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/snake_zrb_entity_name/repo.py +9 -4
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/snake_zrb_entity_name/rpc.py +32 -39
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/schema/snake_zrb_entity_name.py +3 -1
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/test/snake_zrb_module_name/test_snake_zrb_entity_name.py +68 -98
- zrb/builtin/generator/fastapp_field/add.py +143 -85
- zrb/builtin/generator/fastapp_field/helper.py +184 -125
- zrb/builtin/generator/fastapp_module/add.py +90 -67
- zrb/builtin/generator/fastapp_module/helper.py +141 -155
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/api.py +3 -2
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/table.py +3 -3
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/event.py +3 -5
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/migrate.py +2 -4
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/register_module.py +10 -11
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/rpc.py +3 -5
- zrb/builtin/generator/pip_package/add.py +39 -40
- zrb/builtin/generator/pip_package/template/_automate/snake_zrb_package_name/local.py +30 -30
- zrb/builtin/generator/pip_package/template/src/kebab-zrb-package-name/src/snake_zrb_package_name/__init__.py +1 -0
- zrb/builtin/generator/pip_package/template/src/kebab-zrb-package-name/src/snake_zrb_package_name/__main__.py +1 -0
- zrb/builtin/generator/pip_package/template/src/kebab-zrb-package-name/src/snake_zrb_package_name/util.py +2 -2
- zrb/builtin/generator/plugin/create.py +39 -36
- zrb/builtin/generator/plugin/template/src/snake_zrb_package_name/__init__.py +1 -1
- zrb/builtin/generator/plugin/template/src/snake_zrb_package_name/__main__.py +1 -0
- zrb/builtin/generator/plugin/template/src/snake_zrb_package_name/task/example_task.py +6 -4
- zrb/builtin/generator/plugin/template/zrb_init.py +27 -27
- zrb/builtin/generator/project/create.py +38 -46
- zrb/builtin/generator/project/template/.flake8 +3 -0
- zrb/builtin/generator/project/template/project.sh +19 -10
- zrb/builtin/generator/project_task/task_factory.py +60 -61
- zrb/builtin/generator/project_task/template/_automate/_project/__init__.py +2 -2
- zrb/builtin/generator/project_task/template/_automate/_project/build_project_images.py +4 -4
- zrb/builtin/generator/project_task/template/_automate/_project/deploy_project.py +4 -4
- zrb/builtin/generator/project_task/template/_automate/_project/destroy_project.py +4 -4
- zrb/builtin/generator/project_task/template/_automate/_project/push_project_images.py +4 -4
- zrb/builtin/generator/project_task/template/_automate/_project/remove_project_containers.py +4 -4
- zrb/builtin/generator/project_task/template/_automate/_project/start_project.py +4 -4
- zrb/builtin/generator/project_task/template/_automate/_project/start_project_containers.py +4 -4
- zrb/builtin/generator/project_task/template/_automate/_project/stop_project_containers.py +4 -4
- zrb/builtin/generator/python_task/add.py +25 -33
- zrb/builtin/generator/python_task/template/_automate/snake_zrb_task_name.py +8 -7
- zrb/builtin/generator/simple_python_app/add.py +81 -75
- zrb/builtin/generator/simple_python_app/template/_automate/snake_zrb_app_name/_common.py +14 -15
- zrb/builtin/generator/simple_python_app/template/_automate/snake_zrb_app_name/container.py +46 -61
- zrb/builtin/generator/simple_python_app/template/_automate/snake_zrb_app_name/deployment.py +34 -32
- zrb/builtin/generator/simple_python_app/template/_automate/snake_zrb_app_name/image.py +19 -22
- zrb/builtin/generator/simple_python_app/template/_automate/snake_zrb_app_name/local.py +23 -25
- zrb/builtin/generator/simple_python_app/template/src/kebab-zrb-app-name/deployment/__main__.py +24 -32
- zrb/builtin/generator/simple_python_app/template/src/kebab-zrb-app-name/src/main.py +18 -14
- zrb/builtin/git.py +46 -46
- zrb/builtin/group.py +13 -34
- zrb/builtin/helper/reccuring_action.py +26 -29
- zrb/builtin/md5.py +17 -30
- zrb/builtin/process.py +19 -19
- zrb/builtin/project.py +13 -15
- zrb/builtin/say.py +69 -88
- zrb/builtin/schedule.py +15 -19
- zrb/builtin/ubuntu.py +44 -35
- zrb/builtin/update.py +5 -5
- zrb/builtin/version.py +3 -7
- zrb/builtin/watch_changes.py +24 -25
- zrb/config/config.py +19 -18
- zrb/helper/accessories/color.py +18 -6
- zrb/helper/accessories/icon.py +24 -3
- zrb/helper/accessories/name.py +120 -28
- zrb/helper/advertisement.py +9 -13
- zrb/helper/callable.py +2 -4
- zrb/helper/cli.py +27 -31
- zrb/helper/codemod/add_argument_to_function.py +3 -4
- zrb/helper/codemod/add_argument_to_function_call.py +4 -7
- zrb/helper/codemod/add_assert_resource.py +7 -7
- zrb/helper/codemod/add_function_call.py +3 -5
- zrb/helper/codemod/add_import_module.py +15 -26
- zrb/helper/codemod/add_key_value_to_dict.py +7 -10
- zrb/helper/codemod/add_property_to_class.py +10 -8
- zrb/helper/codemod/add_upstream_to_task.py +21 -33
- zrb/helper/codemod/append_code_to_function.py +6 -13
- zrb/helper/codemod/format_code.py +2 -1
- zrb/helper/default_env.py +25 -25
- zrb/helper/docker_compose/fetch_external_env.py +18 -18
- zrb/helper/docker_compose/file.py +5 -4
- zrb/helper/docstring.py +44 -47
- zrb/helper/env_map/fetch.py +7 -12
- zrb/helper/file/copy_tree.py +12 -17
- zrb/helper/file/match.py +6 -7
- zrb/helper/file/text.py +8 -6
- zrb/helper/git/detect_changes.py +9 -8
- zrb/helper/loader/load_module.py +14 -13
- zrb/helper/log.py +4 -3
- zrb/helper/map/conversion.py +4 -5
- zrb/helper/python_task.py +2 -4
- zrb/helper/render_data.py +25 -18
- zrb/helper/string/constant.py +2 -2
- zrb/helper/string/conversion.py +17 -16
- zrb/helper/string/jinja.py +2 -2
- zrb/helper/typecheck.py +6 -4
- zrb/helper/typing.py +10 -2
- zrb/helper/util.py +44 -40
- zrb/task/any_task.py +251 -251
- zrb/task/base_remote_cmd_task.py +76 -59
- zrb/task/base_task/base_task.py +95 -108
- zrb/task/base_task/component/base_task_model.py +73 -71
- zrb/task/base_task/component/common_task_model.py +42 -29
- zrb/task/base_task/component/pid_model.py +3 -5
- zrb/task/base_task/component/renderer.py +26 -36
- zrb/task/base_task/component/trackers.py +6 -9
- zrb/task/checker.py +14 -9
- zrb/task/cmd_task.py +102 -100
- zrb/task/decorator.py +19 -13
- zrb/task/docker_compose_task.py +127 -98
- zrb/task/flow_task.py +16 -19
- zrb/task/http_checker.py +40 -36
- zrb/task/notifier.py +50 -38
- zrb/task/parallel.py +3 -3
- zrb/task/path_checker.py +34 -27
- zrb/task/path_watcher.py +49 -40
- zrb/task/port_checker.py +33 -26
- zrb/task/recurring_task.py +36 -42
- zrb/task/remote_cmd_task.py +31 -28
- zrb/task/resource_maker.py +66 -52
- zrb/task/rsync_task.py +24 -21
- zrb/task/task.py +4 -3
- zrb/task/time_watcher.py +36 -31
- zrb/task_env/constant.py +1 -1
- zrb/task_env/env.py +33 -31
- zrb/task_env/env_file.py +24 -23
- zrb/task_group/group.py +27 -30
- zrb/task_input/any_input.py +18 -16
- zrb/task_input/base_input.py +26 -26
- zrb/task_input/bool_input.py +6 -6
- zrb/task_input/choice_input.py +11 -9
- zrb/task_input/constant.py +1 -1
- zrb/task_input/float_input.py +6 -5
- zrb/task_input/int_input.py +8 -8
- zrb/task_input/password_input.py +9 -9
- zrb/task_input/str_input.py +8 -8
- zrb/task_input/task_input.py +4 -2
- {zrb-0.6.0.dist-info → zrb-0.6.1.dist-info}/METADATA +3 -1
- {zrb-0.6.0.dist-info → zrb-0.6.1.dist-info}/RECORD +316 -315
- {zrb-0.6.0.dist-info → zrb-0.6.1.dist-info}/LICENSE +0 -0
- {zrb-0.6.0.dist-info → zrb-0.6.1.dist-info}/WHEEL +0 -0
- {zrb-0.6.0.dist-info → zrb-0.6.1.dist-info}/entry_points.txt +0 -0
@@ -1,15 +1,16 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import os
|
2
|
+
|
3
|
+
from zrb.builtin.group import dev_tool_install_group
|
3
4
|
from zrb.config.config import get_current_shell
|
4
|
-
from zrb.
|
5
|
+
from zrb.helper.file.text import read_text_file_async, write_text_file_async
|
6
|
+
from zrb.helper.typecheck import typechecked
|
7
|
+
from zrb.helper.typing import Any, Callable
|
8
|
+
from zrb.runner import runner
|
5
9
|
from zrb.task.cmd_task import CmdTask
|
6
10
|
from zrb.task.flow_task import FlowTask
|
7
|
-
from zrb.
|
11
|
+
from zrb.task.task import Task
|
8
12
|
from zrb.task_input.bool_input import BoolInput
|
9
|
-
from zrb.
|
10
|
-
from zrb.helper.file.text import read_text_file_async, write_text_file_async
|
11
|
-
from zrb.builtin.group import dev_tool_install_group
|
12
|
-
import os
|
13
|
+
from zrb.task_input.str_input import StrInput
|
13
14
|
|
14
15
|
dir_path = os.path.dirname(__file__)
|
15
16
|
current_shell = get_current_shell()
|
@@ -19,10 +20,10 @@ current_shell = get_current_shell()
|
|
19
20
|
###############################################################################
|
20
21
|
|
21
22
|
terminal_config_file_input = StrInput(
|
22
|
-
name=
|
23
|
-
shortcut=
|
24
|
-
prompt=
|
25
|
-
default=
|
23
|
+
name="config-file",
|
24
|
+
shortcut="c",
|
25
|
+
prompt="Config file",
|
26
|
+
default="~/.zshrc" if current_shell == "zsh" else "~/.bashrc",
|
26
27
|
)
|
27
28
|
|
28
29
|
###############################################################################
|
@@ -35,25 +36,24 @@ def write_config(
|
|
35
36
|
template_file: str, config_file: str, remove_old_config: bool = False
|
36
37
|
) -> Callable[..., Any]:
|
37
38
|
async def set_config(*args, **kwargs):
|
38
|
-
task: Task = kwargs.get(
|
39
|
-
rendered_config_file = os.path.expandvars(
|
40
|
-
task.render_str(config_file)
|
41
|
-
)
|
42
|
-
rendered_template_file = os.path.expandvars(
|
43
|
-
task.render_str(template_file)
|
44
|
-
)
|
39
|
+
task: Task = kwargs.get("_task")
|
40
|
+
rendered_config_file = os.path.expandvars(
|
41
|
+
os.path.expanduser(task.render_str(config_file))
|
42
|
+
)
|
43
|
+
rendered_template_file = os.path.expandvars(
|
44
|
+
os.path.expanduser(task.render_str(template_file))
|
45
|
+
)
|
45
46
|
if remove_old_config and os.path.exists(rendered_config_file):
|
46
|
-
task.print_out(f
|
47
|
+
task.print_out(f"Removing {rendered_config_file}")
|
47
48
|
os.remove(rendered_config_file)
|
48
|
-
additional_content = await read_text_file_async(
|
49
|
-
|
50
|
-
)
|
51
|
-
content = ''
|
49
|
+
additional_content = await read_text_file_async(rendered_template_file)
|
50
|
+
content = ""
|
52
51
|
if os.path.exists(rendered_config_file):
|
53
|
-
content = await read_text_file_async(rendered_config_file) +
|
52
|
+
content = await read_text_file_async(rendered_config_file) + "\n"
|
54
53
|
new_content = content + additional_content
|
55
|
-
task.print_out(f
|
54
|
+
task.print_out(f"Writing content to {rendered_config_file}")
|
56
55
|
await write_text_file_async(rendered_config_file, new_content)
|
56
|
+
|
57
57
|
return set_config
|
58
58
|
|
59
59
|
|
@@ -62,405 +62,391 @@ def write_config(
|
|
62
62
|
###############################################################################
|
63
63
|
|
64
64
|
install_gvm = FlowTask(
|
65
|
-
name=
|
65
|
+
name="gvm",
|
66
66
|
group=dev_tool_install_group,
|
67
|
-
description=
|
67
|
+
description="GVM provides interface to manage go version",
|
68
68
|
inputs=[
|
69
69
|
StrInput(
|
70
|
-
name=
|
71
|
-
description=
|
72
|
-
default=
|
70
|
+
name="go-default-version",
|
71
|
+
description="Go default version",
|
72
|
+
default="go1.21",
|
73
73
|
),
|
74
74
|
terminal_config_file_input,
|
75
75
|
],
|
76
76
|
steps=[
|
77
77
|
CmdTask(
|
78
|
-
name=
|
79
|
-
cmd_path=os.path.join(dir_path,
|
80
|
-
preexec_fn=None
|
78
|
+
name="download-gvm",
|
79
|
+
cmd_path=os.path.join(dir_path, "gvm", "download.sh"),
|
80
|
+
preexec_fn=None,
|
81
81
|
),
|
82
82
|
Task(
|
83
|
-
name=
|
83
|
+
name="configure-gvm",
|
84
84
|
run=write_config(
|
85
|
-
template_file=os.path.join(
|
86
|
-
|
87
|
-
|
88
|
-
config_file='{{input.config_file}}'
|
89
|
-
)
|
85
|
+
template_file=os.path.join(dir_path, "gvm", "resource", "config.sh"),
|
86
|
+
config_file="{{input.config_file}}",
|
87
|
+
),
|
90
88
|
),
|
91
89
|
CmdTask(
|
92
|
-
name=
|
93
|
-
cmd_path=os.path.join(dir_path,
|
94
|
-
preexec_fn=None
|
95
|
-
)
|
90
|
+
name="finalize-gvm-installation",
|
91
|
+
cmd_path=os.path.join(dir_path, "gvm", "finalize.sh"),
|
92
|
+
preexec_fn=None,
|
93
|
+
),
|
96
94
|
],
|
97
|
-
retry=0
|
95
|
+
retry=0,
|
98
96
|
)
|
99
97
|
runner.register(install_gvm)
|
100
98
|
|
101
99
|
install_pyenv = FlowTask(
|
102
|
-
name=
|
100
|
+
name="pyenv",
|
103
101
|
group=dev_tool_install_group,
|
104
|
-
description=
|
102
|
+
description="Simple Python version management",
|
105
103
|
inputs=[
|
106
104
|
StrInput(
|
107
|
-
name=
|
108
|
-
description=
|
109
|
-
default=
|
105
|
+
name="python-default-version",
|
106
|
+
description="Python default version",
|
107
|
+
default="3.10.0",
|
110
108
|
),
|
111
109
|
terminal_config_file_input,
|
112
110
|
],
|
113
111
|
steps=[
|
114
112
|
CmdTask(
|
115
|
-
name=
|
116
|
-
cmd_path=os.path.join(dir_path,
|
117
|
-
preexec_fn=None
|
113
|
+
name="download-pyenv",
|
114
|
+
cmd_path=os.path.join(dir_path, "pyenv", "download.sh"),
|
115
|
+
preexec_fn=None,
|
118
116
|
),
|
119
117
|
Task(
|
120
|
-
name=
|
118
|
+
name="configure-pyenv",
|
121
119
|
run=write_config(
|
122
|
-
template_file=os.path.join(
|
123
|
-
|
124
|
-
|
125
|
-
config_file='{{input.config_file}}'
|
126
|
-
)
|
120
|
+
template_file=os.path.join(dir_path, "pyenv", "resource", "config.sh"),
|
121
|
+
config_file="{{input.config_file}}",
|
122
|
+
),
|
127
123
|
),
|
128
124
|
CmdTask(
|
129
|
-
name=
|
130
|
-
cmd_path=os.path.join(dir_path,
|
131
|
-
preexec_fn=None
|
132
|
-
)
|
125
|
+
name="finalize-pyenv-installation",
|
126
|
+
cmd_path=os.path.join(dir_path, "pyenv", "finalize.sh"),
|
127
|
+
preexec_fn=None,
|
128
|
+
),
|
133
129
|
],
|
134
|
-
retry=0
|
130
|
+
retry=0,
|
135
131
|
)
|
136
132
|
runner.register(install_pyenv)
|
137
133
|
|
138
134
|
install_nvm = FlowTask(
|
139
|
-
name=
|
135
|
+
name="nvm",
|
140
136
|
group=dev_tool_install_group,
|
141
|
-
description=
|
137
|
+
description="NVM allows you to quickly install and use different versions of node via the command line", # noqa
|
142
138
|
inputs=[
|
143
139
|
StrInput(
|
144
|
-
name=
|
145
|
-
description=
|
146
|
-
default=
|
140
|
+
name="node-default-version",
|
141
|
+
description="Node default version",
|
142
|
+
default="node",
|
147
143
|
),
|
148
144
|
terminal_config_file_input,
|
149
145
|
],
|
150
146
|
steps=[
|
151
147
|
CmdTask(
|
152
|
-
name=
|
153
|
-
cmd_path=os.path.join(dir_path,
|
154
|
-
preexec_fn=None
|
148
|
+
name="download-nvm",
|
149
|
+
cmd_path=os.path.join(dir_path, "nvm", "download.sh"),
|
150
|
+
preexec_fn=None,
|
155
151
|
),
|
156
152
|
Task(
|
157
|
-
name=
|
153
|
+
name="configure-nvm",
|
158
154
|
run=write_config(
|
159
|
-
template_file=os.path.join(
|
160
|
-
|
161
|
-
|
162
|
-
config_file='{{input.config_file}}'
|
163
|
-
)
|
155
|
+
template_file=os.path.join(dir_path, "nvm", "resource", "config.sh"),
|
156
|
+
config_file="{{input.config_file}}",
|
157
|
+
),
|
164
158
|
),
|
165
159
|
CmdTask(
|
166
|
-
name=
|
167
|
-
cmd_path=os.path.join(dir_path,
|
168
|
-
preexec_fn=None
|
169
|
-
)
|
160
|
+
name="finalize-nvm-installation",
|
161
|
+
cmd_path=os.path.join(dir_path, "nvm", "finalize.sh"),
|
162
|
+
preexec_fn=None,
|
163
|
+
),
|
170
164
|
],
|
171
|
-
retry=0
|
165
|
+
retry=0,
|
172
166
|
)
|
173
167
|
runner.register(install_nvm)
|
174
168
|
|
175
169
|
install_sdkman = FlowTask(
|
176
|
-
name=
|
170
|
+
name="sdkman",
|
177
171
|
group=dev_tool_install_group,
|
178
|
-
description=
|
172
|
+
description="SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems", # noqa
|
179
173
|
inputs=[
|
180
174
|
BoolInput(
|
181
|
-
name=
|
182
|
-
description=
|
183
|
-
prompt=
|
184
|
-
default=True
|
175
|
+
name="install-java",
|
176
|
+
description="Install Java",
|
177
|
+
prompt="Do you want to install Java?",
|
178
|
+
default=True,
|
185
179
|
),
|
186
180
|
BoolInput(
|
187
|
-
name=
|
188
|
-
description=
|
189
|
-
prompt=
|
190
|
-
default=True
|
181
|
+
name="install-scala",
|
182
|
+
description="Install Scala",
|
183
|
+
prompt="Do you want to install Scala?",
|
184
|
+
default=True,
|
191
185
|
),
|
192
186
|
terminal_config_file_input,
|
193
187
|
],
|
194
188
|
steps=[
|
195
189
|
CmdTask(
|
196
|
-
name=
|
197
|
-
cmd_path=os.path.join(dir_path,
|
198
|
-
preexec_fn=None
|
190
|
+
name="download-sdkman",
|
191
|
+
cmd_path=os.path.join(dir_path, "sdkman", "download.sh"),
|
192
|
+
preexec_fn=None,
|
199
193
|
),
|
200
194
|
Task(
|
201
|
-
name=
|
195
|
+
name="configure-sdkman",
|
202
196
|
run=write_config(
|
203
|
-
template_file=os.path.join(
|
204
|
-
|
205
|
-
|
206
|
-
config_file='{{input.config_file}}'
|
207
|
-
)
|
197
|
+
template_file=os.path.join(dir_path, "sdkman", "resource", "config.sh"),
|
198
|
+
config_file="{{input.config_file}}",
|
199
|
+
),
|
208
200
|
),
|
209
201
|
CmdTask(
|
210
|
-
name=
|
211
|
-
cmd_path=os.path.join(dir_path,
|
212
|
-
preexec_fn=None
|
213
|
-
)
|
202
|
+
name="finalize-sdkman-installation",
|
203
|
+
cmd_path=os.path.join(dir_path, "sdkman", "finalize.sh"),
|
204
|
+
preexec_fn=None,
|
205
|
+
),
|
214
206
|
],
|
215
|
-
retry=0
|
207
|
+
retry=0,
|
216
208
|
)
|
217
209
|
runner.register(install_sdkman)
|
218
210
|
|
219
211
|
install_pulumi = FlowTask(
|
220
|
-
name=
|
212
|
+
name="pulumi",
|
221
213
|
group=dev_tool_install_group,
|
222
|
-
description=
|
214
|
+
description="Universal infrastructure as code",
|
223
215
|
inputs=[terminal_config_file_input],
|
224
216
|
steps=[
|
225
217
|
CmdTask(
|
226
|
-
name=
|
227
|
-
cmd_path=os.path.join(dir_path,
|
228
|
-
preexec_fn=None
|
218
|
+
name="install-pulumi",
|
219
|
+
cmd_path=os.path.join(dir_path, "pulumi", "install.sh"),
|
220
|
+
preexec_fn=None,
|
229
221
|
),
|
230
222
|
Task(
|
231
|
-
name=
|
223
|
+
name="configure-pulumi",
|
232
224
|
run=write_config(
|
233
|
-
template_file=os.path.join(
|
234
|
-
|
235
|
-
|
236
|
-
config_file='{{input.config_file}}'
|
237
|
-
)
|
225
|
+
template_file=os.path.join(dir_path, "pulumi", "resource", "config.sh"),
|
226
|
+
config_file="{{input.config_file}}",
|
227
|
+
),
|
238
228
|
),
|
239
229
|
],
|
240
|
-
retry=0
|
230
|
+
retry=0,
|
241
231
|
)
|
242
232
|
runner.register(install_pulumi)
|
243
233
|
|
244
234
|
install_aws = FlowTask(
|
245
|
-
name=
|
235
|
+
name="aws",
|
246
236
|
group=dev_tool_install_group,
|
247
|
-
description=
|
237
|
+
description="AWS CLI",
|
248
238
|
steps=[
|
249
239
|
CmdTask(
|
250
|
-
name=
|
251
|
-
cmd_path=os.path.join(dir_path,
|
252
|
-
preexec_fn=None
|
240
|
+
name="install-aws",
|
241
|
+
cmd_path=os.path.join(dir_path, "aws", "install.sh"),
|
242
|
+
preexec_fn=None,
|
253
243
|
),
|
254
244
|
],
|
255
|
-
retry=0
|
245
|
+
retry=0,
|
256
246
|
)
|
257
247
|
runner.register(install_aws)
|
258
248
|
|
259
249
|
install_gcloud = FlowTask(
|
260
|
-
name=
|
250
|
+
name="gcloud",
|
261
251
|
group=dev_tool_install_group,
|
262
|
-
description=
|
252
|
+
description="Gcloud CLI",
|
263
253
|
steps=[
|
264
254
|
CmdTask(
|
265
|
-
name=
|
266
|
-
cmd_path=os.path.join(dir_path,
|
267
|
-
preexec_fn=None
|
255
|
+
name="install-gcloud",
|
256
|
+
cmd_path=os.path.join(dir_path, "gcloud", "install.sh"),
|
257
|
+
preexec_fn=None,
|
268
258
|
),
|
269
259
|
],
|
270
|
-
retry=0
|
260
|
+
retry=0,
|
271
261
|
)
|
272
262
|
runner.register(install_gcloud)
|
273
263
|
|
274
264
|
install_tmux = FlowTask(
|
275
|
-
name=
|
265
|
+
name="tmux",
|
276
266
|
group=dev_tool_install_group,
|
277
|
-
description=
|
267
|
+
description="Terminal multiplexer",
|
278
268
|
inputs=[
|
279
269
|
StrInput(
|
280
|
-
name=
|
281
|
-
shortcut=
|
282
|
-
prompt=
|
283
|
-
default=
|
270
|
+
name="tmux-config-file",
|
271
|
+
shortcut="c",
|
272
|
+
prompt="Tmux config file",
|
273
|
+
default="~/.tmux.conf",
|
284
274
|
)
|
285
275
|
],
|
286
276
|
steps=[
|
287
277
|
CmdTask(
|
288
|
-
name=
|
289
|
-
cmd_path=os.path.join(dir_path,
|
290
|
-
preexec_fn=None
|
278
|
+
name="install-tmux",
|
279
|
+
cmd_path=os.path.join(dir_path, "tmux", "install.sh"),
|
280
|
+
preexec_fn=None,
|
291
281
|
),
|
292
282
|
Task(
|
293
|
-
name=
|
283
|
+
name="configure-tmux",
|
294
284
|
run=write_config(
|
295
|
-
template_file=os.path.join(
|
296
|
-
|
297
|
-
|
298
|
-
config_file='{{input.tmux_config_file}}'
|
299
|
-
)
|
285
|
+
template_file=os.path.join(dir_path, "tmux", "resource", "config.sh"),
|
286
|
+
config_file="{{input.tmux_config_file}}",
|
287
|
+
),
|
300
288
|
),
|
301
289
|
],
|
302
|
-
retry=0
|
290
|
+
retry=0,
|
303
291
|
)
|
304
292
|
runner.register(install_tmux)
|
305
293
|
|
306
294
|
install_zsh = FlowTask(
|
307
|
-
name=
|
295
|
+
name="zsh",
|
308
296
|
group=dev_tool_install_group,
|
309
|
-
description=
|
297
|
+
description="Zsh terminal + oh-my-zsh + zdharma",
|
310
298
|
inputs=[
|
311
299
|
StrInput(
|
312
|
-
name=
|
313
|
-
shortcut=
|
314
|
-
prompt=
|
315
|
-
default=
|
300
|
+
name="zsh-config-file",
|
301
|
+
shortcut="c",
|
302
|
+
prompt="Zsh config file",
|
303
|
+
default="~/.zshrc",
|
316
304
|
)
|
317
305
|
],
|
318
306
|
steps=[
|
319
307
|
CmdTask(
|
320
|
-
name=
|
321
|
-
cmd_path=os.path.join(dir_path,
|
322
|
-
preexec_fn=None
|
308
|
+
name="install-zsh",
|
309
|
+
cmd_path=os.path.join(dir_path, "zsh", "install.sh"),
|
310
|
+
preexec_fn=None,
|
323
311
|
),
|
324
312
|
Task(
|
325
|
-
name=
|
313
|
+
name="configure-zsh",
|
326
314
|
run=write_config(
|
327
|
-
template_file=os.path.join(
|
328
|
-
|
329
|
-
|
330
|
-
config_file='{{input.zsh_config_file}}'
|
331
|
-
)
|
315
|
+
template_file=os.path.join(dir_path, "zsh", "resource", "config.sh"),
|
316
|
+
config_file="{{input.zsh_config_file}}",
|
317
|
+
),
|
332
318
|
),
|
333
319
|
],
|
334
|
-
retry=0
|
320
|
+
retry=0,
|
335
321
|
)
|
336
322
|
runner.register(install_zsh)
|
337
323
|
|
338
324
|
install_kubectl = FlowTask(
|
339
|
-
name=
|
325
|
+
name="kubectl",
|
340
326
|
group=dev_tool_install_group,
|
341
|
-
description=
|
327
|
+
description="Kubernetes CLI tool",
|
342
328
|
steps=[
|
343
329
|
CmdTask(
|
344
|
-
name=
|
345
|
-
cmd_path=os.path.join(dir_path,
|
346
|
-
preexec_fn=None
|
330
|
+
name="install-kubectl",
|
331
|
+
cmd_path=os.path.join(dir_path, "kubectl", "install.sh"),
|
332
|
+
preexec_fn=None,
|
347
333
|
),
|
348
334
|
],
|
349
|
-
retry=0
|
335
|
+
retry=0,
|
350
336
|
)
|
351
337
|
runner.register(install_kubectl)
|
352
338
|
|
353
339
|
install_helm = FlowTask(
|
354
|
-
name=
|
340
|
+
name="helm",
|
355
341
|
group=dev_tool_install_group,
|
356
|
-
description=
|
342
|
+
description="Package manager for kubernetes",
|
357
343
|
steps=[
|
358
344
|
CmdTask(
|
359
|
-
name=
|
360
|
-
cmd_path=os.path.join(dir_path,
|
361
|
-
preexec_fn=None
|
345
|
+
name="install-helm",
|
346
|
+
cmd_path=os.path.join(dir_path, "helm", "install.sh"),
|
347
|
+
preexec_fn=None,
|
362
348
|
),
|
363
349
|
],
|
364
|
-
retry=0
|
350
|
+
retry=0,
|
365
351
|
)
|
366
352
|
runner.register(install_helm)
|
367
353
|
|
368
354
|
install_docker = FlowTask(
|
369
|
-
name=
|
355
|
+
name="docker",
|
370
356
|
group=dev_tool_install_group,
|
371
|
-
description=
|
357
|
+
description="Most popular containerization platform",
|
372
358
|
steps=[
|
373
359
|
CmdTask(
|
374
|
-
name=
|
375
|
-
cmd_path=os.path.join(dir_path,
|
376
|
-
preexec_fn=None
|
360
|
+
name="install-docker",
|
361
|
+
cmd_path=os.path.join(dir_path, "docker", "install.sh"),
|
362
|
+
preexec_fn=None,
|
377
363
|
),
|
378
364
|
],
|
379
|
-
retry=0
|
365
|
+
retry=0,
|
380
366
|
)
|
381
367
|
runner.register(install_docker)
|
382
368
|
|
383
369
|
install_terraform = FlowTask(
|
384
|
-
name=
|
370
|
+
name="terraform",
|
385
371
|
group=dev_tool_install_group,
|
386
|
-
description=
|
387
|
-
inputs=[
|
388
|
-
terminal_config_file_input
|
389
|
-
],
|
372
|
+
description="Open source IAC by Hashicorp",
|
373
|
+
inputs=[terminal_config_file_input],
|
390
374
|
steps=[
|
391
375
|
CmdTask(
|
392
|
-
name=
|
393
|
-
cmd_path=os.path.join(dir_path,
|
394
|
-
preexec_fn=None
|
376
|
+
name="install-terraform",
|
377
|
+
cmd_path=os.path.join(dir_path, "terraform", "install.sh"),
|
378
|
+
preexec_fn=None,
|
395
379
|
),
|
396
380
|
Task(
|
397
|
-
name=
|
381
|
+
name="configure-terraform",
|
398
382
|
run=write_config(
|
399
383
|
template_file=os.path.join(
|
400
|
-
dir_path,
|
384
|
+
dir_path, "terraform", "resource", "config.sh"
|
401
385
|
),
|
402
|
-
config_file=
|
403
|
-
)
|
386
|
+
config_file="{{input.config_file}}",
|
387
|
+
),
|
404
388
|
),
|
405
389
|
],
|
406
|
-
retry=0
|
390
|
+
retry=0,
|
407
391
|
)
|
408
392
|
runner.register(install_terraform)
|
409
393
|
|
410
394
|
install_helix = FlowTask(
|
411
|
-
name=
|
395
|
+
name="helix",
|
412
396
|
group=dev_tool_install_group,
|
413
|
-
description=
|
397
|
+
description="Post modern text editor",
|
414
398
|
steps=[
|
415
399
|
CmdTask(
|
416
|
-
name=
|
417
|
-
cmd_path=os.path.join(dir_path,
|
418
|
-
preexec_fn=None
|
400
|
+
name="install-helix",
|
401
|
+
cmd_path=os.path.join(dir_path, "helix", "install.sh"),
|
402
|
+
preexec_fn=None,
|
419
403
|
),
|
420
404
|
[
|
421
405
|
Task(
|
422
|
-
name=
|
406
|
+
name="create-helix-theme",
|
423
407
|
run=write_config(
|
424
408
|
template_file=os.path.join(
|
425
|
-
dir_path,
|
409
|
+
dir_path,
|
410
|
+
"helix",
|
411
|
+
"resource",
|
412
|
+
"themes",
|
413
|
+
"gruvbox_transparent.toml", # noqa
|
426
414
|
),
|
427
|
-
config_file=
|
428
|
-
remove_old_config=True
|
429
|
-
)
|
415
|
+
config_file="~/.config/helix/themes/gruvbox_transparent.toml", # noqa
|
416
|
+
remove_old_config=True,
|
417
|
+
),
|
430
418
|
),
|
431
419
|
Task(
|
432
|
-
name=
|
420
|
+
name="configure-helix",
|
433
421
|
run=write_config(
|
434
422
|
template_file=os.path.join(
|
435
|
-
dir_path,
|
423
|
+
dir_path, "helix", "resource", "config.toml"
|
436
424
|
),
|
437
|
-
config_file=
|
438
|
-
remove_old_config=True
|
439
|
-
)
|
425
|
+
config_file="~/.config/helix/config.toml",
|
426
|
+
remove_old_config=True,
|
427
|
+
),
|
440
428
|
),
|
441
429
|
CmdTask(
|
442
|
-
name=
|
443
|
-
cmd_path=os.path.join(
|
444
|
-
|
445
|
-
),
|
446
|
-
preexec_fn=None
|
430
|
+
name="install-language-server",
|
431
|
+
cmd_path=os.path.join(dir_path, "helix", "install-language-server.sh"),
|
432
|
+
preexec_fn=None,
|
447
433
|
),
|
448
434
|
],
|
449
435
|
],
|
450
|
-
retry=0
|
436
|
+
retry=0,
|
451
437
|
)
|
452
438
|
runner.register(install_helix)
|
453
439
|
|
454
440
|
install_selenium = FlowTask(
|
455
|
-
name=
|
441
|
+
name="selenium",
|
456
442
|
group=dev_tool_install_group,
|
457
|
-
description=
|
443
|
+
description="Selenium + Chrome web driver",
|
458
444
|
steps=[
|
459
445
|
CmdTask(
|
460
|
-
name=
|
461
|
-
cmd_path=os.path.join(dir_path,
|
462
|
-
preexec_fn=None
|
446
|
+
name="install-selenium",
|
447
|
+
cmd_path=os.path.join(dir_path, "selenium", "install.sh"),
|
448
|
+
preexec_fn=None,
|
463
449
|
)
|
464
|
-
]
|
450
|
+
],
|
465
451
|
)
|
466
452
|
runner.register(install_selenium)
|