fastled 1.4.10__py3-none-any.whl → 1.4.11__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/__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.4.10"
4
+ __version__ = "1.4.11"
5
5
 
6
6
  __version_url_latest__ = "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/src/fastled/__version__.py"
fastled/web_compile.py CHANGED
@@ -30,6 +30,38 @@ def _sanitize_host(host: str) -> str:
30
30
  return host if host.startswith("http://") else f"http://{host}"
31
31
 
32
32
 
33
+ def _check_embedded_http_status(response_content: bytes) -> tuple[bool, int | None]:
34
+ """
35
+ Check if the response content has an embedded HTTP status at the end.
36
+
37
+ Returns:
38
+ tuple: (has_embedded_status, status_code)
39
+ has_embedded_status is True if an embedded status was found
40
+ status_code is the embedded status code or None if not found
41
+ """
42
+ try:
43
+ # Convert bytes to string for parsing
44
+ content_str = response_content.decode("utf-8", errors="ignore")
45
+
46
+ # Look for HTTP_STATUS: at the end of the content
47
+ lines = content_str.strip().split("\n")
48
+ if lines:
49
+ last_line = lines[-1].strip()
50
+ if last_line.startswith("HTTP_STATUS:"):
51
+ # Extract the status code
52
+ try:
53
+ status_code = int(last_line.split(":", 1)[1].strip())
54
+ return True, status_code
55
+ except (ValueError, IndexError):
56
+ # Malformed status line
57
+ return True, None
58
+
59
+ return False, None
60
+ except Exception:
61
+ # If we can't parse the content, assume no embedded status
62
+ return False, None
63
+
64
+
33
65
  def _banner(msg: str) -> str:
34
66
  """
35
67
  Create a banner for the given message.
@@ -261,13 +293,33 @@ def web_compile(
261
293
  print("Step 1: Compiling libfastled...")
262
294
  try:
263
295
  libfastled_response = _compile_libfastled(host, auth_token, build_mode)
296
+
297
+ # Check HTTP response status first
264
298
  if libfastled_response.status_code != 200:
265
299
  print(
266
- f"Warning: libfastled compilation failed with status {libfastled_response.status_code}"
300
+ f"Warning: libfastled compilation failed with HTTP status {libfastled_response.status_code}"
267
301
  )
268
302
  # Continue with sketch compilation even if libfastled fails
269
303
  else:
270
- print("✅ libfastled compilation successful")
304
+ # Check for embedded HTTP status in response content
305
+ has_embedded_status, embedded_status = _check_embedded_http_status(
306
+ libfastled_response.content
307
+ )
308
+ if has_embedded_status:
309
+ if embedded_status is not None and embedded_status != 200:
310
+ print(
311
+ f"Warning: libfastled compilation failed with embedded status {embedded_status}"
312
+ )
313
+ # Continue with sketch compilation even if libfastled fails
314
+ elif embedded_status is None:
315
+ print(
316
+ "Warning: libfastled compilation returned malformed embedded status"
317
+ )
318
+ # Continue with sketch compilation even if libfastled fails
319
+ else:
320
+ print("✅ libfastled compilation successful")
321
+ else:
322
+ print("✅ libfastled compilation successful")
271
323
  except Exception as e:
272
324
  print(f"Warning: libfastled compilation failed: {e}")
273
325
  # Continue with sketch compilation even if libfastled fails
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.4.10
3
+ Version: 1.4.11
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -1,6 +1,6 @@
1
1
  fastled/__init__.py,sha256=dahiY41HLLotTjqmpVJmXSwUEp8NKqoZ57jt55hBLa4,7667
2
2
  fastled/__main__.py,sha256=OcKv2ER1_iQAsZzLIUb3C8hRC9L2clNOhCrjpshrlf4,336
3
- fastled/__version__.py,sha256=79y56vY5gQySq33JTd8MFfXtNmylXNSfvohTya9mP_M,373
3
+ fastled/__version__.py,sha256=InZABLRZggZzcotBSOzvVJNzKcpNtCifyL7ZSI4-RDs,373
4
4
  fastled/app.py,sha256=6XOuObi72AUnZXASDOVbcSflr4He0xnIDk5P8nVmVus,6131
5
5
  fastled/args.py,sha256=d8Afa7NMcNLMIQqIBX_ZOL5JOyeJ7XCch4LdkhFNChk,3671
6
6
  fastled/cli.py,sha256=drgR2AOxVrj3QEz58iiKscYAumbbin2vIV-k91VCOAA,561
@@ -31,7 +31,7 @@ fastled/string_diff.py,sha256=oTncu0qYdLlLUtYLLDB4bzdQ2OfzegAR6XNAzwE9fIs,6002
31
31
  fastled/types.py,sha256=ZDf1TbTT4XgA_pKIwr4JbkDB38_29ogSdDORjoT-zuY,1803
32
32
  fastled/util.py,sha256=TjhXbUNh4p2BGhNAldSeL68B7BBOjsWAXji5gy-vDEQ,1440
33
33
  fastled/version.py,sha256=TpBMiEVdO3_sUZEu6wmwN8Q4AgX2BiCxStCsnPKh6E0,1209
34
- fastled/web_compile.py,sha256=8wJ6EK01hHsQLfeon4_TQaEDQZjsHHPidPPIzjMYUuM,9960
34
+ fastled/web_compile.py,sha256=-wC9ECwcpeHWslaYBGU2Pyxw-3rVzcO8MS3mMbrxvAw,12284
35
35
  fastled/zip_files.py,sha256=BgHFjaLJ7wF6mnzjqOgn76VcKDwhwc_-w_qyUG_-aNs,2815
36
36
  fastled/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
37
37
  fastled/assets/localhost-key.pem,sha256=Q-CNO_UoOd8fFNN4ljcnqwUeCMhzTplRjLO2x0pYRlU,1704
@@ -42,9 +42,9 @@ fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
42
42
  fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
43
43
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
44
44
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
45
- fastled-1.4.10.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
46
- fastled-1.4.10.dist-info/METADATA,sha256=ZUfEDRHSSsMmIZSZ4j3FCypY9lIZ4Yxuloo4HfU9QIc,31910
47
- fastled-1.4.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
- fastled-1.4.10.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
49
- fastled-1.4.10.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
50
- fastled-1.4.10.dist-info/RECORD,,
45
+ fastled-1.4.11.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
46
+ fastled-1.4.11.dist-info/METADATA,sha256=8E7b3fiwVxjjQMEXqV3LD0VOocn50otnANeJE_-eReY,31910
47
+ fastled-1.4.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
+ fastled-1.4.11.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
49
+ fastled-1.4.11.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
50
+ fastled-1.4.11.dist-info/RECORD,,