fastled 1.3.33__py3-none-any.whl → 1.3.35__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.
fastled/__init__.py CHANGED
@@ -64,6 +64,7 @@ class Api:
64
64
  http_port: (
65
65
  int | None
66
66
  ) = None, # None means auto select a free port. -1 means no server.
67
+ no_platformio: bool = False,
67
68
  ) -> LiveClient:
68
69
  return LiveClient(
69
70
  sketch_directory=sketch_directory,
@@ -75,6 +76,7 @@ class Api:
75
76
  build_mode=build_mode,
76
77
  profile=profile,
77
78
  http_port=http_port,
79
+ no_platformio=no_platformio,
78
80
  )
79
81
 
80
82
  @staticmethod
@@ -85,6 +87,7 @@ class Api:
85
87
  mapped_dir: Path | None = None, # Sketch directory.
86
88
  container_name: str | None = None, # Specific docker container name.
87
89
  remove_previous: bool = False,
90
+ no_platformio: bool = False,
88
91
  ) -> CompileServer:
89
92
  """Uses docker to spawn a compile server from the given name."""
90
93
  from fastled.compile_server import CompileServer
@@ -96,6 +99,7 @@ class Api:
96
99
  mapped_dir=mapped_dir,
97
100
  auto_start=auto_start,
98
101
  remove_previous=remove_previous,
102
+ no_platformio=no_platformio,
99
103
  )
100
104
  return out
101
105
 
@@ -108,6 +112,7 @@ class Api:
108
112
  mapped_dir: Path | None = None, # Sketch directory.
109
113
  container_name: str | None = None, # Specific docker container name.
110
114
  remove_previous=False,
115
+ no_platformio: bool = False,
111
116
  ) -> Generator[CompileServer, None, None]:
112
117
  server = Api.spawn_server(
113
118
  interactive=interactive,
@@ -116,6 +121,7 @@ class Api:
116
121
  mapped_dir=mapped_dir,
117
122
  container_name=container_name,
118
123
  remove_previous=remove_previous,
124
+ no_platformio=no_platformio,
119
125
  )
120
126
  try:
121
127
  yield server
fastled/__version__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # IMPORTANT! There's a bug in github which will REJECT any version update
2
2
  # that has any other change in the repo. Please bump the version as the
3
3
  # ONLY change in a commit, or else the pypi update and the release will fail.
4
- __version__ = "1.3.33"
4
+ __version__ = "1.3.35"
5
5
 
6
6
  __version_url_latest__ = "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/src/fastled/__version__.py"
fastled/app.py CHANGED
@@ -27,6 +27,7 @@ def run_server(args: Args) -> int:
27
27
  mapped_dir=mapped_dir,
28
28
  auto_start=True,
29
29
  remove_previous=args.clear,
30
+ no_platformio=args.no_platformio,
30
31
  )
31
32
 
32
33
  if not interactive:
@@ -87,7 +88,9 @@ def main() -> int:
87
88
 
88
89
  if update:
89
90
  # Force auto_update to ensure update check happens
90
- compile_server = CompileServer(interactive=False, auto_updates=True)
91
+ compile_server = CompileServer(
92
+ interactive=False, auto_updates=True, no_platformio=args.no_platformio
93
+ )
91
94
  compile_server.stop()
92
95
  print("Finished updating.")
93
96
  return 0
@@ -109,6 +112,7 @@ def main() -> int:
109
112
  mapped_dir=directory,
110
113
  auto_start=False,
111
114
  remove_previous=args.clear,
115
+ no_platformio=args.no_platformio,
112
116
  )
113
117
 
114
118
  server.start(wait_for_startup=False)
fastled/client_server.py CHANGED
@@ -130,7 +130,11 @@ def _run_web_compiler(
130
130
 
131
131
 
132
132
  def _try_start_server_or_get_url(
133
- auto_update: bool, args_web: str | bool, localhost: bool, clear: bool
133
+ auto_update: bool,
134
+ args_web: str | bool,
135
+ localhost: bool,
136
+ clear: bool,
137
+ no_platformio: bool = False,
134
138
  ) -> tuple[str, CompileServer | None]:
135
139
  is_local_host = localhost or (
136
140
  isinstance(args_web, str)
@@ -161,7 +165,9 @@ def _try_start_server_or_get_url(
161
165
  try:
162
166
  print("No local server found, starting one...")
163
167
  compile_server = CompileServer(
164
- auto_updates=auto_update, remove_previous=clear
168
+ auto_updates=auto_update,
169
+ remove_previous=clear,
170
+ no_platformio=no_platformio,
165
171
  )
166
172
  print("Waiting for the local compiler to start...")
167
173
  if not compile_server.ping():
@@ -177,7 +183,9 @@ def _try_start_server_or_get_url(
177
183
  return (DEFAULT_URL, None)
178
184
 
179
185
 
180
- def _try_make_compile_server(clear: bool = False) -> CompileServer | None:
186
+ def _try_make_compile_server(
187
+ clear: bool = False, no_platformio: bool = False
188
+ ) -> CompileServer | None:
181
189
  if not DockerManager.is_docker_installed():
182
190
  return None
183
191
  try:
@@ -189,7 +197,9 @@ def _try_make_compile_server(clear: bool = False) -> CompileServer | None:
189
197
  free_port = find_free_port(start_port=9723, end_port=9743)
190
198
  if free_port is None:
191
199
  return None
192
- compile_server = CompileServer(auto_updates=False, remove_previous=clear)
200
+ compile_server = CompileServer(
201
+ auto_updates=False, remove_previous=clear, no_platformio=no_platformio
202
+ )
193
203
  print("Waiting for the local compiler to start...")
194
204
  if not compile_server.ping():
195
205
  print("Failed to start local compiler.")
@@ -228,13 +238,16 @@ def run_client(
228
238
  int | None
229
239
  ) = None, # None means auto select a free port, http_port < 0 means no server.
230
240
  clear: bool = False,
241
+ no_platformio: bool = False,
231
242
  ) -> int:
232
243
  has_checked_newer_version_yet = False
233
244
  compile_server: CompileServer | None = None
234
245
 
235
246
  if host is None:
236
247
  # attempt to start a compile server if docker is installed.
237
- compile_server = _try_make_compile_server(clear=clear)
248
+ compile_server = _try_make_compile_server(
249
+ clear=clear, no_platformio=no_platformio
250
+ )
238
251
  if compile_server is None:
239
252
  host = DEFAULT_URL
240
253
  elif isinstance(host, CompileServer):
@@ -463,6 +476,7 @@ def run_client_server(args: Args) -> int:
463
476
  force_compile = bool(args.force_compile)
464
477
  open_web_browser = not just_compile and not interactive
465
478
  build_mode: BuildMode = BuildMode.from_args(args)
479
+ no_platformio = bool(args.no_platformio)
466
480
 
467
481
  if not force_compile and not looks_like_sketch_directory(directory):
468
482
  # if there is only one directory in the sketch directory, use that
@@ -492,7 +506,7 @@ def run_client_server(args: Args) -> int:
492
506
  compile_server: CompileServer | None = None
493
507
  try:
494
508
  url, compile_server = _try_start_server_or_get_url(
495
- auto_update, web, localhost, args.clear
509
+ auto_update, web, localhost, args.clear, no_platformio
496
510
  )
497
511
  except KeyboardInterrupt:
498
512
  print("\nExiting from first try...")
@@ -524,6 +538,7 @@ def run_client_server(args: Args) -> int:
524
538
  build_mode=build_mode,
525
539
  profile=profile,
526
540
  clear=args.clear,
541
+ no_platformio=no_platformio,
527
542
  )
528
543
  except KeyboardInterrupt:
529
544
  return 1
fastled/compile_server.py CHANGED
@@ -15,6 +15,7 @@ class CompileServer:
15
15
  container_name: str | None = None,
16
16
  platform: Platform = Platform.WASM,
17
17
  remove_previous: bool = False,
18
+ no_platformio: bool = False,
18
19
  ) -> None:
19
20
  from fastled.compile_server_impl import ( # avoid circular import
20
21
  CompileServerImpl,
@@ -29,6 +30,7 @@ class CompileServer:
29
30
  mapped_dir=mapped_dir,
30
31
  auto_start=auto_start,
31
32
  remove_previous=remove_previous,
33
+ no_platformio=no_platformio,
32
34
  )
33
35
 
34
36
  # May throw CompileServerError if server could not be started.
@@ -50,6 +50,7 @@ class CompileServerImpl:
50
50
  auto_start: bool = True,
51
51
  container_name: str | None = None,
52
52
  remove_previous: bool = False,
53
+ no_platformio: bool = False,
53
54
  ) -> None:
54
55
  container_name = container_name or DEFAULT_CONTAINER_NAME
55
56
  if interactive and not mapped_dir:
@@ -68,6 +69,7 @@ class CompileServerImpl:
68
69
  self.running_container: RunningContainer | None = None
69
70
  self.auto_updates = auto_updates
70
71
  self.remove_previous = remove_previous
72
+ self.no_platformio = no_platformio
71
73
  self._port = 0 # 0 until compile server is started
72
74
  if auto_start:
73
75
  self.start()
@@ -217,6 +219,8 @@ class CompileServerImpl:
217
219
  server_command = ["/bin/bash"]
218
220
  else:
219
221
  server_command = ["python", "/js/run.py", "server"] + SERVER_OPTIONS
222
+ if self.no_platformio:
223
+ server_command.append("--no-platformio")
220
224
  if self.interactive:
221
225
  print("Disabling port forwarding in interactive mode")
222
226
  ports = {}
fastled/live_client.py CHANGED
@@ -22,6 +22,7 @@ class LiveClient:
22
22
  keep_running: bool = True,
23
23
  build_mode: BuildMode = BuildMode.QUICK,
24
24
  profile: bool = False,
25
+ no_platformio: bool = False,
25
26
  ) -> None:
26
27
  self.sketch_directory = sketch_directory
27
28
  self.host = host
@@ -34,6 +35,7 @@ class LiveClient:
34
35
  self.shutdown = threading.Event()
35
36
  self.thread: threading.Thread | None = None
36
37
  self.auto_updates = auto_updates
38
+ self.no_platformio = no_platformio
37
39
  if auto_start:
38
40
  self.start()
39
41
  if self.auto_updates is False:
@@ -52,6 +54,7 @@ class LiveClient:
52
54
  profile=self.profile,
53
55
  shutdown=self.shutdown,
54
56
  http_port=self.http_port,
57
+ no_platformio=self.no_platformio,
55
58
  )
56
59
  return rtn
57
60
 
fastled/server_flask.py CHANGED
@@ -85,6 +85,14 @@ def _run_flask_server(
85
85
 
86
86
  # logger.error(f"Server error: {e}")
87
87
 
88
+ @app.after_request
89
+ def add_security_headers(response):
90
+ """Add security headers required for cross-origin isolation and audio worklets"""
91
+ # Required for SharedArrayBuffer and audio worklets
92
+ response.headers["Cross-Origin-Embedder-Policy"] = "credentialless"
93
+ response.headers["Cross-Origin-Opener-Policy"] = "same-origin"
94
+ return response
95
+
88
96
  @app.before_request
89
97
  def log_request_info():
90
98
  """Log details of each request before processing"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.3.33
3
+ Version: 1.3.35
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -1,25 +1,25 @@
1
- fastled/__init__.py,sha256=YLikXGRWKlKAqj7bpvGmJLejGTFF-FC1lv2z1jwRinA,6852
2
- fastled/__version__.py,sha256=s3DxDBhjYroSDTNrOxw5GkS-mg3RRnvUaXp_-tLrhyQ,373
3
- fastled/app.py,sha256=zfSipnCZ6w9_aXCynGrqf7OE--mKzbhT0mEfCNW5XjA,5736
1
+ fastled/__init__.py,sha256=QbQGFxPGTjlf4poTh-NiGuyyzSiO7qqz0KKfJn4M-Vw,7086
2
+ fastled/__version__.py,sha256=-15zyEprr1jMh8Ah0BOI61VommdW3bUa79iSN98eN9Q,373
3
+ fastled/app.py,sha256=TFVn4qIRdt7dYbpDWudEHrhvD9pwyj9sIGXs4F26nhk,5880
4
4
  fastled/args.py,sha256=kucRGYpff_YKfmMpwWsJh6WIrvW_UPcNlZNFdw15z-Y,3475
5
5
  fastled/cli.py,sha256=drgR2AOxVrj3QEz58iiKscYAumbbin2vIV-k91VCOAA,561
6
6
  fastled/cli_test.py,sha256=W-1nODZrip_JU6BEbYhxOa4ckxduOsiX8zIoRkTyxv4,550
7
7
  fastled/cli_test_interactive.py,sha256=BjNhveZOk5aCffHbcrxPQQjWmAuj4ClVKKcKX5eY6yM,542
8
- fastled/client_server.py,sha256=gFZyJBXEHD_10akIr6YipGlFuYn-z5vJsPTxJU3BYco,19132
9
- fastled/compile_server.py,sha256=rkXvrvdav5vDG8lv_OlBX3YSCHtnHMt25nXbfeg_r78,2960
10
- fastled/compile_server_impl.py,sha256=6BBtrw_ReC6ewtv8NC_Ym4IYNgHf8SOvEkUFoy9rlBM,11727
8
+ fastled/client_server.py,sha256=YID7O7e8dAhpFRGwRburfSuMOw5h7MJpsjzgbDY9xKg,19511
9
+ fastled/compile_server.py,sha256=yQtwLOSKINO1CKD0NWxf-7YQKSatf9sF9RuqaWGOkCs,3038
10
+ fastled/compile_server_impl.py,sha256=EzNWAy501beDiiysuUXW5bgySnpqzqoTeLzMUVy3ZzE,11899
11
11
  fastled/docker_manager.py,sha256=rkq39ZKrU6NHIyDa3mzs0Unb6o9oMeAwxhqiuHJU_RY,40291
12
12
  fastled/filewatcher.py,sha256=gEcJJHTDJ1X3gKJzltmEBhixWGbZj2eJD7a4vwSvITQ,10036
13
13
  fastled/keyboard.py,sha256=UTAsqCn1UMYnB8YDzENiLTj4GeL45tYfEcO7_5fLFEg,3556
14
14
  fastled/keyz.py,sha256=LO-8m_7CpNDiZLM-FXhQ30f9gN1bUYz5lOsUPTIbI-c,4020
15
- fastled/live_client.py,sha256=yoAul8tVgbbPf1oEC79SUZSHkLECxlrXxgWR9XaBIp4,2957
15
+ fastled/live_client.py,sha256=yp_ujG92EHYpSedGOUteuG2nQvMKbp1GbUpgQ6nU4Dc,3083
16
16
  fastled/open_browser.py,sha256=DFyMrc1qic4Go7eLNPqMaLuMvTaE73NixdfSKV0yyp8,3709
17
17
  fastled/parse_args.py,sha256=Uu7aNaXtV9afE-z_zpINzykPnFewdN6Goiqgs6Rtt-c,11359
18
18
  fastled/paths.py,sha256=VsPmgu0lNSCFOoEC0BsTYzDygXqy15AHUfN-tTuzDZA,99
19
19
  fastled/print_filter.py,sha256=nc_rqYYdCUPinFycaK7fiQF5PG1up51pmJptR__QyAs,1499
20
20
  fastled/project_init.py,sha256=bBt4DwmW5hZkm9ICt9Qk-0Nr_0JQM7icCgH5Iv-bCQs,3984
21
21
  fastled/select_sketch_directory.py,sha256=-eudwCns3AKj4HuHtSkZAFwbnf005SNL07pOzs9VxnE,1383
22
- fastled/server_flask.py,sha256=nItcm_7Ifr6RrLWFWu0xuxBffoEtXUsLA-_Qx8AAWRE,16719
22
+ fastled/server_flask.py,sha256=HA0Pqkrr7OZn5TgMjykskXYrB-ACFd9sw7ND1L4RW-Y,17132
23
23
  fastled/server_start.py,sha256=W9yKStkRlRNuXeV6j_6O7HjjFPyVLBHMcF9Uy2QjDWQ,479
24
24
  fastled/settings.py,sha256=dUVyJ8Mtprg0RwaS6oMWP8jBhr4C3R8fu4Hdx_Z1lCM,577
25
25
  fastled/sketch.py,sha256=Ftbh55Nt-p4hmPuPpj8Q9HrMzvnUazhoG_q9FHcxkns,3473
@@ -36,9 +36,9 @@ fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
36
36
  fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
37
37
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
38
38
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
39
- fastled-1.3.33.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
40
- fastled-1.3.33.dist-info/METADATA,sha256=Wp6AvKuON8OkLVw-LEf8HyAyh0mAJ0AadA5J3oAJre0,30847
41
- fastled-1.3.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
42
- fastled-1.3.33.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
43
- fastled-1.3.33.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
44
- fastled-1.3.33.dist-info/RECORD,,
39
+ fastled-1.3.35.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
40
+ fastled-1.3.35.dist-info/METADATA,sha256=p78fly8dbXf0skn_cwXTmwpwAF9NUvf7wtCxTPFx1jM,30847
41
+ fastled-1.3.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
42
+ fastled-1.3.35.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
43
+ fastled-1.3.35.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
44
+ fastled-1.3.35.dist-info/RECORD,,