pulse-framework 0.1.38a8__py3-none-any.whl → 0.1.39__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.
pulse/app.py CHANGED
@@ -939,7 +939,7 @@ class App:
939
939
  return # no active render for this user session
940
940
 
941
941
  # We don't want to wait for this to resolve
942
- create_task(render.call_api(f"/{self.api_prefix}/set-cookies", method="GET"))
942
+ create_task(render.call_api(f"{self.api_prefix}/set-cookies", method="GET"))
943
943
  sess.scheduled_cookie_refresh = True
944
944
 
945
945
 
pulse/cli/cmd.py CHANGED
@@ -204,7 +204,10 @@ def run(
204
204
  )
205
205
  )
206
206
 
207
- tag_colors = {"server": "cyan", "web": "orange1"}
207
+ # Only add tags in dev mode to avoid breaking structured output (e.g., CloudWatch EMF metrics)
208
+ tag_colors = (
209
+ {"server": "cyan", "web": "orange1"} if env.pulse_env == "dev" else None
210
+ )
208
211
 
209
212
  with FolderLock(web_root):
210
213
  try:
pulse/cli/processes.py CHANGED
@@ -215,8 +215,12 @@ def _run_without_pty(
215
215
 
216
216
 
217
217
  def _write_tagged_line(name: str, message: str, colors: Mapping[str, str]) -> None:
218
- color = ANSI_CODES.get(colors.get(name, ""), ANSI_CODES["default"])
219
- sys.stdout.write(f"{color}[{name}]\033[0m {message}\n")
218
+ # Only add tags if colors dict is not empty (i.e., tagging is enabled)
219
+ if colors:
220
+ color = ANSI_CODES.get(colors.get(name, ""), ANSI_CODES["default"])
221
+ sys.stdout.write(f"{color}[{name}]\033[0m {message}\n")
222
+ else:
223
+ sys.stdout.write(f"{message}\n")
220
224
  sys.stdout.flush()
221
225
 
222
226
 
pulse/middleware.py CHANGED
@@ -1,15 +1,17 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from collections.abc import Callable, Sequence
4
- from typing import TYPE_CHECKING, Any, Generic, TypeVar, overload, override
5
-
6
- from pulse.messages import ClientMessage, ServerInitMessage
4
+ from typing import Any, Generic, TypeVar, overload, override
5
+
6
+ from pulse.messages import (
7
+ ClientMessage,
8
+ PrerenderPayload,
9
+ PrerenderResult,
10
+ ServerInitMessage,
11
+ )
7
12
  from pulse.request import PulseRequest
8
13
  from pulse.routing import RouteInfo
9
14
 
10
- if TYPE_CHECKING:
11
- from pulse.app import PrerenderPayload, PrerenderResult
12
-
13
15
  T = TypeVar("T")
14
16
 
15
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pulse-framework
3
- Version: 0.1.38a8
3
+ Version: 0.1.39
4
4
  Summary: Pulse - Full-stack framework for building real-time React applications in Python
5
5
  Requires-Dist: websockets>=12.0
6
6
  Requires-Dist: fastapi>=0.104.0
@@ -1,14 +1,14 @@
1
1
  pulse/__init__.py,sha256=P2CLvFxP8IPiUsy3Z-hZD-1tbsvhd4eVlMNYg5WOPjE,31709
2
- pulse/app.py,sha256=a-fHuX1MfA0Whjyy8l2JxroRkJd5VG0Aba31xfKcuFY,29871
2
+ pulse/app.py,sha256=N9scphomw5DiULzL8B3uuSakhCP3g5x1Sm7haKBzAeA,29870
3
3
  pulse/channel.py,sha256=DuD1mg_xWvkpAWSKZ-EtBYdUzJ8IuKH0fxdgGOvFXpg,13041
4
4
  pulse/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- pulse/cli/cmd.py,sha256=AakXuTLEQEb3GP-WLzZUoVLpxoszGzU3OfdhhC-RGR0,13872
5
+ pulse/cli/cmd.py,sha256=jA1kgw6Dibj8jC_amcRL4mCzfboszLTnVAQtJA3_G-4,14011
6
6
  pulse/cli/dependencies.py,sha256=ZBqBAfMvMBQUvh4THdPDztTMQ_dyR52S1IuotP_eEZs,5623
7
7
  pulse/cli/folder_lock.py,sha256=kvUmZBg869lwCTIZFoge9dhorv8qPXHTWwVv_jQg1k8,3477
8
8
  pulse/cli/helpers.py,sha256=8bRlV3d7w3w-jHaFvFYt9Pzue6_CbKOq_Z3jBsBOeUk,8820
9
9
  pulse/cli/models.py,sha256=hRmIWmhXmGf2otzVm1do4Dm19rkWkmTwAA3Am3kw2tE,692
10
10
  pulse/cli/packages.py,sha256=e7ycwwJfdmB4pzrai4DHos6-JzyUgmE4DCZp0BqjdeI,6792
11
- pulse/cli/processes.py,sha256=rv1FZ0aynNsYwAbyirqOOeTp-6gqfks8CETOAVPGwS0,5599
11
+ pulse/cli/processes.py,sha256=yJg2hHY2JggLkvQS9XrVwdl7reQhF333qxATPnPkmrU,5727
12
12
  pulse/cli/secrets.py,sha256=dNfQe6AzSYhZuWveesjCRHIbvaPd3-F9lEJ-kZA7ROw,921
13
13
  pulse/cli/uvicorn_log_config.py,sha256=Ip0iCeMUoY1ruv3Amf2SF84lW2DDpJFqdsLflZNxmeY,2407
14
14
  pulse/codegen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -46,7 +46,7 @@ pulse/html/svg.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
46
  pulse/html/tags.py,sha256=dyG4BY9qthBbO-ihcy9F8mLY6WqQxKFXfpqNYcSMKN0,5182
47
47
  pulse/html/tags.pyi,sha256=I8dFoft9w4RvneZ3li1weAdijY1krj9jfO_p2SU6e04,13953
48
48
  pulse/messages.py,sha256=Vz6pXUcBlQxHVEzP8jtA4ZBwn0P30oJzU07lzESP2JI,3625
49
- pulse/middleware.py,sha256=xNPUkeKVCEUJDIHoe5-GT7EvgLxZwWz1rWb6mEchkWY,7921
49
+ pulse/middleware.py,sha256=aMcfkQ2XUT-SMFNa51GYlQp5tnXQwkfbcGlqO4DGcKk,7874
50
50
  pulse/plugin.py,sha256=T1HLucOJekRfWMGF17arI3z7qfH-rBw_zPOQEV8v2mw,640
51
51
  pulse/proxy.py,sha256=lIt1W8FpItpwl85IxzdzgTwPN8G7kvM5OFYB7YW9iaE,5158
52
52
  pulse/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -65,7 +65,7 @@ pulse/types/event_handler.py,sha256=OF7sOgYBb6iUs59RH1vQIH7aOrGPfs3nAaF7how-4PQ,
65
65
  pulse/user_session.py,sha256=kCZtQpYZe2keDXzusd6jsjjw075am0dXrb25jKLg5JU,7578
66
66
  pulse/vdom.py,sha256=KTNBh2dVvDy9eXRzhneBJgk7F35MyWec8R_puQ4tSRY,12420
67
67
  pulse/version.py,sha256=711vaM1jVIQPgkisGgKZqwmw019qZIsc_QTae75K2pg,1895
68
- pulse_framework-0.1.38a8.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
69
- pulse_framework-0.1.38a8.dist-info/entry_points.txt,sha256=i7aohd3QaPu5IcuGKKvsQQEiMYMe5HcF56QEsaLVO64,46
70
- pulse_framework-0.1.38a8.dist-info/METADATA,sha256=0nWfbIPndCGbuGRobas4TI8SFjylLcbn6YahOUnztw8,582
71
- pulse_framework-0.1.38a8.dist-info/RECORD,,
68
+ pulse_framework-0.1.39.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
69
+ pulse_framework-0.1.39.dist-info/entry_points.txt,sha256=i7aohd3QaPu5IcuGKKvsQQEiMYMe5HcF56QEsaLVO64,46
70
+ pulse_framework-0.1.39.dist-info/METADATA,sha256=SljvnYZBKd7TFTjJI0HbyDwNWwMzvSg4fU6tMKg5knU,580
71
+ pulse_framework-0.1.39.dist-info/RECORD,,