stoobly-agent 1.9.3__py3-none-any.whl → 1.9.4__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/app/cli/scaffold/app_config.py +13 -1
- stoobly_agent/app/cli/scaffold/app_create_command.py +8 -0
- stoobly_agent/app/cli/scaffold/constants.py +1 -0
- stoobly_agent/app/cli/scaffold/docker/service/configure_gateway.py +10 -4
- stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/mock/.docker-compose.mock.yml +1 -1
- stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/record/.docker-compose.record.yml +1 -1
- stoobly_agent/app/cli/scaffold_cli.py +1 -0
- stoobly_agent/cli.py +2 -2
- {stoobly_agent-1.9.3.dist-info → stoobly_agent-1.9.4.dist-info}/METADATA +1 -1
- {stoobly_agent-1.9.3.dist-info → stoobly_agent-1.9.4.dist-info}/RECORD +14 -14
- {stoobly_agent-1.9.3.dist-info → stoobly_agent-1.9.4.dist-info}/LICENSE +0 -0
- {stoobly_agent-1.9.3.dist-info → stoobly_agent-1.9.4.dist-info}/WHEEL +0 -0
- {stoobly_agent-1.9.3.dist-info → stoobly_agent-1.9.4.dist-info}/entry_points.txt +0 -0
stoobly_agent/__init__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
COMMAND = 'stoobly-agent'
|
2
|
-
VERSION = '1.9.
|
2
|
+
VERSION = '1.9.4'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from .config import Config
|
2
|
-
from .constants import APP_NAME_ENV, APP_NETWORK_ENV
|
2
|
+
from .constants import APP_NAME_ENV, APP_NETWORK_ENV, APP_UI_PORT_ENV
|
3
3
|
|
4
4
|
class AppConfig(Config):
|
5
5
|
|
@@ -27,11 +27,20 @@ class AppConfig(Config):
|
|
27
27
|
def network(self, v):
|
28
28
|
self.__network = v
|
29
29
|
|
30
|
+
@property
|
31
|
+
def ui_port(self):
|
32
|
+
return self.__ui_port
|
33
|
+
|
34
|
+
@ui_port.setter
|
35
|
+
def ui_port(self, v):
|
36
|
+
self.__ui_port = v
|
37
|
+
|
30
38
|
def load(self, config = None):
|
31
39
|
config = config or self.read()
|
32
40
|
|
33
41
|
self.name = config.get(APP_NAME_ENV)
|
34
42
|
self.network = config.get(APP_NETWORK_ENV)
|
43
|
+
self.ui_port = config.get(APP_UI_PORT_ENV)
|
35
44
|
|
36
45
|
def write(self):
|
37
46
|
config = {}
|
@@ -42,4 +51,7 @@ class AppConfig(Config):
|
|
42
51
|
if self.network:
|
43
52
|
config[APP_NETWORK_ENV] = self.network
|
44
53
|
|
54
|
+
if self.ui_port:
|
55
|
+
config[APP_UI_PORT_ENV] = self.ui_port
|
56
|
+
|
45
57
|
super().write(config)
|
@@ -9,6 +9,7 @@ from .app_command import AppCommand
|
|
9
9
|
class AppCreateOptions(TypedDict):
|
10
10
|
name: str
|
11
11
|
network: str
|
12
|
+
ui_port: int
|
12
13
|
|
13
14
|
class AppCreateCommand(AppCommand):
|
14
15
|
|
@@ -21,6 +22,9 @@ class AppCreateCommand(AppCommand):
|
|
21
22
|
if kwargs.get('network'):
|
22
23
|
self.app_config.network = kwargs['network']
|
23
24
|
|
25
|
+
if kwargs.get('ui_port'):
|
26
|
+
self.app_config.ui_port = kwargs['ui_port']
|
27
|
+
|
24
28
|
@property
|
25
29
|
def app_name(self):
|
26
30
|
return self.app_config.name
|
@@ -29,6 +33,10 @@ class AppCreateCommand(AppCommand):
|
|
29
33
|
def app_network(self):
|
30
34
|
return self.app_config.network
|
31
35
|
|
36
|
+
@property
|
37
|
+
def app_ui_port(self):
|
38
|
+
return self.app_config.ui_port
|
39
|
+
|
32
40
|
def build(self):
|
33
41
|
dest = self.scaffold_namespace_path
|
34
42
|
|
@@ -51,6 +51,8 @@ def __with_networks(config: dict, hostnames: List[str]):
|
|
51
51
|
}
|
52
52
|
|
53
53
|
def __with_traefik_config(service_paths: str, compose: dict, app_dir_path: str):
|
54
|
+
config_dest = '/etc/traefik/traefik.yml'
|
55
|
+
|
54
56
|
if not compose['volumes']:
|
55
57
|
compose['volumes'] = []
|
56
58
|
|
@@ -68,11 +70,15 @@ def __with_traefik_config(service_paths: str, compose: dict, app_dir_path: str):
|
|
68
70
|
'providers': {
|
69
71
|
'docker': {
|
70
72
|
'exposedByDefault': False
|
73
|
+
},
|
74
|
+
'file': {
|
75
|
+
'fileName': config_dest,
|
76
|
+
'watch': False
|
71
77
|
}
|
72
78
|
},
|
73
79
|
'tls': {
|
74
|
-
'certificates': certificates
|
75
|
-
}
|
80
|
+
'certificates': certificates,
|
81
|
+
},
|
76
82
|
}
|
77
83
|
|
78
84
|
for path in service_paths:
|
@@ -88,7 +94,7 @@ def __with_traefik_config(service_paths: str, compose: dict, app_dir_path: str):
|
|
88
94
|
if config.scheme == 'https':
|
89
95
|
certificates.append({
|
90
96
|
'certFile': f"/certs/{config.hostname}.crt",
|
91
|
-
'keyFile': f"/certs/{config.hostname}.key"
|
97
|
+
'keyFile': f"/certs/{config.hostname}.key",
|
92
98
|
})
|
93
99
|
|
94
100
|
# Create traefik.yml in .stoobly/tmp
|
@@ -102,7 +108,7 @@ def __with_traefik_config(service_paths: str, compose: dict, app_dir_path: str):
|
|
102
108
|
fp.write(yaml.dump(traefik_config))
|
103
109
|
|
104
110
|
compose['volumes'].append(
|
105
|
-
f"{os.path.join(APP_DIR, traefik_template_relative_path)}
|
111
|
+
f"{os.path.join(APP_DIR, traefik_template_relative_path)}:{config_dest}:ro"
|
106
112
|
)
|
107
113
|
|
108
114
|
def __find_hosts(service_paths):
|
@@ -89,6 +89,7 @@ def hostname(ctx):
|
|
89
89
|
@click.option('--app-dir-path', default=current_working_dir, help='Path to create the app scaffold.')
|
90
90
|
@click.option('--force', is_flag=True, help='Overwrite maintained scaffolded app files.')
|
91
91
|
@click.option('--network', help='App default network name. Defaults to app name.')
|
92
|
+
@click.option('--ui-port', default=4200, type=click.IntRange(1, 65535), help='UI service port.')
|
92
93
|
@click.argument('app_name')
|
93
94
|
def create(**kwargs):
|
94
95
|
__validate_app_dir(kwargs['app_dir_path'])
|
stoobly_agent/cli.py
CHANGED
@@ -115,12 +115,12 @@ def init(**kwargs):
|
|
115
115
|
upstream proxy modes, SPEC is host specification in
|
116
116
|
the form of "http[s]://host[:port]".
|
117
117
|
''')
|
118
|
-
@click.option('--proxy-port', default=8080, help='Proxy service port.')
|
118
|
+
@click.option('--proxy-port', default=8080, type=click.IntRange(1, 65535), help='Proxy service port.')
|
119
119
|
@click.option('--public-directory-path', help='Path to public files. Used for mocking requests.')
|
120
120
|
@click.option('--response-fixtures-path', help='Path to response fixtures yaml. Used for mocking requests.')
|
121
121
|
@click.option('--ssl-insecure', is_flag=True, default=False, help='Do not verify upstream server SSL/TLS certificates.')
|
122
122
|
@click.option('--ui-host', default='0.0.0.0', help='Address to bind UI to.')
|
123
|
-
@click.option('--ui-port', default=4200, help='UI service port.')
|
123
|
+
@click.option('--ui-port', default=4200, type=click.IntRange(1, 65535), help='UI service port.')
|
124
124
|
def run(**kwargs):
|
125
125
|
from .app.proxy.run import run as run_proxy
|
126
126
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
stoobly_agent/__init__.py,sha256=
|
1
|
+
stoobly_agent/__init__.py,sha256=xHYLozasADB35BWCrRP8wlaWwr4WTbSnYvQyjTdvED4,44
|
2
2
|
stoobly_agent/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
stoobly_agent/app/api/__init__.py,sha256=ctkB8KR-eXO0SFhj602huHiyvQ3PslFWd8fkcufgrAI,1000
|
4
4
|
stoobly_agent/app/api/application_http_request_handler.py,sha256=Vvz53yB0bR7J-QqMAkLlhcZrA4P64ZEN7w8cMbgl6o0,5261
|
@@ -69,11 +69,11 @@ stoobly_agent/app/cli/request_cli.py,sha256=THNloW111l9MLE0oPg4y7hVXL1U7OXoz760g
|
|
69
69
|
stoobly_agent/app/cli/scaffold/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
70
70
|
stoobly_agent/app/cli/scaffold/app.py,sha256=bgNc_dWZtgkuDAkS9aHSCMxCrjX907Phlfb2bOasswI,3435
|
71
71
|
stoobly_agent/app/cli/scaffold/app_command.py,sha256=sliaYulMNmaxbRXpJIDtBDWEBGEv5Tht4rpErzC_xxw,2368
|
72
|
-
stoobly_agent/app/cli/scaffold/app_config.py,sha256=
|
73
|
-
stoobly_agent/app/cli/scaffold/app_create_command.py,sha256=
|
72
|
+
stoobly_agent/app/cli/scaffold/app_config.py,sha256=UGVJ7DVmXh-o_gYBlAAEjngNIUZPQUiXXk2oMStcsPg,1075
|
73
|
+
stoobly_agent/app/cli/scaffold/app_create_command.py,sha256=0ogYliGbq1PYP5rFs-ML33q_Z4t_rAgPWjhk7rhnGw0,1153
|
74
74
|
stoobly_agent/app/cli/scaffold/command.py,sha256=aoTsdkkBzyu7TkVSMdNQQGk0Gj874jNgFcjR14y3TuM,254
|
75
75
|
stoobly_agent/app/cli/scaffold/config.py,sha256=HZU5tkvr3dkPr4JMXZtrJlu2wxxO-134Em6jReFFcq0,688
|
76
|
-
stoobly_agent/app/cli/scaffold/constants.py,sha256=
|
76
|
+
stoobly_agent/app/cli/scaffold/constants.py,sha256=dpCGvKzNtGQyaZfghfy0F6bJsZNp1KPACX3Z3rd13sw,2416
|
77
77
|
stoobly_agent/app/cli/scaffold/containerized_app.py,sha256=dAjn4RwcZV3aEL0POUmrbF_DC-r9h6s1zx7gT2t45v0,175
|
78
78
|
stoobly_agent/app/cli/scaffold/docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
79
79
|
stoobly_agent/app/cli/scaffold/docker/app_builder.py,sha256=7z5pk5JKlRDHx2USxY-WurttLyyUkIVYfl34_u1x9dE,501
|
@@ -82,7 +82,7 @@ stoobly_agent/app/cli/scaffold/docker/constants.py,sha256=1khQdgTaQ89ykGRNdTQh_e
|
|
82
82
|
stoobly_agent/app/cli/scaffold/docker/service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
83
83
|
stoobly_agent/app/cli/scaffold/docker/service/build_decorator.py,sha256=ZU7z4bkvdS3OK5O4fJhlA9_PNwnFtZW6t7vNF7V5obQ,1003
|
84
84
|
stoobly_agent/app/cli/scaffold/docker/service/builder.py,sha256=4cIMSYvgrkGWVuuYymiwlrR829O91qQl9ML8FhaDMj4,5857
|
85
|
-
stoobly_agent/app/cli/scaffold/docker/service/configure_gateway.py,sha256=
|
85
|
+
stoobly_agent/app/cli/scaffold/docker/service/configure_gateway.py,sha256=872qX9atoNWMXvSZcnG5cvVXarWShxBS9cJ_Q-YrCW8,3850
|
86
86
|
stoobly_agent/app/cli/scaffold/docker/service/types.py,sha256=qB-yYHlu-PZDc0HYgTUvE5bWNpHxaSThC3JUG8okR1k,88
|
87
87
|
stoobly_agent/app/cli/scaffold/docker/workflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
88
88
|
stoobly_agent/app/cli/scaffold/docker/workflow/build_decorator.py,sha256=VKD9hXbJGRIWHS5IeYXeX0-FQ0F43zG8VmsegL6eYwA,703
|
@@ -144,8 +144,8 @@ stoobly_agent/app/cli/scaffold/templates/app/gateway/test/.docker-compose.test.y
|
|
144
144
|
stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/.config.yml,sha256=XnLQZMzzMMIwVycjyPN5QXsmRztkTFAna1kIHYuDfJQ,19
|
145
145
|
stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/.docker-compose.base.yml,sha256=bxrtZqf3YtaJCukzScslh5PgWC5q8xkGIP1wKJf33LA,111
|
146
146
|
stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/exec/.docker-compose.exec.yml,sha256=JN89sU5uRf6YqHvN_O63K8rwQIAPJHbhFDLFmuUjKNM,304
|
147
|
-
stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/mock/.docker-compose.mock.yml,sha256=
|
148
|
-
stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/record/.docker-compose.record.yml,sha256=
|
147
|
+
stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/mock/.docker-compose.mock.yml,sha256=2wg-YArlQVjat-bin_PLOnULQJW7mOmZjP7CFp6Knbs,242
|
148
|
+
stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/record/.docker-compose.record.yml,sha256=yDw8OSX7rFsW6J51K5Qf33qM-isGL8V4xPAYayIfnvQ,245
|
149
149
|
stoobly_agent/app/cli/scaffold/templates/build/services/build/mock/.configure,sha256=SKvht2K_3tW08K24rl8_j0jMYOhq1k-GsVwhoHwjxYA,337
|
150
150
|
stoobly_agent/app/cli/scaffold/templates/build/services/build/mock/.init,sha256=ecmyS6EZpa3op0CmO7bvd3pmAwRb0oLwj1qsTkee9_o,247
|
151
151
|
stoobly_agent/app/cli/scaffold/templates/build/services/build/record/.configure,sha256=eXp9eKJ-TORE5B0zLW4-t43ogS3nxtj2SmSeDALbi1U,278
|
@@ -203,7 +203,7 @@ stoobly_agent/app/cli/scaffold/workflow_env.py,sha256=x8V5pJmIiklD3f2q2-qq-CORf4
|
|
203
203
|
stoobly_agent/app/cli/scaffold/workflow_log_command.py,sha256=Bke4lMOMxuDUFuAx9nlXHbKgYMO4KAg9ASHvjz4aVWc,1372
|
204
204
|
stoobly_agent/app/cli/scaffold/workflow_run_command.py,sha256=eF3aaK4OIZXYuSBEAeBnhAL7EZrS1G4mSYrJbEiXt2o,11082
|
205
205
|
stoobly_agent/app/cli/scaffold/workflow_validate_command.py,sha256=Uo_yo6rVR1ZR7xpvsQvlH48AyMBVLRupd4G-bRjzm_Q,5584
|
206
|
-
stoobly_agent/app/cli/scaffold_cli.py,sha256=
|
206
|
+
stoobly_agent/app/cli/scaffold_cli.py,sha256=huVZUpBUW6sfcNmhAlcQTKYVCCg0kHhcjezxt_Fm4sk,32043
|
207
207
|
stoobly_agent/app/cli/scenario_cli.py,sha256=3J1EiJOvunkfWrEkOsanw-XrKkOk78ij_GjBlE9p7CE,8229
|
208
208
|
stoobly_agent/app/cli/snapshot_cli.py,sha256=Uf6g6ivsD0hUY8G99eU0fxzS3FymncAhI70PxV7Uaac,11919
|
209
209
|
stoobly_agent/app/cli/trace_cli.py,sha256=K7E-vx3JUcqEDSWOdIOi_AieKNQz7dBfmRrVvKDkzFI,4605
|
@@ -415,7 +415,7 @@ stoobly_agent/app/settings/types/remote_settings.py,sha256=4PvEGKULXM0zv29XTDzV7
|
|
415
415
|
stoobly_agent/app/settings/types/ui_settings.py,sha256=BqPy2F32AbODqzi2mp2kRk28QVUydQIwVmvftn46pco,84
|
416
416
|
stoobly_agent/app/settings/ui_settings.py,sha256=YDEUMPuJFh0SLHaGz6O-Gpz8nwsunNzeuc-TzO9OUbM,1170
|
417
417
|
stoobly_agent/app/settings/url_rule.py,sha256=Qx7YrIpVRSC-4LeNiCAfCtE50Jou4423hojMW-4qUYg,954
|
418
|
-
stoobly_agent/cli.py,sha256=
|
418
|
+
stoobly_agent/cli.py,sha256=FS-V4gkzDE4PgXokqvWV7cFzWq5v6WNMro6B5Mi9E-4,10317
|
419
419
|
stoobly_agent/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
420
420
|
stoobly_agent/config/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
421
421
|
stoobly_agent/config/constants/alias_resolve_strategy.py,sha256=_R1tVqFnyGxCraVS5-dhSskaDj_X8-NthsY7i_bEt9M,119
|
@@ -749,8 +749,8 @@ stoobly_agent/test/mock_data/scaffold/docker-compose-local-service.yml,sha256=1W
|
|
749
749
|
stoobly_agent/test/mock_data/scaffold/index.html,sha256=qJwuYajKZ4ihWZrJQ3BNObV5kf1VGnnm_vqlPJzdqLE,258
|
750
750
|
stoobly_agent/test/mock_data/uspto.yaml,sha256=6U5se7C3o-86J4m9xpOk9Npias399f5CbfWzR87WKwE,7835
|
751
751
|
stoobly_agent/test/test_helper.py,sha256=m_oAI7tmRYCNZdKfNqISWhMv3e44tjeYViQ3nTUfnos,1007
|
752
|
-
stoobly_agent-1.9.
|
753
|
-
stoobly_agent-1.9.
|
754
|
-
stoobly_agent-1.9.
|
755
|
-
stoobly_agent-1.9.
|
756
|
-
stoobly_agent-1.9.
|
752
|
+
stoobly_agent-1.9.4.dist-info/LICENSE,sha256=o93sj12cdoEOsTCjPaPFsw3Xq0SXs3pPcY-9reE2sEw,548
|
753
|
+
stoobly_agent-1.9.4.dist-info/METADATA,sha256=xDOjRS-p08haoG5tLVE1xI3X2qrM6gaplT5nmlIN8s8,3087
|
754
|
+
stoobly_agent-1.9.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
755
|
+
stoobly_agent-1.9.4.dist-info/entry_points.txt,sha256=aq5wix5oC8MDQtmyPGU0xaFrsjJg7WH28NmXh2sc3Z8,56
|
756
|
+
stoobly_agent-1.9.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|