fastled 1.2.26__py3-none-any.whl → 1.2.27__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
@@ -15,7 +15,7 @@ from .types import BuildMode, CompileResult, CompileServerError
15
15
  # IMPORTANT! There's a bug in github which will REJECT any version update
16
16
  # that has any other change in the repo. Please bump the version as the
17
17
  # ONLY change in a commit, or else the pypi update and the release will fail.
18
- __version__ = "1.2.26"
18
+ __version__ = "1.2.27"
19
19
 
20
20
 
21
21
  class Api:
fastled/app.py CHANGED
@@ -7,7 +7,7 @@ import sys
7
7
  import time
8
8
  from pathlib import Path
9
9
 
10
- from fastled.client_server import run_client_server
10
+ from fastled.client_server import run_client, run_client_server
11
11
  from fastled.compile_server import CompileServer
12
12
  from fastled.parse_args import parse_args
13
13
 
@@ -55,14 +55,37 @@ def main() -> int:
55
55
  try:
56
56
  project_root = Path(".").absolute()
57
57
  print(f"Building Docker image at {project_root}")
58
- from fastled import Docker
58
+ from fastled import Api, Docker
59
59
 
60
60
  docker_image_name = Docker.build_from_fastled_repo(
61
61
  project_root=project_root
62
62
  )
63
63
  print(f"Built Docker image: {docker_image_name}")
64
- print("Exiting...")
65
- return 0
64
+ if not args.directory:
65
+ print("No sketch directory specified. So exiting...")
66
+ return 0
67
+ print("Running server")
68
+ with Api.server(
69
+ auto_updates=False, container_name=docker_image_name
70
+ ) as server:
71
+ sketch_dir = Path("examples/wasm")
72
+ if args.just_compile:
73
+ rtn = run_client(
74
+ directory=sketch_dir,
75
+ host=server,
76
+ open_web_browser=False,
77
+ keep_running=False,
78
+ )
79
+ if rtn != 0:
80
+ print(f"Failed to compile: {rtn})")
81
+ return rtn
82
+ print(f"Server started at {server.url()}")
83
+ with Api.live_client(
84
+ sketch_directory=sketch_dir, host=server
85
+ ) as client:
86
+ print(f"Client started at {client.url()}")
87
+ while True:
88
+ time.sleep(0.1)
66
89
  except KeyboardInterrupt:
67
90
  print("\nExiting from client...")
68
91
  return 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: fastled
3
- Version: 1.2.26
3
+ Version: 1.2.27
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -1,5 +1,5 @@
1
- fastled/__init__.py,sha256=Oii9My4i8BhaJJ5_54OtzBeudi2v8KWMWMmLF4Id4v0,11084
2
- fastled/app.py,sha256=mCa40qcIlnceiEnLe1m84wWiyqT7fZBw2sSbCpP5Lt8,2489
1
+ fastled/__init__.py,sha256=R1955XZ5c1biLCzM64-LcH7tXO-qFNyap7vo3gBoO4E,11084
2
+ fastled/app.py,sha256=uK-Ag2R4-FB6PyKorVOpBsujGn-jO7aYJEY8Kw76vc0,3512
3
3
  fastled/cli.py,sha256=FjVr31ht0UPlAcmX-84NwfAGMQHTkrCe4o744jCAxiw,375
4
4
  fastled/client_server.py,sha256=eORWVyI1PvyowmhLWt3V9aI_AemPSBL9bAkjMBD2kAw,14282
5
5
  fastled/compile_server.py,sha256=g0y9vEZqpzAJEUwketV8lbwI8VZNSSLuOuwcF04k-dw,2775
@@ -25,9 +25,9 @@ fastled/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
25
25
  fastled/site/build.py,sha256=l4RajIk0bApiAifT1lyLjIZi9lpPtSba4cnwWP5UOKc,14064
26
26
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
27
27
  fastled/test/examples.py,sha256=6xPwx_k9_XwYTpI1nk4SrYbsJKHJACd30GzD1epGqhY,1597
28
- fastled-1.2.26.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
29
- fastled-1.2.26.dist-info/METADATA,sha256=aiwrYo7A8eyCXVxmVXpqT9kUP7rcFKJEISUWmOSg-xs,21176
30
- fastled-1.2.26.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
31
- fastled-1.2.26.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
32
- fastled-1.2.26.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
33
- fastled-1.2.26.dist-info/RECORD,,
28
+ fastled-1.2.27.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
29
+ fastled-1.2.27.dist-info/METADATA,sha256=sPPPBlnze8yx3H_HJmpRVipJ0FuNn4N2I7Cen_w53TE,21176
30
+ fastled-1.2.27.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
31
+ fastled-1.2.27.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
32
+ fastled-1.2.27.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
33
+ fastled-1.2.27.dist-info/RECORD,,