fastled 1.4.12__tar.gz → 1.4.16__tar.gz

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.
Files changed (134) hide show
  1. {fastled-1.4.12 → fastled-1.4.16}/PKG-INFO +1 -1
  2. {fastled-1.4.12 → fastled-1.4.16}/pyproject.toml +1 -0
  3. fastled-1.4.16/requirements.docker.txt +1 -0
  4. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/__version__.py +1 -1
  5. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/docker_manager.py +21 -1
  6. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/playwright/playwright_browser.py +24 -2
  7. fastled-1.4.16/src/fastled/settings.py +60 -0
  8. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/web_compile.py +16 -6
  9. {fastled-1.4.12 → fastled-1.4.16}/src/fastled.egg-info/PKG-INFO +1 -1
  10. {fastled-1.4.12 → fastled-1.4.16}/tests/integration/test_libcompile.py +53 -0
  11. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_cli.py +3 -2
  12. fastled-1.4.12/requirements.docker.txt +0 -1
  13. fastled-1.4.12/src/fastled/settings.py +0 -18
  14. {fastled-1.4.12 → fastled-1.4.16}/.aiderignore +0 -0
  15. {fastled-1.4.12 → fastled-1.4.16}/.cursorrules +0 -0
  16. {fastled-1.4.12 → fastled-1.4.16}/.dockerignore +0 -0
  17. {fastled-1.4.12 → fastled-1.4.16}/.github/workflows/build_multi_docker_image.yml +0 -0
  18. {fastled-1.4.12 → fastled-1.4.16}/.github/workflows/build_webpage.yml +0 -0
  19. {fastled-1.4.12 → fastled-1.4.16}/.github/workflows/lint.yml +0 -0
  20. {fastled-1.4.12 → fastled-1.4.16}/.github/workflows/publish_release.yml +0 -0
  21. {fastled-1.4.12 → fastled-1.4.16}/.github/workflows/template_build_docker_image.yml +0 -0
  22. {fastled-1.4.12 → fastled-1.4.16}/.github/workflows/test_build_exe.yml +0 -0
  23. {fastled-1.4.12 → fastled-1.4.16}/.github/workflows/test_macos.yml +0 -0
  24. {fastled-1.4.12 → fastled-1.4.16}/.github/workflows/test_ubuntu.yml +0 -0
  25. {fastled-1.4.12 → fastled-1.4.16}/.github/workflows/test_win.yml +0 -0
  26. {fastled-1.4.12 → fastled-1.4.16}/.gitignore +0 -0
  27. {fastled-1.4.12 → fastled-1.4.16}/.pylintrc +0 -0
  28. {fastled-1.4.12 → fastled-1.4.16}/.vscode/launch.json +0 -0
  29. {fastled-1.4.12 → fastled-1.4.16}/.vscode/settings.json +0 -0
  30. {fastled-1.4.12 → fastled-1.4.16}/.vscode/tasks.json +0 -0
  31. {fastled-1.4.12 → fastled-1.4.16}/DEBUGGER.md +0 -0
  32. {fastled-1.4.12 → fastled-1.4.16}/Dockerfile +0 -0
  33. {fastled-1.4.12 → fastled-1.4.16}/FAQ.md +0 -0
  34. {fastled-1.4.12 → fastled-1.4.16}/LICENSE +0 -0
  35. {fastled-1.4.12 → fastled-1.4.16}/MANIFEST.in +0 -0
  36. {fastled-1.4.12 → fastled-1.4.16}/README.md +0 -0
  37. {fastled-1.4.12 → fastled-1.4.16}/RELEASE.md +0 -0
  38. {fastled-1.4.12 → fastled-1.4.16}/TODO.md +0 -0
  39. {fastled-1.4.12 → fastled-1.4.16}/build_exe.py +0 -0
  40. {fastled-1.4.12 → fastled-1.4.16}/build_local_docker.py +0 -0
  41. {fastled-1.4.12 → fastled-1.4.16}/build_site.py +0 -0
  42. {fastled-1.4.12 → fastled-1.4.16}/clean +0 -0
  43. {fastled-1.4.12 → fastled-1.4.16}/compiler/debug.sh +0 -0
  44. {fastled-1.4.12 → fastled-1.4.16}/compiler/run.py +0 -0
  45. {fastled-1.4.12 → fastled-1.4.16}/demo/100dots.html +0 -0
  46. {fastled-1.4.12 → fastled-1.4.16}/demo/demo_threejs.html +0 -0
  47. {fastled-1.4.12 → fastled-1.4.16}/demo/micdemo.html +0 -0
  48. {fastled-1.4.12 → fastled-1.4.16}/demo/mp3upload.html +0 -0
  49. {fastled-1.4.12 → fastled-1.4.16}/demo/webgl_postprocessing_unreal_bloom.html +0 -0
  50. {fastled-1.4.12 → fastled-1.4.16}/docker-compose.yml +0 -0
  51. {fastled-1.4.12 → fastled-1.4.16}/entrypoint.sh +0 -0
  52. {fastled-1.4.12 → fastled-1.4.16}/install +0 -0
  53. {fastled-1.4.12 → fastled-1.4.16}/install_linux.sh +0 -0
  54. {fastled-1.4.12 → fastled-1.4.16}/lint +0 -0
  55. {fastled-1.4.12 → fastled-1.4.16}/requirements.testing.txt +0 -0
  56. {fastled-1.4.12 → fastled-1.4.16}/setup.cfg +0 -0
  57. {fastled-1.4.12 → fastled-1.4.16}/setup.py +0 -0
  58. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/__init__.py +0 -0
  59. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/__main__.py +0 -0
  60. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/app.py +0 -0
  61. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/args.py +0 -0
  62. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/assets/example.txt +0 -0
  63. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/assets/localhost-key.pem +0 -0
  64. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/assets/localhost.pem +0 -0
  65. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/cli.py +0 -0
  66. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/cli_test.py +0 -0
  67. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/cli_test_interactive.py +0 -0
  68. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/client_server.py +0 -0
  69. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/compile_server.py +0 -0
  70. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/compile_server_impl.py +0 -0
  71. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/filewatcher.py +0 -0
  72. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/find_good_connection.py +0 -0
  73. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/interruptible_http.py +0 -0
  74. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/keyboard.py +0 -0
  75. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/keyz.py +0 -0
  76. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/live_client.py +0 -0
  77. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/open_browser.py +0 -0
  78. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/parse_args.py +0 -0
  79. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/paths.py +0 -0
  80. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/playwright/chrome_extension_downloader.py +0 -0
  81. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/print_filter.py +0 -0
  82. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/project_init.py +0 -0
  83. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/select_sketch_directory.py +0 -0
  84. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/server_flask.py +0 -0
  85. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/server_start.py +0 -0
  86. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/site/build.py +0 -0
  87. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/site/examples.py +0 -0
  88. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/sketch.py +0 -0
  89. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/spinner.py +0 -0
  90. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/string_diff.py +0 -0
  91. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/test/can_run_local_docker_tests.py +0 -0
  92. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/test/examples.py +0 -0
  93. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/types.py +0 -0
  94. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/util.py +0 -0
  95. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/version.py +0 -0
  96. {fastled-1.4.12 → fastled-1.4.16}/src/fastled/zip_files.py +0 -0
  97. {fastled-1.4.12 → fastled-1.4.16}/src/fastled.egg-info/SOURCES.txt +0 -0
  98. {fastled-1.4.12 → fastled-1.4.16}/src/fastled.egg-info/dependency_links.txt +0 -0
  99. {fastled-1.4.12 → fastled-1.4.16}/src/fastled.egg-info/entry_points.txt +0 -0
  100. {fastled-1.4.12 → fastled-1.4.16}/src/fastled.egg-info/requires.txt +0 -0
  101. {fastled-1.4.12 → fastled-1.4.16}/src/fastled.egg-info/top_level.txt +0 -0
  102. {fastled-1.4.12 → fastled-1.4.16}/test +0 -0
  103. {fastled-1.4.12 → fastled-1.4.16}/tests/integration/test_build_examples.py +0 -0
  104. {fastled-1.4.12 → fastled-1.4.16}/tests/integration/test_examples.py +0 -0
  105. {fastled-1.4.12 → fastled-1.4.16}/tests/integration/test_playwright_integration.py +0 -0
  106. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/html/index.html +0 -0
  107. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_api.py +0 -0
  108. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_bad_ino.py +0 -0
  109. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_banner_string.py +0 -0
  110. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_cli_no_platformio.py +0 -0
  111. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_compile_server.py +0 -0
  112. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_debug_fetch_source_files.py +0 -0
  113. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_docker_linux_on_windows.py +0 -0
  114. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_embedded_data.py +0 -0
  115. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_filechanger.py +0 -0
  116. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_flask_headers.py +0 -0
  117. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_http_server.py +0 -0
  118. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_ino/bad/bad.ino +0 -0
  119. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_ino/bad_platformio/bad_platformio.ino +0 -0
  120. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_ino/bad_platformio/platformio.ini +0 -0
  121. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_ino/embedded/data/bigdata.dat +0 -0
  122. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_ino/embedded/wasm.ino +0 -0
  123. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_ino/wasm/wasm.ino +0 -0
  124. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_manual_api_invocation.py +0 -0
  125. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_no_platformio_compile.py +0 -0
  126. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_project_init.py +0 -0
  127. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_server_and_client_seperatly.py +0 -0
  128. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_session_compile.py +0 -0
  129. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_string_diff.py +0 -0
  130. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_string_diff_comprehensive.py +0 -0
  131. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_version.py +0 -0
  132. {fastled-1.4.12 → fastled-1.4.16}/tests/unit/test_webcompile.py +0 -0
  133. {fastled-1.4.12 → fastled-1.4.16}/upload_package.sh +0 -0
  134. {fastled-1.4.12 → fastled-1.4.16}/vscode-plugin/readme +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.4.12
3
+ Version: 1.4.16
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -26,6 +26,7 @@ dependencies = [
26
26
  "livereload",
27
27
  "disklru>=2.0.4",
28
28
  "playwright>=1.40.0",
29
+
29
30
  ]
30
31
 
31
32
  dynamic = ["version"]
@@ -0,0 +1 @@
1
+ fastled-wasm-server>=1.1.22
@@ -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.12"
4
+ __version__ = "1.4.16"
5
5
 
6
6
  __version_url_latest__ = "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/src/fastled/__version__.py"
@@ -980,6 +980,7 @@ class DockerManager:
980
980
  def purge(self, image_name: str) -> None:
981
981
  """
982
982
  Remove all containers and images associated with the given image name.
983
+ Also removes FastLED containers by name pattern (including test containers).
983
984
 
984
985
  Args:
985
986
  image_name: The name of the image to purge (without tag)
@@ -990,8 +991,27 @@ class DockerManager:
990
991
  try:
991
992
  containers = self.client.containers.list(all=True)
992
993
  for container in containers:
994
+ should_remove = False
995
+
996
+ # Check if container uses the specified image
993
997
  if any(image_name in tag for tag in container.image.tags):
994
- print(f"Removing container {container.name}")
998
+ should_remove = True
999
+ print(
1000
+ f"Removing container {container.name} (uses image {image_name})"
1001
+ )
1002
+
1003
+ # Also check for FastLED container name patterns (including test containers)
1004
+ elif any(
1005
+ pattern in container.name
1006
+ for pattern in [
1007
+ "fastled-wasm-container",
1008
+ "fastled-wasm-container-test",
1009
+ ]
1010
+ ):
1011
+ should_remove = True
1012
+ print(f"Removing FastLED container {container.name}")
1013
+
1014
+ if should_remove:
995
1015
  container.remove(force=True)
996
1016
 
997
1017
  except Exception as e:
@@ -369,8 +369,27 @@ class PlaywrightBrowser:
369
369
  print(f"[PYTHON] Could not get browser info: {e}")
370
370
 
371
371
  except Exception as e:
372
- print(f"[PYTHON] Error in browser tracking: {e}")
373
- continue
372
+ error_message = str(e)
373
+ # Check if the error indicates the browser/page has been closed
374
+ if any(
375
+ keyword in error_message.lower()
376
+ for keyword in [
377
+ "target page",
378
+ "context",
379
+ "browser has been closed",
380
+ "page.evaluate",
381
+ "browser closed",
382
+ "target closed",
383
+ ]
384
+ ):
385
+ print(
386
+ "[PYTHON] Browser has been closed, shutting down gracefully..."
387
+ )
388
+ self._should_exit.set()
389
+ break
390
+ else:
391
+ print(f"[PYTHON] Error in browser tracking: {e}")
392
+ continue
374
393
 
375
394
  async def wait_for_close(self) -> None:
376
395
  """Wait for the browser to be closed."""
@@ -391,6 +410,9 @@ class PlaywrightBrowser:
391
410
 
392
411
  async def close(self) -> None:
393
412
  """Close the Playwright browser."""
413
+ # Signal all tracking loops to exit
414
+ self._should_exit.set()
415
+
394
416
  if self.page:
395
417
  await self.page.close()
396
418
  self.page = None
@@ -0,0 +1,60 @@
1
+ import os
2
+ import platform
3
+ import sys
4
+
5
+ FILE_CHANGED_DEBOUNCE_SECONDS = 2.0
6
+ MACHINE = platform.machine().lower()
7
+ IS_ARM: bool = "arm" in MACHINE or "aarch64" in MACHINE
8
+ PLATFORM_TAG: str = "-arm64" if IS_ARM else ""
9
+
10
+
11
+ def _is_running_under_pytest() -> bool:
12
+ """Detect if we're running under pytest."""
13
+ # Check if pytest is in the loaded modules
14
+ if "pytest" in sys.modules:
15
+ return True
16
+
17
+ # Check for pytest environment variables
18
+ if "PYTEST_CURRENT_TEST" in os.environ:
19
+ return True
20
+
21
+ return False
22
+
23
+
24
+ def _get_container_name() -> str:
25
+ """Get the appropriate container name based on runtime context."""
26
+ base_name = "fastled-wasm-container"
27
+
28
+ if _is_running_under_pytest():
29
+ # Use test container name when running under pytest
30
+ return f"{base_name}-test{PLATFORM_TAG}"
31
+ else:
32
+ # Use regular container name
33
+ return f"{base_name}{PLATFORM_TAG}"
34
+
35
+
36
+ def _get_server_port() -> int:
37
+ """Get the appropriate server port based on runtime context."""
38
+ if _is_running_under_pytest():
39
+ # Use test port when running under pytest to avoid conflicts
40
+ return 9022
41
+ else:
42
+ # Use regular port
43
+ return 9021
44
+
45
+
46
+ CONTAINER_NAME = _get_container_name()
47
+ DEFAULT_URL = str(os.environ.get("FASTLED_URL", "https://fastled.onrender.com"))
48
+ SERVER_PORT = _get_server_port()
49
+
50
+ IMAGE_NAME = "niteris/fastled-wasm"
51
+ DEFAULT_CONTAINER_NAME = (
52
+ "fastled-wasm-container-test"
53
+ if _is_running_under_pytest()
54
+ else "fastled-wasm-container"
55
+ )
56
+ # IMAGE_TAG = "latest"
57
+
58
+ DOCKER_FILE = (
59
+ "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/Dockerfile"
60
+ )
@@ -47,10 +47,10 @@ def _check_embedded_http_status(response_content: bytes) -> tuple[bool, int | No
47
47
  lines = content_str.strip().split("\n")
48
48
  if lines:
49
49
  last_line = lines[-1].strip()
50
- if last_line.startswith("HTTP_STATUS:"):
51
- # Extract the status code
50
+ if "HTTP_STATUS:" in last_line:
52
51
  try:
53
- status_code = int(last_line.split(":", 1)[1].strip())
52
+ right = last_line.split("HTTP_STATUS:")[-1].strip()
53
+ status_code = int(right)
54
54
  return True, status_code
55
55
  except (ValueError, IndexError):
56
56
  # Malformed status line
@@ -296,10 +296,20 @@ def web_compile(
296
296
 
297
297
  # Check HTTP response status first
298
298
  if libfastled_response.status_code != 200:
299
- print(
300
- f"Warning: libfastled compilation failed with HTTP status {libfastled_response.status_code}"
299
+ msg = f"Error: libfastled compilation failed with HTTP status {libfastled_response.status_code}"
300
+
301
+ # Error out here, this is a critical error
302
+ stdout = libfastled_response.content
303
+ if stdout is not None:
304
+ stdout = stdout.decode("utf-8", errors="replace") + "\n" + msg
305
+ else:
306
+ stdout = msg
307
+ return CompileResult(
308
+ success=False,
309
+ stdout=stdout,
310
+ hash_value=None,
311
+ zip_bytes=b"",
301
312
  )
302
- # Continue with sketch compilation even if libfastled fails
303
313
  else:
304
314
  # Check for embedded HTTP status in response content
305
315
  has_embedded_status, embedded_status = _check_embedded_http_status(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.4.12
3
+ Version: 1.4.16
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -231,6 +231,59 @@ void loop() {
231
231
  print(f" Output size: {len(result.zip_bytes)} bytes")
232
232
  print(f" Hash: {result.hash_value}")
233
233
 
234
+ # Step 8: Test that libcompile fails when FastLED source is corrupted
235
+ print("\n🔨 Testing libfastled compilation failure...")
236
+
237
+ # Corrupt the FastLED source by adding an error directive
238
+ fastled_cpp_path = fastled_dir / "src" / "FastLED.cpp"
239
+ if not fastled_cpp_path.exists():
240
+ print(f"⚠️ FastLED source file not found: {fastled_cpp_path}")
241
+ print("Available files in src:")
242
+ for f in (fastled_dir / "src").iterdir():
243
+ print(f" {f.name}")
244
+ else:
245
+ # Read the original content and append the error directive
246
+ original_content = fastled_cpp_path.read_text(encoding="utf-8")
247
+ corrupted_content = (
248
+ original_content + '\n#error "Should fail"\n'
249
+ )
250
+ fastled_cpp_path.write_text(corrupted_content, encoding="utf-8")
251
+ print(f"✅ Added error directive to {fastled_cpp_path}")
252
+
253
+ # Try to compile libfastled directly via HTTP endpoint - this should fail with 400
254
+ print(
255
+ "🔨 Attempting libfastled compilation with corrupted source..."
256
+ )
257
+
258
+ # Make direct HTTP call to /compile/libfastled endpoint
259
+ compile_url = f"{server_impl.url()}/compile/libfastled"
260
+ headers = {
261
+ "accept": "application/json",
262
+ "authorization": "oBOT5jbsO4ztgrpNsQwlmFLIKB", # Default auth token
263
+ "build": BuildMode.QUICK.value.lower(),
264
+ }
265
+
266
+ with httpx.Client(timeout=60 * 3) as client:
267
+ response = client.post(
268
+ compile_url, headers=headers, follow_redirects=True
269
+ )
270
+
271
+ self.assertIn(
272
+ "HTTP_STATUS: 400",
273
+ response.text,
274
+ "Should have HTTP_STATUS: 400 in response",
275
+ )
276
+
277
+ print(
278
+ "✅ libfastled compilation correctly failed with 400 HTTP status!"
279
+ )
280
+ print("📊 Failed compilation stats:")
281
+ print(f" Response length: {len(response.text)} chars")
282
+
283
+ # Restore the original content for cleanup
284
+ fastled_cpp_path.write_text(original_content, encoding="utf-8")
285
+ print("✅ Restored original FastLED source content")
286
+
234
287
  finally:
235
288
  # Clean up server
236
289
  try:
@@ -24,12 +24,13 @@ class MainTester(unittest.TestCase):
24
24
  COMMAND,
25
25
  shell=True,
26
26
  capture_output=True,
27
- text=True,
28
27
  check=False,
29
28
  )
30
29
  ok = cp.returncode == 0
31
30
  if not ok:
32
- error_msg = "stdout:\n" + cp.stdout + "\nstderr:\n" + cp.stderr
31
+ stdout = cp.stdout.decode("utf-8", errors="replace")
32
+ stderr = cp.stderr.decode("utf-8", errors="replace")
33
+ error_msg = "stdout:\n" + stdout + "\nstderr:\n" + stderr
33
34
  # self.assertEqual(0, cp.returncode, "Command failed: " + error_msg)
34
35
  self.fail(f"Command failed with return code {cp.returncode}:\n{error_msg}")
35
36
 
@@ -1 +0,0 @@
1
- fastled-wasm-server>=1.1.21
@@ -1,18 +0,0 @@
1
- import os
2
- import platform
3
-
4
- FILE_CHANGED_DEBOUNCE_SECONDS = 2.0
5
- MACHINE = platform.machine().lower()
6
- IS_ARM: bool = "arm" in MACHINE or "aarch64" in MACHINE
7
- PLATFORM_TAG: str = "-arm64" if IS_ARM else ""
8
- CONTAINER_NAME = f"fastled-wasm-container{PLATFORM_TAG}"
9
- DEFAULT_URL = str(os.environ.get("FASTLED_URL", "https://fastled.onrender.com"))
10
- SERVER_PORT = 9021
11
-
12
- IMAGE_NAME = "niteris/fastled-wasm"
13
- DEFAULT_CONTAINER_NAME = "fastled-wasm-container"
14
- # IMAGE_TAG = "latest"
15
-
16
- DOCKER_FILE = (
17
- "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/Dockerfile"
18
- )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes