fastled 1.2.93__py3-none-any.whl → 1.2.94__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 +1 -1
- fastled/server_flask.py +20 -14
- {fastled-1.2.93.dist-info → fastled-1.2.94.dist-info}/METADATA +2 -2
- {fastled-1.2.93.dist-info → fastled-1.2.94.dist-info}/RECORD +8 -8
- {fastled-1.2.93.dist-info → fastled-1.2.94.dist-info}/WHEEL +0 -0
- {fastled-1.2.93.dist-info → fastled-1.2.94.dist-info}/entry_points.txt +0 -0
- {fastled-1.2.93.dist-info → fastled-1.2.94.dist-info}/licenses/LICENSE +0 -0
- {fastled-1.2.93.dist-info → fastled-1.2.94.dist-info}/top_level.txt +0 -0
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.2.
|
17
|
+
__version__ = "1.2.94"
|
18
18
|
|
19
19
|
|
20
20
|
class Api:
|
fastled/server_flask.py
CHANGED
@@ -23,9 +23,22 @@ else:
|
|
23
23
|
logger = logging.getLogger("flask_server")
|
24
24
|
logger.disabled = True
|
25
25
|
|
26
|
-
_DRAWF_SOURCE_FASTLED = "drawfsource/
|
26
|
+
_DRAWF_SOURCE_FASTLED = "drawfsource/src/drawfsource/git/fastled/src"
|
27
27
|
_DRAWF_SOURCE_EMSDK = "drawfsource/js/drawfsource/emsdk/"
|
28
28
|
|
29
|
+
# Mirrors what's on the server.
|
30
|
+
_PATTERNS_FASTLED_SRC = [
|
31
|
+
"drawfsource/js/src/drawfsource/git/fastled/src/",
|
32
|
+
"drawfsource/js/drawfsource/headers/",
|
33
|
+
]
|
34
|
+
|
35
|
+
|
36
|
+
def _resolve_fastled_src(drawfsource: str) -> str | None:
|
37
|
+
for pattern in _PATTERNS_FASTLED_SRC:
|
38
|
+
if drawfsource.startswith(pattern):
|
39
|
+
return drawfsource[len(pattern) :]
|
40
|
+
return None
|
41
|
+
|
29
42
|
|
30
43
|
def _run_flask_server(
|
31
44
|
fastled_js: Path,
|
@@ -140,21 +153,14 @@ def _run_flask_server(
|
|
140
153
|
logger.error(error_msg)
|
141
154
|
return Response(error_msg, status=400)
|
142
155
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
logger.error(error_msg)
|
149
|
-
# Logging disabled
|
150
|
-
return Response("Malformed path", status=400)
|
151
|
-
|
152
|
-
# Weird magic being played with these paths, it's beyond me.
|
153
|
-
if path.startswith(_DRAWF_SOURCE_FASTLED):
|
154
|
-
path = path[len("/drawfsource") :]
|
156
|
+
resolved: str | None = _resolve_fastled_src(path)
|
157
|
+
if resolved is None:
|
158
|
+
# If the path does not match the expected patterns, return a 404
|
159
|
+
logger.error(f"Path does not match expected patterns: {path}")
|
160
|
+
return Response("Not Found", status=404)
|
155
161
|
|
156
162
|
# Forward the request to the compile server
|
157
|
-
target_url = f"http://localhost:{compile_server_port}/
|
163
|
+
target_url = f"http://localhost:{compile_server_port}/sourcefiles/{path}"
|
158
164
|
logger.info(f"Requesting: {target_url}")
|
159
165
|
logger.info(f"Processing dwarfsource request for {path}")
|
160
166
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.94
|
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.
|
23
|
+
Requires-Dist: fastled-wasm-server>=1.0.13
|
24
24
|
Dynamic: home-page
|
25
25
|
Dynamic: license-file
|
26
26
|
Dynamic: maintainer
|
@@ -1,4 +1,4 @@
|
|
1
|
-
fastled/__init__.py,sha256=
|
1
|
+
fastled/__init__.py,sha256=3olm9Ojfjl2kG3HObvjNcZASUUzAQSRIbXPUzARL7eo,7044
|
2
2
|
fastled/app.py,sha256=LyQXHmIjK8aqel9sDRmzSHjnOiaITbsnGPoz6IDXQFc,6032
|
3
3
|
fastled/cli.py,sha256=FjVr31ht0UPlAcmX-84NwfAGMQHTkrCe4o744jCAxiw,375
|
4
4
|
fastled/cli_test.py,sha256=qJB9yLRFR3OwOwdIWSQ0fQsWLnA37v5pDccufiP_hTs,512
|
@@ -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=
|
20
|
+
fastled/server_flask.py,sha256=He2CZ65YvDWbjF7Lc3ryONfo2D5SWQ4FxsztQlxaE8s,18269
|
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.2.
|
37
|
-
fastled-1.2.
|
38
|
-
fastled-1.2.
|
39
|
-
fastled-1.2.
|
40
|
-
fastled-1.2.
|
41
|
-
fastled-1.2.
|
36
|
+
fastled-1.2.94.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
37
|
+
fastled-1.2.94.dist-info/METADATA,sha256=Tub7m_KbSuL4uHwkj1IvgN7my0omZhONapIFnlTxsFU,30050
|
38
|
+
fastled-1.2.94.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
39
|
+
fastled-1.2.94.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
|
40
|
+
fastled-1.2.94.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
|
41
|
+
fastled-1.2.94.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|