fastled 1.3.0__py3-none-any.whl → 1.3.1__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
@@ -14,7 +14,7 @@ from .types import BuildMode, CompileResult, CompileServerError, FileResponse
14
14
  # IMPORTANT! There's a bug in github which will REJECT any version update
15
15
  # that has any other change in the repo. Please bump the version as the
16
16
  # ONLY change in a commit, or else the pypi update and the release will fail.
17
- __version__ = "1.3.0"
17
+ __version__ = "1.3.1"
18
18
 
19
19
 
20
20
  class Api:
fastled/compile_server.py CHANGED
@@ -1,6 +1,6 @@
1
1
  from pathlib import Path
2
2
 
3
- from fastled.types import BuildMode, CompileResult, FileResponse, Platform
3
+ from fastled.types import BuildMode, CompileResult, Platform
4
4
 
5
5
 
6
6
  class CompileServer:
@@ -53,10 +53,6 @@ class CompileServer:
53
53
 
54
54
  project_init(example=example, outputdir=outputdir)
55
55
 
56
- def fetch_source_file(self, filepath: str) -> FileResponse | Exception:
57
- """Get the source file from the server."""
58
- return self.impl.fetch_source_file(filepath)
59
-
60
56
  @property
61
57
  def name(self) -> str:
62
58
  return self.impl.container_name
@@ -17,7 +17,7 @@ from fastled.docker_manager import (
17
17
  )
18
18
  from fastled.settings import DEFAULT_CONTAINER_NAME, IMAGE_NAME, SERVER_PORT
19
19
  from fastled.sketch import looks_like_fastled_repo
20
- from fastled.types import BuildMode, CompileResult, CompileServerError, FileResponse
20
+ from fastled.types import BuildMode, CompileResult, CompileServerError
21
21
  from fastled.util import port_is_free
22
22
 
23
23
  SERVER_OPTIONS = [
@@ -183,29 +183,6 @@ class CompileServerImpl:
183
183
  return False
184
184
  return False
185
185
 
186
- def fetch_source_file(self, filepath: str) -> FileResponse | Exception:
187
- """Get the source file from the server."""
188
- if not self._port:
189
- raise RuntimeError("Server has not been started yet")
190
- try:
191
- httpx_client = httpx.Client()
192
- url = f"http://localhost:{self._port}/sourcefiles/{filepath}"
193
- response = httpx_client.get(url, follow_redirects=True)
194
- if response.status_code == 200:
195
- content = response.text
196
- mimetype: str = response.headers.get("Content-Type", "text/plain")
197
- return FileResponse(
198
- content=content,
199
- mimetype=mimetype,
200
- filename=filepath,
201
- )
202
- else:
203
- return CompileServerError(
204
- f"Error fetching file {filepath}: {response.status_code}"
205
- )
206
- except httpx.RequestError as e:
207
- return CompileServerError(f"Error fetching file {filepath}: {e}")
208
-
209
186
  def _start(self) -> int:
210
187
  print("Compiling server starting")
211
188
 
fastled/server_flask.py CHANGED
@@ -125,9 +125,14 @@ def _run_flask_server(
125
125
  logger.error(f"Error forwarding request: {e}", exc_info=True)
126
126
  return Response(f"Error: {str(e)}", status=500)
127
127
 
128
- def handle_dwarfsource(path: str) -> Response:
129
- """Handle requests to /drawfsource/js/fastled/src/
130
- or /drawfsource/js/drawfsource/emsdk/*"""
128
+ def handle_fastledsource(path: str) -> Response:
129
+ """Handle requests to
130
+ /fastledsource/js/fastledsource/git/fastled/src/
131
+ or
132
+ /sketchsource/js/src/Blink.ino
133
+
134
+ The names are a bit mangled due to the way C++ prefixing works near the root directory.
135
+ """
131
136
  from flask import request
132
137
 
133
138
  start_time = time.time()
@@ -314,9 +319,11 @@ def _run_flask_server(
314
319
  logger.info(f"Received request for path: {path}")
315
320
 
316
321
  try:
317
- if path.startswith("drawfsource/"):
322
+ if path.startswith("fastledsource/") or path.startswith(
323
+ "sketchsource/"
324
+ ):
318
325
  logger.info(f"Handling as drawfsource: {path}")
319
- return handle_dwarfsource(path)
326
+ return handle_fastledsource(path)
320
327
  elif path.startswith("sourcefiles/"):
321
328
  logger.info(f"Handling as sourcefiles: {path}")
322
329
  return handle_sourcefile(path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -20,7 +20,7 @@ Requires-Dist: progress>=1.6
20
20
  Requires-Dist: watchfiles>=1.0.5
21
21
  Requires-Dist: Flask>=3.0.0
22
22
  Requires-Dist: livereload
23
- Requires-Dist: fastled-wasm-server>=1.0.22
23
+ Requires-Dist: fastled-wasm-server>=1.0.23
24
24
  Dynamic: home-page
25
25
  Dynamic: license-file
26
26
  Dynamic: maintainer
@@ -1,11 +1,11 @@
1
- fastled/__init__.py,sha256=r0CgzyJXgaLblHUB7BD0N9eBMGn3yEx9nFmht1yCU94,7043
1
+ fastled/__init__.py,sha256=VvY5QdvHcJ-Lv876jDXi030MtomWs60ECdy_GqXGzRQ,7043
2
2
  fastled/app.py,sha256=1N5Q486YccaWCRqnaI2F04ktL64NAVjAN6i4c-zgm1o,5818
3
3
  fastled/cli.py,sha256=5EBsb02ueFUjlgrlg0GMdj3e5nnHVhvofmYyQRaw8uM,565
4
4
  fastled/cli_test.py,sha256=qJB9yLRFR3OwOwdIWSQ0fQsWLnA37v5pDccufiP_hTs,512
5
5
  fastled/cli_test_interactive.py,sha256=BjNhveZOk5aCffHbcrxPQQjWmAuj4ClVKKcKX5eY6yM,542
6
6
  fastled/client_server.py,sha256=falqUhGSHQpNfEXNCcQFPDAZymfncEVhIDcURBIJTFk,18390
7
- fastled/compile_server.py,sha256=sRiXYzw7lv9vcWJWGPUkzOGZPmvZGV_TGwbHYoRc15s,3155
8
- fastled/compile_server_impl.py,sha256=FxTuQTojpA7j59v7zSGh1LEeG4Yu0MFgW9SKfHpspQg,13243
7
+ fastled/compile_server.py,sha256=rkXvrvdav5vDG8lv_OlBX3YSCHtnHMt25nXbfeg_r78,2960
8
+ fastled/compile_server_impl.py,sha256=MIe-GvKenoDaqX8VhCJ7KNIWTOHHcLPgUQ7kO6lsa38,12199
9
9
  fastled/docker_manager.py,sha256=6zg1JcrBFj0fbFc1adPoT6_8GE0YFAPHG80Cf7ytYGE,37139
10
10
  fastled/filewatcher.py,sha256=3qS3L7zMQhFuVrkeGn1djsB_cB6x_E2YGJmmQWVAU_w,10033
11
11
  fastled/keyboard.py,sha256=UTAsqCn1UMYnB8YDzENiLTj4GeL45tYfEcO7_5fLFEg,3556
@@ -17,7 +17,7 @@ fastled/paths.py,sha256=VsPmgu0lNSCFOoEC0BsTYzDygXqy15AHUfN-tTuzDZA,99
17
17
  fastled/print_filter.py,sha256=B0v493WAFN8DgG7aqM8iXMqI_V1EdMMvOnNQ26JNUxU,5499
18
18
  fastled/project_init.py,sha256=bBt4DwmW5hZkm9ICt9Qk-0Nr_0JQM7icCgH5Iv-bCQs,3984
19
19
  fastled/select_sketch_directory.py,sha256=-eudwCns3AKj4HuHtSkZAFwbnf005SNL07pOzs9VxnE,1383
20
- fastled/server_flask.py,sha256=xwoBJ0-biUGK26thUfZLtU0DK9evWz-YmhCs5z_eVz0,17456
20
+ fastled/server_flask.py,sha256=QOH-Lo5UDFAACpA8wzbBSIFpLjM5F7tshpX5CUbvV4k,17689
21
21
  fastled/server_start.py,sha256=W9yKStkRlRNuXeV6j_6O7HjjFPyVLBHMcF9Uy2QjDWQ,479
22
22
  fastled/settings.py,sha256=dUVyJ8Mtprg0RwaS6oMWP8jBhr4C3R8fu4Hdx_Z1lCM,577
23
23
  fastled/sketch.py,sha256=Ftbh55Nt-p4hmPuPpj8Q9HrMzvnUazhoG_q9FHcxkns,3473
@@ -33,9 +33,9 @@ fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
33
33
  fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
34
34
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
35
35
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
36
- fastled-1.3.0.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
37
- fastled-1.3.0.dist-info/METADATA,sha256=PBAFal0DYFzbAfQFTQeSoMpF3lopVc3SUmBvfSe2MsA,30049
38
- fastled-1.3.0.dist-info/WHEEL,sha256=A8Eltl-h0W-qZDVezsLjjslosEH_pdYC2lQ0JcbgCzs,91
39
- fastled-1.3.0.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
40
- fastled-1.3.0.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
41
- fastled-1.3.0.dist-info/RECORD,,
36
+ fastled-1.3.1.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
37
+ fastled-1.3.1.dist-info/METADATA,sha256=p2QjWihOI6WOjdqcCoItvChi9O-hcvR0IYbN80pHJPg,30049
38
+ fastled-1.3.1.dist-info/WHEEL,sha256=QZxptf4Y1BKFRCEDxD4h2V0mBFQOVFLFEpvxHmIs52A,91
39
+ fastled-1.3.1.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
40
+ fastled-1.3.1.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
41
+ fastled-1.3.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.0)
2
+ Generator: setuptools (80.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5