jararaca 0.3.11a0__py3-none-any.whl → 0.3.11a2__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.
Potentially problematic release.
This version of jararaca might be problematic. Click here for more details.
- jararaca/cli.py +19 -17
- jararaca/messagebus/interceptors/aiopika_publisher_interceptor.py +0 -1
- jararaca/messagebus/worker.py +1 -1
- jararaca/persistence/interceptors/aiosqa_interceptor.py +0 -1
- {jararaca-0.3.11a0.dist-info → jararaca-0.3.11a2.dist-info}/METADATA +1 -1
- {jararaca-0.3.11a0.dist-info → jararaca-0.3.11a2.dist-info}/RECORD +9 -9
- {jararaca-0.3.11a0.dist-info → jararaca-0.3.11a2.dist-info}/LICENSE +0 -0
- {jararaca-0.3.11a0.dist-info → jararaca-0.3.11a2.dist-info}/WHEEL +0 -0
- {jararaca-0.3.11a0.dist-info → jararaca-0.3.11a2.dist-info}/entry_points.txt +0 -0
jararaca/cli.py
CHANGED
|
@@ -11,7 +11,7 @@ from urllib.parse import urlparse, urlunsplit
|
|
|
11
11
|
|
|
12
12
|
import click
|
|
13
13
|
import uvicorn
|
|
14
|
-
from mako.template import Template
|
|
14
|
+
from mako.template import Template
|
|
15
15
|
|
|
16
16
|
from jararaca.messagebus import worker as worker_v1
|
|
17
17
|
from jararaca.messagebus import worker_v2 as worker_v2_mod
|
|
@@ -303,7 +303,7 @@ def generate_interfaces(
|
|
|
303
303
|
file.write(content)
|
|
304
304
|
file.flush()
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
click.echo(
|
|
307
307
|
f"Generated TypeScript interfaces at {time.strftime('%H:%M:%S')} at {str(Path(file_path).absolute())}"
|
|
308
308
|
)
|
|
309
309
|
|
|
@@ -311,19 +311,19 @@ def generate_interfaces(
|
|
|
311
311
|
import subprocess
|
|
312
312
|
|
|
313
313
|
try:
|
|
314
|
-
|
|
314
|
+
click.echo(f"Running post-process command: {post_process_cmd}")
|
|
315
315
|
subprocess.run(
|
|
316
316
|
post_process_cmd.replace("{file}", file_path),
|
|
317
317
|
shell=True,
|
|
318
318
|
check=True,
|
|
319
319
|
)
|
|
320
|
-
|
|
320
|
+
click.echo(f"Post-processing completed successfully")
|
|
321
321
|
except subprocess.CalledProcessError as e:
|
|
322
|
-
|
|
322
|
+
click.echo(f"Post-processing command failed: {e}", file=sys.stderr)
|
|
323
323
|
|
|
324
324
|
return content
|
|
325
325
|
except Exception as e:
|
|
326
|
-
|
|
326
|
+
click.echo(f"Error generating TypeScript interfaces: {e}", file=sys.stderr)
|
|
327
327
|
return ""
|
|
328
328
|
|
|
329
329
|
|
|
@@ -367,18 +367,20 @@ def gen_tsi(
|
|
|
367
367
|
"""Generate TypeScript interfaces from a Python microservice."""
|
|
368
368
|
|
|
369
369
|
if stdout and watch:
|
|
370
|
-
|
|
370
|
+
click.echo(
|
|
371
371
|
"Error: --watch and --stdout options cannot be used together",
|
|
372
372
|
file=sys.stderr,
|
|
373
373
|
)
|
|
374
374
|
return
|
|
375
375
|
|
|
376
376
|
if not file_path and not stdout:
|
|
377
|
-
|
|
377
|
+
click.echo(
|
|
378
|
+
"Error: either file_path or --stdout must be provided", file=sys.stderr
|
|
379
|
+
)
|
|
378
380
|
return
|
|
379
381
|
|
|
380
382
|
if post_process and stdout:
|
|
381
|
-
|
|
383
|
+
click.echo(
|
|
382
384
|
"Error: --post-process and --stdout options cannot be used together",
|
|
383
385
|
file=sys.stderr,
|
|
384
386
|
)
|
|
@@ -388,7 +390,7 @@ def gen_tsi(
|
|
|
388
390
|
content = generate_interfaces(app_path, file_path, stdout, post_process)
|
|
389
391
|
|
|
390
392
|
if stdout:
|
|
391
|
-
|
|
393
|
+
click.echo(content)
|
|
392
394
|
return
|
|
393
395
|
|
|
394
396
|
# If watch mode is not enabled, exit
|
|
@@ -399,7 +401,7 @@ def gen_tsi(
|
|
|
399
401
|
from watchdog.events import FileSystemEvent, FileSystemEventHandler
|
|
400
402
|
from watchdog.observers import Observer
|
|
401
403
|
except ImportError:
|
|
402
|
-
|
|
404
|
+
click.echo(
|
|
403
405
|
"Watchdog is required for watch mode. Install it with: pip install watchdog",
|
|
404
406
|
file=sys.stderr,
|
|
405
407
|
)
|
|
@@ -414,7 +416,7 @@ def gen_tsi(
|
|
|
414
416
|
else str(event.src_path)
|
|
415
417
|
)
|
|
416
418
|
if not event.is_directory and src_path.endswith(".py"):
|
|
417
|
-
|
|
419
|
+
click.echo(f"File changed: {src_path}")
|
|
418
420
|
# Create a completely detached process to ensure classes are reloaded
|
|
419
421
|
process = multiprocessing.get_context("spawn").Process(
|
|
420
422
|
target=generate_interfaces,
|
|
@@ -445,16 +447,16 @@ def gen_tsi(
|
|
|
445
447
|
|
|
446
448
|
# Set up observer
|
|
447
449
|
observer = Observer()
|
|
448
|
-
observer.schedule(PyFileChangeHandler(), src_dir, recursive=True)
|
|
449
|
-
observer.start()
|
|
450
|
+
observer.schedule(PyFileChangeHandler(), src_dir, recursive=True) # type: ignore
|
|
451
|
+
observer.start() # type: ignore
|
|
450
452
|
|
|
451
|
-
|
|
453
|
+
click.echo(f"Watching for changes in {os.path.abspath(src_dir)}...")
|
|
452
454
|
try:
|
|
453
455
|
while True:
|
|
454
456
|
time.sleep(1)
|
|
455
457
|
except KeyboardInterrupt:
|
|
456
|
-
observer.stop()
|
|
457
|
-
|
|
458
|
+
observer.stop() # type: ignore
|
|
459
|
+
click.echo("Watch mode stopped")
|
|
458
460
|
observer.join()
|
|
459
461
|
|
|
460
462
|
|
|
@@ -76,7 +76,6 @@ class AIOPikaMessagePublisher(MessagePublisher):
|
|
|
76
76
|
)
|
|
77
77
|
|
|
78
78
|
async def flush(self) -> None:
|
|
79
|
-
print("Flushing messages to AIOPika channel")
|
|
80
79
|
for message in self.staged_messages:
|
|
81
80
|
logger.debug(
|
|
82
81
|
f"Publishing message {message.MESSAGE_TOPIC} with payload: {message.model_dump_json()}"
|
jararaca/messagebus/worker.py
CHANGED
|
@@ -3,7 +3,7 @@ jararaca/__main__.py,sha256=-O3vsB5lHdqNFjUtoELDF81IYFtR-DSiiFMzRaiSsv4,67
|
|
|
3
3
|
jararaca/broker_backend/__init__.py,sha256=GzEIuHR1xzgCJD4FE3harNjoaYzxHMHoEL0_clUaC-k,3528
|
|
4
4
|
jararaca/broker_backend/mapper.py,sha256=vTsi7sWpNvlga1PWPFg0rCJ5joJ0cdzykkIc2Tuvenc,696
|
|
5
5
|
jararaca/broker_backend/redis_broker_backend.py,sha256=a7DHchy3NAiD71Ix8SwmQOUnniu7uup-Woa4ON_4J7I,5786
|
|
6
|
-
jararaca/cli.py,sha256=
|
|
6
|
+
jararaca/cli.py,sha256=gYdokdAWAPI9e5fQwkQofrcbE_ofJXr1kHc7wFRufnc,12283
|
|
7
7
|
jararaca/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
jararaca/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
jararaca/core/providers.py,sha256=wktH84FK7c1s2wNq-fudf1uMfi3CQBR0neU2czJ_L0U,434
|
|
@@ -16,11 +16,11 @@ jararaca/messagebus/bus_message_controller.py,sha256=Xd_qwnX5jUvgBTCarHR36fvtol9
|
|
|
16
16
|
jararaca/messagebus/consumers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
jararaca/messagebus/decorators.py,sha256=y-w4dWbP9ZW3ZJ4mE9iIaxw01ZC5snEbOuBY5NC-Bn0,5626
|
|
18
18
|
jararaca/messagebus/interceptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
jararaca/messagebus/interceptors/aiopika_publisher_interceptor.py,sha256=
|
|
19
|
+
jararaca/messagebus/interceptors/aiopika_publisher_interceptor.py,sha256=_DEHwIH9LYsA26Hu1mo9oHzLZuATgjilU9E3o-ecDjs,6520
|
|
20
20
|
jararaca/messagebus/interceptors/publisher_interceptor.py,sha256=wkIDoa__Q7o74cv89PXdBJFbe-ijxH8Xc_-hBEgxYjM,1272
|
|
21
21
|
jararaca/messagebus/message.py,sha256=U6cyd2XknX8mtm0333slz5fanky2PFLWCmokAO56vvU,819
|
|
22
22
|
jararaca/messagebus/publisher.py,sha256=JTkxdKbvxvDWT8nK8PVEyyX061vYYbKQMxRHXrZtcEY,2173
|
|
23
|
-
jararaca/messagebus/worker.py,sha256=
|
|
23
|
+
jararaca/messagebus/worker.py,sha256=0qkgpbH3FhprRYEEtQttKc353wQ1PpAwu-rn6n9gBm0,13784
|
|
24
24
|
jararaca/messagebus/worker_v2.py,sha256=Ey9HPgVSuIYJUggJGPKmgymZHz7-2TUSYgDB52u9T10,20683
|
|
25
25
|
jararaca/microservice.py,sha256=C_Txqm3xSmdHIghJigKk6TOycL5eTJv9PF6XP7TA8j4,6638
|
|
26
26
|
jararaca/observability/decorators.py,sha256=XffBinFXdiNkY6eo8_1nkr_GapM0RUGBg0aicBIelag,2220
|
|
@@ -30,7 +30,7 @@ jararaca/observability/providers/otel.py,sha256=LgfoITdoQTCxKebfLcEfwMiG992wlWY_
|
|
|
30
30
|
jararaca/persistence/base.py,sha256=Xfnpvj3yeLdpVBifH5W6AwPCLwL2ot0dpLzbPg1zwkQ,966
|
|
31
31
|
jararaca/persistence/exports.py,sha256=Ghx4yoFaB4QVTb9WxrFYgmcSATXMNvrOvT8ybPNKXCA,62
|
|
32
32
|
jararaca/persistence/interceptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
-
jararaca/persistence/interceptors/aiosqa_interceptor.py,sha256=
|
|
33
|
+
jararaca/persistence/interceptors/aiosqa_interceptor.py,sha256=H6ZjOdosYGCZUzKjugiXQwJkAbnsL4HnkZLOEQhULEc,1986
|
|
34
34
|
jararaca/persistence/session.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
35
|
jararaca/persistence/sort_filter.py,sha256=agggpN0YvNjUr6wJjy69NkaqxoDDW13ys9B3r85OujA,9226
|
|
36
36
|
jararaca/persistence/utilities.py,sha256=imcV4Oi5kXNk6m9QF2-OsnFpcTRY4w5mBYLdEx5XTSQ,14296
|
|
@@ -66,8 +66,8 @@ jararaca/tools/metadata.py,sha256=7nlCDYgItNybentPSSCc2MLqN7IpBd0VyQzfjfQycVI,14
|
|
|
66
66
|
jararaca/tools/typescript/interface_parser.py,sha256=35xbOrZDQDyTXdMrVZQ8nnFw79f28lJuLYNHAspIqi8,30492
|
|
67
67
|
jararaca/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
68
|
jararaca/utils/rabbitmq_utils.py,sha256=FPDP8ZVgvitZXV-oK73D7EIANsqUzXTW7HdpEKsIsyI,2811
|
|
69
|
-
jararaca-0.3.
|
|
70
|
-
jararaca-0.3.
|
|
71
|
-
jararaca-0.3.
|
|
72
|
-
jararaca-0.3.
|
|
73
|
-
jararaca-0.3.
|
|
69
|
+
jararaca-0.3.11a2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
70
|
+
jararaca-0.3.11a2.dist-info/METADATA,sha256=DwqkZR-ohqqoPQrhM-9bnnbltJN_v2Kgk75gbrcKfPE,4954
|
|
71
|
+
jararaca-0.3.11a2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
72
|
+
jararaca-0.3.11a2.dist-info/entry_points.txt,sha256=WIh3aIvz8LwUJZIDfs4EeH3VoFyCGEk7cWJurW38q0I,45
|
|
73
|
+
jararaca-0.3.11a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|