stoobly-agent 1.10.1__py3-none-any.whl → 1.10.2__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.
- stoobly_agent/__init__.py +1 -1
- stoobly_agent/__main__.py +10 -0
- stoobly_agent/app/cli/ca_cert_cli.py +9 -5
- stoobly_agent/app/cli/helpers/replay_facade.py +2 -2
- stoobly_agent/app/cli/intercept_cli.py +5 -5
- stoobly_agent/app/cli/request_cli.py +2 -2
- stoobly_agent/app/cli/scaffold/app.py +14 -5
- stoobly_agent/app/cli/scaffold/app_command.py +0 -4
- stoobly_agent/app/cli/scaffold/app_config.py +49 -2
- stoobly_agent/app/cli/scaffold/app_create_command.py +145 -76
- stoobly_agent/app/cli/scaffold/constants.py +8 -1
- stoobly_agent/app/cli/scaffold/docker/constants.py +3 -1
- stoobly_agent/app/cli/scaffold/docker/service/build_decorator.py +2 -2
- stoobly_agent/app/cli/scaffold/docker/service/builder.py +15 -49
- stoobly_agent/app/cli/scaffold/docker/service/configure_gateway.py +3 -0
- stoobly_agent/app/cli/scaffold/docker/template_files.py +112 -0
- stoobly_agent/app/cli/scaffold/docker/workflow/build_decorator.py +1 -1
- stoobly_agent/app/cli/scaffold/docker/workflow/builder.py +31 -39
- stoobly_agent/app/cli/scaffold/docker/workflow/command_decorator.py +1 -1
- stoobly_agent/app/cli/scaffold/docker/workflow/detached_decorator.py +1 -1
- stoobly_agent/app/cli/scaffold/docker/workflow/dns_decorator.py +2 -3
- stoobly_agent/app/cli/scaffold/docker/workflow/local_decorator.py +1 -1
- stoobly_agent/app/cli/scaffold/docker/workflow/mock_decorator.py +1 -1
- stoobly_agent/app/cli/scaffold/docker/workflow/reverse_proxy_decorator.py +1 -1
- stoobly_agent/app/cli/scaffold/docker/workflow/run_command.py +423 -0
- stoobly_agent/app/cli/scaffold/local/__init__.py +0 -0
- stoobly_agent/app/cli/scaffold/local/service/__init__.py +0 -0
- stoobly_agent/app/cli/scaffold/local/service/builder.py +72 -0
- stoobly_agent/app/cli/scaffold/local/workflow/__init__.py +0 -0
- stoobly_agent/app/cli/scaffold/local/workflow/builder.py +35 -0
- stoobly_agent/app/cli/scaffold/local/workflow/run_command.py +339 -0
- stoobly_agent/app/cli/scaffold/service_command.py +9 -1
- stoobly_agent/app/cli/scaffold/service_config.py +8 -0
- stoobly_agent/app/cli/scaffold/service_create_command.py +18 -6
- stoobly_agent/app/cli/scaffold/service_docker_compose.py +1 -1
- stoobly_agent/app/cli/scaffold/templates/app/.Makefile +2 -2
- stoobly_agent/app/cli/scaffold/templates/app/build/.docker-compose.base.yml +2 -2
- stoobly_agent/app/cli/scaffold/templates/app/entrypoint/.docker-compose.base.yml +2 -2
- stoobly_agent/app/cli/scaffold/templates/app/entrypoint/mock/run +3 -0
- stoobly_agent/app/cli/scaffold/templates/app/entrypoint/record/run +3 -0
- stoobly_agent/app/cli/scaffold/templates/app/entrypoint/test/run +3 -0
- stoobly_agent/app/cli/scaffold/templates/build/services/build/mock/.configure +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/build/mock/.init +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/build/mock/.run +14 -0
- stoobly_agent/app/cli/scaffold/templates/build/services/build/record/.configure +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/build/record/.init +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/build/record/.run +14 -0
- stoobly_agent/app/cli/scaffold/templates/build/services/build/test/.configure +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/build/test/.init +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/build/test/.run +14 -0
- stoobly_agent/app/cli/scaffold/templates/build/services/entrypoint/mock/.configure +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/entrypoint/mock/.init +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/entrypoint/mock/.run +19 -0
- stoobly_agent/app/cli/scaffold/templates/build/services/entrypoint/record/.configure +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/entrypoint/record/.init +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/entrypoint/record/.run +19 -0
- stoobly_agent/app/cli/scaffold/templates/build/services/entrypoint/test/.configure +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/entrypoint/test/.init +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/services/entrypoint/test/.run +19 -0
- stoobly_agent/app/cli/scaffold/templates/build/workflows/exec/scaffold/.up +0 -1
- stoobly_agent/app/cli/scaffold/templates/build/workflows/mock/.configure +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/workflows/mock/.init +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/workflows/mock/.run +14 -0
- stoobly_agent/app/cli/scaffold/templates/build/workflows/record/.configure +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/workflows/record/.init +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/workflows/record/.run +14 -0
- stoobly_agent/app/cli/scaffold/templates/build/workflows/test/.configure +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/workflows/test/.init +5 -1
- stoobly_agent/app/cli/scaffold/templates/build/workflows/test/.run +14 -0
- stoobly_agent/app/cli/scaffold/templates/constants.py +35 -19
- stoobly_agent/app/cli/scaffold/templates/factory.py +34 -18
- stoobly_agent/app/cli/scaffold/templates/plugins/cypress/test/.run +21 -0
- stoobly_agent/app/cli/scaffold/templates/plugins/playwright/test/.run +21 -0
- stoobly_agent/app/cli/scaffold/templates/workflow/mock/run +3 -0
- stoobly_agent/app/cli/scaffold/templates/workflow/record/run +3 -0
- stoobly_agent/app/cli/scaffold/templates/workflow/test/run +3 -0
- stoobly_agent/app/cli/scaffold/workflow_command.py +18 -4
- stoobly_agent/app/cli/scaffold/workflow_copy_command.py +5 -4
- stoobly_agent/app/cli/scaffold/workflow_create_command.py +31 -29
- stoobly_agent/app/cli/scaffold/workflow_run_command.py +18 -151
- stoobly_agent/app/cli/scaffold_cli.py +115 -161
- stoobly_agent/app/cli/scenario_cli.py +2 -2
- stoobly_agent/app/cli/types/test.py +2 -2
- stoobly_agent/app/cli/types/workflow_run_command.py +52 -3
- stoobly_agent/app/proxy/handle_mock_service.py +1 -1
- stoobly_agent/app/proxy/intercept_settings.py +5 -25
- stoobly_agent/app/proxy/mock/eval_fixtures_service.py +177 -27
- stoobly_agent/app/proxy/mock/types/__init__.py +22 -1
- stoobly_agent/app/proxy/replay/body_parser_service.py +8 -5
- stoobly_agent/app/proxy/replay/multipart.py +15 -13
- stoobly_agent/app/proxy/replay/replay_request_service.py +2 -2
- stoobly_agent/app/proxy/run.py +3 -0
- stoobly_agent/app/proxy/test/context.py +0 -4
- stoobly_agent/app/proxy/test/context_abc.py +0 -5
- stoobly_agent/cli.py +61 -16
- stoobly_agent/config/data_dir.py +0 -8
- stoobly_agent/public/12-es2015.618ecfd5f735b801b50f.js +1 -0
- stoobly_agent/public/12-es5.618ecfd5f735b801b50f.js +1 -0
- stoobly_agent/public/index.html +1 -1
- stoobly_agent/public/runtime-es2015.77bcd31efed9e5d5d431.js +1 -0
- stoobly_agent/public/runtime-es5.77bcd31efed9e5d5d431.js +1 -0
- stoobly_agent/test/app/cli/intercept/intercept_configure_test.py +17 -6
- stoobly_agent/test/app/cli/scaffold/docker/cli_invoker.py +177 -0
- stoobly_agent/test/app/cli/scaffold/{cli_test.py → docker/cli_test.py} +1 -8
- stoobly_agent/test/app/cli/scaffold/{e2e_test.py → docker/e2e_test.py} +31 -16
- stoobly_agent/test/app/cli/scaffold/local/__init__.py +0 -0
- stoobly_agent/test/app/cli/scaffold/{cli_invoker.py → local/cli_invoker.py} +38 -32
- stoobly_agent/test/app/cli/scaffold/local/e2e_test.py +342 -0
- stoobly_agent/test/app/models/schemas/.stoobly/db/VERSION +1 -1
- stoobly_agent/test/app/proxy/mock/eval_fixtures_service_test.py +903 -2
- stoobly_agent/test/app/proxy/replay/body_parser_service_test.py +95 -3
- stoobly_agent/test/config/data_dir_test.py +2 -7
- stoobly_agent/test/test_helper.py +16 -5
- {stoobly_agent-1.10.1.dist-info → stoobly_agent-1.10.2.dist-info}/METADATA +4 -2
- {stoobly_agent-1.10.1.dist-info → stoobly_agent-1.10.2.dist-info}/RECORD +150 -122
- {stoobly_agent-1.10.1.dist-info → stoobly_agent-1.10.2.dist-info}/WHEEL +1 -1
- stoobly_agent/app/cli/helpers/shell.py +0 -26
- stoobly_agent/public/12-es2015.be58ed0ef449008b932e.js +0 -1
- stoobly_agent/public/12-es5.be58ed0ef449008b932e.js +0 -1
- stoobly_agent/public/runtime-es2015.f8c814b38b27708e91c1.js +0 -1
- stoobly_agent/public/runtime-es5.f8c814b38b27708e91c1.js +0 -1
- /stoobly_agent/app/cli/scaffold/templates/app/build/mock/{.docker-compose.mock.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/build/mock/{bin/configure → configure} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/build/mock/{bin/init → init} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/build/record/{.docker-compose.record.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/build/record/{bin/configure → configure} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/build/record/{bin/init → init} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/build/test/{.docker-compose.test.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/build/test/{bin/configure → configure} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/build/test/{bin/init → init} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/entrypoint/mock/{.docker-compose.mock.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/entrypoint/mock/{bin/configure → configure} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/entrypoint/mock/{bin/init → init} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/entrypoint/record/{.docker-compose.record.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/entrypoint/record/{bin/configure → configure} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/entrypoint/record/{bin/init → init} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/entrypoint/test/{.docker-compose.test.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/entrypoint/test/{bin/configure → configure} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/entrypoint/test/{bin/init → init} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/gateway/mock/{.docker-compose.mock.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/gateway/record/{.docker-compose.record.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/gateway/test/{.docker-compose.test.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/exec/{.docker-compose.exec.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/mock/{.docker-compose.mock.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/record/{.docker-compose.record.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/plugins/cypress/test/{.docker-compose.test.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/plugins/playwright/test/{.docker-compose.test.yml → .docker-compose.yml} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/workflow/mock/{bin/configure → configure} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/workflow/mock/{bin/init → init} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/workflow/record/{bin/configure → configure} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/workflow/record/{bin/init → init} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/workflow/test/{bin/configure → configure} +0 -0
- /stoobly_agent/app/cli/scaffold/templates/workflow/test/{bin/init → init} +0 -0
- {stoobly_agent-1.10.1.dist-info → stoobly_agent-1.10.2.dist-info}/entry_points.txt +0 -0
- {stoobly_agent-1.10.1.dist-info → stoobly_agent-1.10.2.dist-info/licenses}/LICENSE +0 -0
@@ -3,8 +3,12 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
entrypoint=$1
|
7
11
|
|
8
12
|
if [ -e "$entrypoint" ]; then
|
9
|
-
"$entrypoint"
|
13
|
+
./"$entrypoint"
|
10
14
|
fi
|
@@ -3,8 +3,12 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
entrypoint=$1
|
7
11
|
|
8
12
|
if [ -e "$entrypoint" ]; then
|
9
|
-
"$entrypoint" /app
|
13
|
+
./"$entrypoint" /app
|
10
14
|
fi
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
10
|
+
export HTTP_PROXY=http://localhost:$APP_PROXY_PORT
|
11
|
+
export http_proxy=http://localhost:$APP_PROXY_PORT
|
12
|
+
export HTTPS_PROXY=http://localhost:$APP_PROXY_PORT
|
13
|
+
export https_proxy=http://localhost:$APP_PROXY_PORT
|
14
|
+
|
15
|
+
entrypoint=$1
|
16
|
+
|
17
|
+
if [ -e "$entrypoint" ]; then
|
18
|
+
./"$entrypoint"
|
19
|
+
fi
|
@@ -3,8 +3,12 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
entrypoint=$1
|
7
11
|
|
8
12
|
if [ -e "$entrypoint" ]; then
|
9
|
-
"$entrypoint"
|
13
|
+
./"$entrypoint"
|
10
14
|
fi
|
@@ -3,8 +3,12 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
entrypoint=$1
|
7
11
|
|
8
12
|
if [ -e "$entrypoint" ]; then
|
9
|
-
"$entrypoint" /app
|
13
|
+
./"$entrypoint" /app
|
10
14
|
fi
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
10
|
+
export HTTP_PROXY=http://localhost:$APP_PROXY_PORT
|
11
|
+
export http_proxy=http://localhost:$APP_PROXY_PORT
|
12
|
+
export HTTPS_PROXY=http://localhost:$APP_PROXY_PORT
|
13
|
+
export https_proxy=http://localhost:$APP_PROXY_PORT
|
14
|
+
|
15
|
+
entrypoint=$1
|
16
|
+
|
17
|
+
if [ -e "$entrypoint" ]; then
|
18
|
+
./"$entrypoint"
|
19
|
+
fi
|
@@ -3,8 +3,12 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
entrypoint=$1
|
7
11
|
|
8
12
|
if [ -e "$entrypoint" ]; then
|
9
|
-
"$entrypoint"
|
13
|
+
./"$entrypoint"
|
10
14
|
fi
|
@@ -3,8 +3,12 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
entrypoint=$1
|
7
11
|
|
8
12
|
if [ -e "$entrypoint" ]; then
|
9
|
-
"$entrypoint" /app
|
13
|
+
./"$entrypoint" /app
|
10
14
|
fi
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
10
|
+
export HTTP_PROXY=http://localhost:$APP_PROXY_PORT
|
11
|
+
export http_proxy=http://localhost:$APP_PROXY_PORT
|
12
|
+
export HTTPS_PROXY=http://localhost:$APP_PROXY_PORT
|
13
|
+
export https_proxy=http://localhost:$APP_PROXY_PORT
|
14
|
+
|
15
|
+
entrypoint=$1
|
16
|
+
|
17
|
+
if [ -e "$entrypoint" ]; then
|
18
|
+
./"$entrypoint"
|
19
|
+
fi
|
@@ -3,8 +3,12 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
entrypoint=$1
|
7
11
|
|
8
12
|
if [ -e "$entrypoint" ]; then
|
9
|
-
"$entrypoint"
|
13
|
+
./"$entrypoint"
|
10
14
|
fi
|
@@ -3,11 +3,15 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
if [ -n "$SERVICE_HOSTNAME" ] && [ "$SERVICE_SCHEME" = "https" ]; then
|
7
11
|
stoobly-agent ca-cert mkcert $SERVICE_HOSTNAME
|
8
12
|
fi
|
9
13
|
|
10
14
|
entrypoint=$1
|
11
15
|
if [ -e "$entrypoint" ]; then
|
12
|
-
"$entrypoint" /app
|
16
|
+
./"$entrypoint" /app
|
13
17
|
fi
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
10
|
+
entrypoint=$1
|
11
|
+
|
12
|
+
if [ -e "$entrypoint" ]; then
|
13
|
+
./"$entrypoint"
|
14
|
+
fi
|
@@ -3,6 +3,10 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
entrypoint=$1
|
7
11
|
|
8
12
|
port=$SERVICE_PORT
|
@@ -26,5 +30,5 @@ if [ "$service_origin" != "$upstream_origin" ] && [ "$SERVICE_UPSTREAM_HOSTNAME"
|
|
26
30
|
fi
|
27
31
|
|
28
32
|
if [ -e "$entrypoint" ]; then
|
29
|
-
"$entrypoint" "$service_origin"
|
33
|
+
./"$entrypoint" "$service_origin"
|
30
34
|
fi
|
@@ -3,11 +3,15 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
if [ -n "$SERVICE_HOSTNAME" ] && [ "$SERVICE_SCHEME" = "https" ] ; then
|
7
11
|
stoobly-agent ca-cert mkcert $SERVICE_HOSTNAME
|
8
12
|
fi
|
9
13
|
|
10
14
|
entrypoint=$1
|
11
15
|
if [ -e "$entrypoint" ]; then
|
12
|
-
"$entrypoint" /app
|
16
|
+
./"$entrypoint" /app
|
13
17
|
fi
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
10
|
+
entrypoint=$1
|
11
|
+
|
12
|
+
if [ -e "$entrypoint" ]; then
|
13
|
+
./"$entrypoint"
|
14
|
+
fi
|
@@ -3,8 +3,12 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
entrypoint=$1
|
7
11
|
|
8
12
|
if [ -e "$entrypoint" ]; then
|
9
|
-
"$entrypoint"
|
13
|
+
./"$entrypoint"
|
10
14
|
fi
|
@@ -3,11 +3,15 @@
|
|
3
3
|
# This file was automatically generated. DO NOT EDIT.
|
4
4
|
# Any changes made to this file will be overwritten.
|
5
5
|
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
6
10
|
if [ -n "$SERVICE_HOSTNAME" ] && [ "$SERVICE_SCHEME" = "https" ]; then
|
7
11
|
stoobly-agent ca-cert mkcert $SERVICE_HOSTNAME
|
8
12
|
fi
|
9
13
|
|
10
14
|
entrypoint=$1
|
11
15
|
if [ -e "$entrypoint" ]; then
|
12
|
-
"$entrypoint" /app
|
16
|
+
./"$entrypoint" /app
|
13
17
|
fi
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
10
|
+
entrypoint=$1
|
11
|
+
|
12
|
+
if [ -e "$entrypoint" ]; then
|
13
|
+
./"$entrypoint"
|
14
|
+
fi
|
@@ -1,5 +1,7 @@
|
|
1
1
|
import os
|
2
2
|
|
3
|
+
from stoobly_agent.app.cli.scaffold.constants import FIXTURES_FILE_NAME, PUBLIC_FOLDER_NAME
|
4
|
+
|
3
5
|
CORE_BUILD_SERVICE_NAME = 'build'
|
4
6
|
CORE_ENTRYPOINT_SERVICE_NAME = 'entrypoint'
|
5
7
|
CORE_GATEWAY_SERVICE_NAME = 'gateway'
|
@@ -12,56 +14,70 @@ CORE_MOCK_WORKFLOW = 'mock'
|
|
12
14
|
CORE_RECORD_WORKFLOW = 'record'
|
13
15
|
|
14
16
|
CUSTOM_BUILD = os.path.join('bin', 'build')
|
15
|
-
CUSTOM_CONFIGURE =
|
17
|
+
CUSTOM_CONFIGURE = 'configure'
|
16
18
|
CUSTOM_DOCKER_COMPOSE = 'docker-compose.yml'
|
17
|
-
CUSTOM_INIT =
|
18
|
-
CUSTOM_FIXTURES =
|
19
|
+
CUSTOM_INIT = 'init'
|
20
|
+
CUSTOM_FIXTURES = FIXTURES_FILE_NAME
|
19
21
|
CUSTOM_LIFECYCLE_HOOKS = os.path.join('lifecycle_hooks.py')
|
20
|
-
CUSTOM_PUBLIC_GITIGNORE = os.path.join(
|
21
|
-
|
22
|
-
|
22
|
+
CUSTOM_PUBLIC_GITIGNORE = os.path.join(PUBLIC_FOLDER_NAME, '.gitignore')
|
23
|
+
CUSTOM_RUN = 'run'
|
24
|
+
MAINTAINED_CONFIGURE = '.configure'
|
25
|
+
MAINTAINED_INIT = '.init'
|
26
|
+
MAINTAINED_RUN = '.run'
|
23
27
|
|
24
|
-
MOCK_WORKFLOW_MAINTAINED_FILES = [
|
25
|
-
MAINTAINED_CONFIGURE,
|
26
|
-
MAINTAINED_INIT,
|
27
|
-
]
|
28
|
+
MOCK_WORKFLOW_MAINTAINED_FILES = []
|
28
29
|
|
29
30
|
MOCK_WORKFLOW_CUSTOM_FILES = [
|
30
31
|
CUSTOM_BUILD,
|
31
32
|
CUSTOM_CONFIGURE,
|
32
|
-
CUSTOM_DOCKER_COMPOSE,
|
33
33
|
CUSTOM_FIXTURES,
|
34
34
|
CUSTOM_INIT,
|
35
35
|
CUSTOM_LIFECYCLE_HOOKS,
|
36
36
|
CUSTOM_PUBLIC_GITIGNORE
|
37
37
|
]
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
MAINTAINED_INIT
|
39
|
+
MOCK_WORKFLOW_CUSTOM_LOCAL_FILES = [
|
40
|
+
CUSTOM_RUN,
|
42
41
|
]
|
43
42
|
|
43
|
+
MOCK_WORKFLOW_CUSTOM_DOCKER_FILES = [
|
44
|
+
CUSTOM_DOCKER_COMPOSE,
|
45
|
+
]
|
46
|
+
|
47
|
+
RECORD_WORKFLOW_MAINTAINED_FILES = []
|
48
|
+
|
44
49
|
RECORD_WORKFLOW_CUSTOM_FILES = [
|
45
50
|
CUSTOM_BUILD,
|
46
51
|
CUSTOM_CONFIGURE,
|
47
|
-
CUSTOM_DOCKER_COMPOSE,
|
48
52
|
CUSTOM_INIT,
|
49
53
|
CUSTOM_LIFECYCLE_HOOKS,
|
50
54
|
]
|
51
55
|
|
52
|
-
|
53
|
-
|
54
|
-
|
56
|
+
RECORD_WORKFLOW_CUSTOM_LOCAL_FILES = [
|
57
|
+
CUSTOM_RUN,
|
58
|
+
]
|
59
|
+
|
60
|
+
RECORD_WORKFLOW_CUSTOM_DOCKER_FILES = [
|
61
|
+
CUSTOM_DOCKER_COMPOSE,
|
55
62
|
]
|
56
63
|
|
64
|
+
TEST_WORKFLOW_MAINTAINED_FILES = []
|
65
|
+
|
57
66
|
TEST_WORKFLOW_CUSTOM_FILES = [
|
58
67
|
CUSTOM_BUILD,
|
59
68
|
CUSTOM_CONFIGURE,
|
60
|
-
CUSTOM_DOCKER_COMPOSE,
|
61
69
|
CUSTOM_FIXTURES,
|
62
70
|
CUSTOM_INIT,
|
63
71
|
CUSTOM_LIFECYCLE_HOOKS,
|
64
72
|
CUSTOM_PUBLIC_GITIGNORE
|
65
73
|
]
|
66
74
|
|
75
|
+
TEST_WORKFLOW_CUSTOM_LOCAL_FILES = [
|
76
|
+
CUSTOM_RUN,
|
77
|
+
]
|
78
|
+
|
79
|
+
TEST_WORKFLOW_CUSTOM_DOCKER_FILES = [
|
80
|
+
CUSTOM_DOCKER_COMPOSE,
|
81
|
+
]
|
82
|
+
|
67
83
|
SERVICE_HOSTNAME_BUILD_ARG = 'SERVICE_HOSTNAME'
|
@@ -1,44 +1,60 @@
|
|
1
1
|
import pdb
|
2
2
|
|
3
3
|
from ..constants import WORKFLOW_MOCK_TYPE, WORKFLOW_RECORD_TYPE, WORKFLOW_TEST_TYPE
|
4
|
-
from ..
|
4
|
+
from ..local.workflow.builder import WorkflowBuilder
|
5
|
+
from ..docker.workflow.builder import DockerWorkflowBuilder
|
5
6
|
from .constants import (
|
6
|
-
CUSTOM_CONFIGURE, CUSTOM_INIT, CUSTOM_PUBLIC_GITIGNORE, MAINTAINED_CONFIGURE,
|
7
|
+
CUSTOM_CONFIGURE, CUSTOM_INIT, CUSTOM_PUBLIC_GITIGNORE, MAINTAINED_CONFIGURE,
|
8
|
+
MOCK_WORKFLOW_CUSTOM_FILES, MOCK_WORKFLOW_CUSTOM_LOCAL_FILES, MOCK_WORKFLOW_MAINTAINED_FILES, MOCK_WORKFLOW_CUSTOM_DOCKER_FILES,
|
9
|
+
RECORD_WORKFLOW_CUSTOM_FILES, RECORD_WORKFLOW_CUSTOM_LOCAL_FILES, RECORD_WORKFLOW_MAINTAINED_FILES, RECORD_WORKFLOW_CUSTOM_DOCKER_FILES,
|
10
|
+
TEST_WORKFLOW_CUSTOM_FILES, TEST_WORKFLOW_CUSTOM_LOCAL_FILES, TEST_WORKFLOW_MAINTAINED_FILES, TEST_WORKFLOW_CUSTOM_DOCKER_FILES
|
7
11
|
)
|
8
12
|
|
9
|
-
def custom_files(workflow: str, workflow_builder: WorkflowBuilder):
|
13
|
+
def custom_files(workflow: str, workflow_builder: WorkflowBuilder = None):
|
10
14
|
files = []
|
11
15
|
if workflow == WORKFLOW_MOCK_TYPE:
|
12
|
-
files = MOCK_WORKFLOW_CUSTOM_FILES
|
16
|
+
files = MOCK_WORKFLOW_CUSTOM_FILES.copy()
|
13
17
|
elif workflow == WORKFLOW_RECORD_TYPE:
|
14
|
-
files = RECORD_WORKFLOW_CUSTOM_FILES
|
18
|
+
files = RECORD_WORKFLOW_CUSTOM_FILES.copy()
|
15
19
|
elif workflow == WORKFLOW_TEST_TYPE:
|
16
|
-
files = TEST_WORKFLOW_CUSTOM_FILES
|
20
|
+
files = TEST_WORKFLOW_CUSTOM_FILES.copy()
|
17
21
|
else:
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
22
|
+
files.append(CUSTOM_CONFIGURE)
|
23
|
+
files.append(CUSTOM_INIT)
|
24
|
+
|
25
|
+
# Add Docker-specific files if workflow_builder is a DockerWorkflowBuilder
|
26
|
+
if isinstance(workflow_builder, DockerWorkflowBuilder):
|
27
|
+
if workflow == WORKFLOW_MOCK_TYPE:
|
28
|
+
files.extend(MOCK_WORKFLOW_CUSTOM_DOCKER_FILES)
|
29
|
+
elif workflow == WORKFLOW_RECORD_TYPE:
|
30
|
+
files.extend(RECORD_WORKFLOW_CUSTOM_DOCKER_FILES)
|
31
|
+
elif workflow == WORKFLOW_TEST_TYPE:
|
32
|
+
files.extend(TEST_WORKFLOW_CUSTOM_DOCKER_FILES)
|
33
|
+
else:
|
34
|
+
if workflow == WORKFLOW_MOCK_TYPE:
|
35
|
+
files.extend(MOCK_WORKFLOW_CUSTOM_LOCAL_FILES)
|
36
|
+
elif workflow == WORKFLOW_RECORD_TYPE:
|
37
|
+
files.extend(RECORD_WORKFLOW_CUSTOM_LOCAL_FILES)
|
38
|
+
elif workflow == WORKFLOW_TEST_TYPE:
|
39
|
+
files.extend(TEST_WORKFLOW_CUSTOM_LOCAL_FILES)
|
23
40
|
|
24
41
|
# Fixtures are only relevant if the workflow is mock/test and if the service has a hostname
|
25
|
-
if not workflow_builder.config.hostname:
|
42
|
+
if workflow_builder and not workflow_builder.config.hostname:
|
26
43
|
if CUSTOM_PUBLIC_GITIGNORE in files:
|
27
44
|
files.remove(CUSTOM_PUBLIC_GITIGNORE)
|
28
45
|
|
29
46
|
return files
|
30
47
|
|
31
|
-
def maintained_files(workflow: str, workflow_builder: WorkflowBuilder):
|
48
|
+
def maintained_files(workflow: str, workflow_builder: WorkflowBuilder = None):
|
32
49
|
files = []
|
33
50
|
|
34
51
|
if workflow == WORKFLOW_MOCK_TYPE:
|
35
|
-
files = MOCK_WORKFLOW_MAINTAINED_FILES
|
52
|
+
files = MOCK_WORKFLOW_MAINTAINED_FILES.copy()
|
36
53
|
elif workflow == WORKFLOW_RECORD_TYPE:
|
37
|
-
files = RECORD_WORKFLOW_MAINTAINED_FILES
|
54
|
+
files = RECORD_WORKFLOW_MAINTAINED_FILES.copy()
|
38
55
|
elif workflow == WORKFLOW_TEST_TYPE:
|
39
|
-
files = TEST_WORKFLOW_MAINTAINED_FILES
|
56
|
+
files = TEST_WORKFLOW_MAINTAINED_FILES.copy()
|
40
57
|
else:
|
41
|
-
|
42
|
-
files.append(MAINTAINED_CONFIGURE)
|
58
|
+
files.append(MAINTAINED_CONFIGURE)
|
43
59
|
|
44
60
|
return files
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
10
|
+
export HTTP_PROXY=http://localhost:$APP_PROXY_PORT
|
11
|
+
export http_proxy=http://localhost:$APP_PROXY_PORT
|
12
|
+
export HTTPS_PROXY=http://localhost:$APP_PROXY_PORT
|
13
|
+
export https_proxy=http://localhost:$APP_PROXY_PORT
|
14
|
+
|
15
|
+
npx cypress run --project .
|
16
|
+
|
17
|
+
entrypoint=$1
|
18
|
+
|
19
|
+
if [ -e "$entrypoint" ]; then
|
20
|
+
./"$entrypoint"
|
21
|
+
fi
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -f .env ]; then
|
7
|
+
set -a; . ./.env; set +a;
|
8
|
+
fi
|
9
|
+
|
10
|
+
export HTTP_PROXY=http://localhost:$APP_PROXY_PORT
|
11
|
+
export http_proxy=http://localhost:$APP_PROXY_PORT
|
12
|
+
export HTTPS_PROXY=http://localhost:$APP_PROXY_PORT
|
13
|
+
export https_proxy=http://localhost:$APP_PROXY_PORT
|
14
|
+
|
15
|
+
npx playwright test --reporter dot
|
16
|
+
|
17
|
+
entrypoint=$1
|
18
|
+
|
19
|
+
if [ -e "$entrypoint" ]; then
|
20
|
+
./"$entrypoint"
|
21
|
+
fi
|
@@ -5,8 +5,8 @@ import yaml
|
|
5
5
|
from stoobly_agent.lib.logger import Logger
|
6
6
|
|
7
7
|
from .app import App
|
8
|
-
from .constants import BIN_FOLDER_NAME,
|
9
|
-
from .docker.constants import DOCKER_COMPOSE_CUSTOM
|
8
|
+
from .constants import BIN_FOLDER_NAME, CONFIG_FILE, DOTENV_FILE, FIXTURES_FILE_NAME, PUBLIC_FOLDER_NAME
|
9
|
+
from .docker.constants import DOCKER_COMPOSE_CUSTOM, DOCKER_COMPOSE_WORKFLOW
|
10
10
|
from .service_command import ServiceCommand
|
11
11
|
from .workflow_config import WorkflowConfig
|
12
12
|
|
@@ -18,7 +18,9 @@ class WorkflowCommand(ServiceCommand):
|
|
18
18
|
super().__init__(app, **kwargs)
|
19
19
|
|
20
20
|
self.__workflow_name = kwargs['workflow_name']
|
21
|
-
|
21
|
+
|
22
|
+
if kwargs.get('service_name'):
|
23
|
+
self.__config = WorkflowConfig(self.workflow_path, **kwargs)
|
22
24
|
|
23
25
|
@property
|
24
26
|
def bin_dir_path(self):
|
@@ -35,7 +37,7 @@ class WorkflowCommand(ServiceCommand):
|
|
35
37
|
def compose_relative_path(self):
|
36
38
|
return os.path.join(
|
37
39
|
self.workflow_relative_path,
|
38
|
-
|
40
|
+
DOCKER_COMPOSE_WORKFLOW
|
39
41
|
)
|
40
42
|
|
41
43
|
@property
|
@@ -92,6 +94,10 @@ class WorkflowCommand(ServiceCommand):
|
|
92
94
|
def public_dir_path(self):
|
93
95
|
return os.path.join(self.workflow_path, PUBLIC_FOLDER_NAME)
|
94
96
|
|
97
|
+
@property
|
98
|
+
def response_fixtures_path(self):
|
99
|
+
return os.path.join(self.workflow_path, FIXTURES_FILE_NAME)
|
100
|
+
|
95
101
|
@property
|
96
102
|
def workflow_config(self):
|
97
103
|
return self.__config
|
@@ -126,9 +132,17 @@ class WorkflowCommand(ServiceCommand):
|
|
126
132
|
self.workflow_name
|
127
133
|
)
|
128
134
|
|
135
|
+
@property
|
136
|
+
def workflow_template(self):
|
137
|
+
return self.workflow_config.template or self.workflow_name
|
138
|
+
|
129
139
|
@property
|
130
140
|
def workflow_templates_root_dir(self):
|
131
141
|
return os.path.join(self.templates_root_dir, 'workflow')
|
142
|
+
|
143
|
+
@property
|
144
|
+
def workflow_templates_build_dir(self):
|
145
|
+
return os.path.join(self.templates_root_dir, 'build', 'workflows', self.workflow_template)
|
132
146
|
|
133
147
|
def env(self, _c: dict):
|
134
148
|
_config = self.app_config.read()
|
@@ -2,8 +2,9 @@ import os
|
|
2
2
|
import pdb
|
3
3
|
import shutil
|
4
4
|
|
5
|
+
from stoobly_agent.app.cli.scaffold.docker.constants import DOCKER_COMPOSE_WORKFLOW
|
6
|
+
|
5
7
|
from .app import App
|
6
|
-
from .constants import COMPOSE_TEMPLATE
|
7
8
|
from .service_workflow import ServiceWorkflow
|
8
9
|
from .workflow_command import WorkflowCommand
|
9
10
|
|
@@ -32,11 +33,11 @@ class WorkflowCopyCommand(WorkflowCommand):
|
|
32
33
|
|
33
34
|
self.app.copy_folders_and_hidden_files(self.workflow_path, dest)
|
34
35
|
|
35
|
-
|
36
|
-
|
37
|
-
os.rename(compose_file_src, compose_file_dest)
|
36
|
+
# copy folder recursively
|
37
|
+
shutil.copytree(self.workflow_path, destination_workflow.path, dirs_exist_ok=True)
|
38
38
|
|
39
39
|
# Replace workflow name
|
40
|
+
compose_file_dest = os.path.join(dest, DOCKER_COMPOSE_WORKFLOW)
|
40
41
|
with open(compose_file_dest, 'r+') as fp:
|
41
42
|
contents = fp.read()
|
42
43
|
fp.seek(0)
|