fastled 1.4.17__py3-none-any.whl → 1.4.19__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.17"
4
+ __version__ = "1.4.19"
5
5
 
6
6
  __version_url_latest__ = "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/src/fastled/__version__.py"
fastled/args.py CHANGED
@@ -16,6 +16,7 @@ class Args:
16
16
  app: bool # New flag to trigger Playwright browser with browser download if needed
17
17
  auto_update: bool | None
18
18
  update: bool
19
+ background_update: bool
19
20
  localhost: bool
20
21
  build: bool
21
22
  server: bool
@@ -57,6 +58,9 @@ class Args:
57
58
  args.no_auto_updates, bool | None
58
59
  ), f"expected bool | None, got {type(args.no_auto_updates)}"
59
60
  assert isinstance(args.update, bool), f"expected bool, got {type(args.update)}"
61
+ assert isinstance(
62
+ args.background_update, bool
63
+ ), f"expected bool, got {type(args.background_update)}"
60
64
  assert isinstance(
61
65
  args.localhost, bool
62
66
  ), f"expected bool, got {type(args.localhost)}"
@@ -88,6 +92,7 @@ class Args:
88
92
  app=args.app,
89
93
  auto_update=not args.no_auto_updates,
90
94
  update=args.update,
95
+ background_update=args.background_update,
91
96
  localhost=args.localhost,
92
97
  build=args.build,
93
98
  server=args.server,
fastled/client_server.py CHANGED
@@ -243,14 +243,30 @@ def _try_make_compile_server(
243
243
  return None
244
244
 
245
245
 
246
- def _is_local_host(host: str) -> bool:
246
+ def _background_update_docker_image() -> None:
247
+ """Perform docker image update in the background."""
248
+ try:
249
+ print("\n🔄 Starting background update of docker image...")
250
+ docker_manager = DockerManager()
251
+ updated = docker_manager.validate_or_download_image(
252
+ image_name=IMAGE_NAME, tag="latest", upgrade=True
253
+ )
254
+ if updated:
255
+ print("✅ Background docker image update completed successfully.")
256
+ else:
257
+ print("ℹ️ Docker image was already up to date.")
258
+ except Exception as e:
259
+ print(f"⚠️ Background docker image update failed: {e}")
260
+
261
+
262
+ def _is_local_host(url: str) -> bool:
247
263
  return (
248
- host.startswith("http://localhost")
249
- or host.startswith("http://127.0.0.1")
250
- or host.startswith("http://0.0.0.0")
251
- or host.startswith("http://[::]")
252
- or host.startswith("http://[::1]")
253
- or host.startswith("http://[::ffff:127.0.0.1]")
264
+ url.startswith("http://localhost")
265
+ or url.startswith("http://127.0.0.1")
266
+ or url.startswith("http://0.0.0.0")
267
+ or url.startswith("http://[::]")
268
+ or url.startswith("http://[::1]")
269
+ or url.startswith("http://[::ffff:127.0.0.1]")
254
270
  )
255
271
 
256
272
 
@@ -268,6 +284,7 @@ def run_client(
268
284
  clear: bool = False,
269
285
  no_platformio: bool = False,
270
286
  app: bool = False, # Use app-like browser experience
287
+ background_update: bool = False,
271
288
  ) -> int:
272
289
  has_checked_newer_version_yet = False
273
290
  compile_server: CompileServer | None = None
@@ -426,9 +443,20 @@ def run_client(
426
443
  )
427
444
  if has_update:
428
445
  print(f"\n🔄 {message}")
429
- print(
430
- "Run with `fastled -u` to update the docker image to the latest version."
431
- )
446
+ if background_update:
447
+ # Start background update in a separate thread
448
+ update_thread = threading.Thread(
449
+ target=_background_update_docker_image, daemon=True
450
+ )
451
+ update_thread.start()
452
+ background_update = False
453
+ else:
454
+ print(
455
+ "Run with `fastled -u` to update the docker image to the latest version."
456
+ )
457
+ print(
458
+ "Or use `--background-update` to update automatically in the background after compilation."
459
+ )
432
460
  except Exception as e:
433
461
  # Don't let Docker check failures interrupt the main flow
434
462
  warnings.warn(f"Failed to check for Docker image updates: {e}")
@@ -513,6 +541,7 @@ def run_client_server(args: Args) -> int:
513
541
  profile = bool(args.profile)
514
542
  web: str | bool = args.web if isinstance(args.web, str) else bool(args.web)
515
543
  auto_update = bool(args.auto_update)
544
+ background_update = bool(args.background_update)
516
545
  localhost = bool(args.localhost)
517
546
  directory = args.directory if args.directory else Path(".")
518
547
  just_compile = bool(args.just_compile)
@@ -585,6 +614,7 @@ def run_client_server(args: Args) -> int:
585
614
  clear=args.clear,
586
615
  no_platformio=no_platformio,
587
616
  app=app,
617
+ background_update=background_update,
588
618
  )
589
619
  except KeyboardInterrupt:
590
620
  return 1
fastled/parse_args.py CHANGED
@@ -34,6 +34,7 @@ FastLED WASM Compiler - Useful options:
34
34
  --quick Build in quick mode (default)
35
35
  --profile Enable profiling the C++ build system
36
36
  --update Update the docker image for the wasm compiler
37
+ --background-update Update the docker image in the background after compilation
37
38
  --purge Remove all FastLED containers and images
38
39
  --version Show version information
39
40
  --help Show detailed help
@@ -41,6 +42,7 @@ Examples:
41
42
  fastled (will auto detect the sketch directory and prompt you)
42
43
  fastled my_sketch
43
44
  fastled my_sketch --web (compiles using the web compiler only)
45
+ fastled my_sketch --background-update (compiles and updates docker image in background)
44
46
  fastled --init Blink (initializes a new sketch directory with the Blink example)
45
47
  fastled --server (runs the compiler server in the current directory)
46
48
 
@@ -132,6 +134,11 @@ def parse_args() -> Args:
132
134
  action="store_true",
133
135
  help="Update the wasm compiler (if necessary) before running",
134
136
  )
137
+ parser.add_argument(
138
+ "--background-update",
139
+ action="store_true",
140
+ help="Update the docker image in the background after compilation (user doesn't have to wait)",
141
+ )
135
142
  parser.add_argument(
136
143
  "--localhost",
137
144
  "--local",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.4.17
3
+ Version: 1.4.19
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -1,12 +1,12 @@
1
1
  fastled/__init__.py,sha256=dahiY41HLLotTjqmpVJmXSwUEp8NKqoZ57jt55hBLa4,7667
2
2
  fastled/__main__.py,sha256=OcKv2ER1_iQAsZzLIUb3C8hRC9L2clNOhCrjpshrlf4,336
3
- fastled/__version__.py,sha256=aZOVGnEMQZuoy_zfnFeAaPih_9_5BaDK67H7ZGs2cRo,373
3
+ fastled/__version__.py,sha256=UWEcNXCiDl8NLIlH9x1veFqU-IpNz4bHPcnrTK8Aw6U,373
4
4
  fastled/app.py,sha256=yZP_UbLLyteBkiYJQQLvqHmH14xwrayGKbL7jtjY6g4,6225
5
- fastled/args.py,sha256=d8Afa7NMcNLMIQqIBX_ZOL5JOyeJ7XCch4LdkhFNChk,3671
5
+ fastled/args.py,sha256=uYNM4ALYaB6vj4q4ypfvrgK7tNCEgvC_MBAyGyIeEx8,3885
6
6
  fastled/cli.py,sha256=drgR2AOxVrj3QEz58iiKscYAumbbin2vIV-k91VCOAA,561
7
7
  fastled/cli_test.py,sha256=W-1nODZrip_JU6BEbYhxOa4ckxduOsiX8zIoRkTyxv4,550
8
8
  fastled/cli_test_interactive.py,sha256=BjNhveZOk5aCffHbcrxPQQjWmAuj4ClVKKcKX5eY6yM,542
9
- fastled/client_server.py,sha256=H590e_FkoWlj7DX_SD0hEkbtoWJoG73MrHtzxEFvqnA,21441
9
+ fastled/client_server.py,sha256=fp4TQB454PntW_twCPaBxgc_onOLdCT9VpEveLNPepc,22840
10
10
  fastled/compile_server.py,sha256=iGUjteXKp5Dlp7mxAE4eD4s0NWgApRIp4ZjtcAN2iZY,3124
11
11
  fastled/compile_server_impl.py,sha256=iCwNCs7YxypUuVPmY4979mOgoH9OiuAJa1a1bmpG1cc,12567
12
12
  fastled/docker_manager.py,sha256=c0-DBA4_YtCl2XgtohL6uKtW0TK6vkHO0o2vympZShg,41089
@@ -17,7 +17,7 @@ fastled/keyboard.py,sha256=UTAsqCn1UMYnB8YDzENiLTj4GeL45tYfEcO7_5fLFEg,3556
17
17
  fastled/keyz.py,sha256=LO-8m_7CpNDiZLM-FXhQ30f9gN1bUYz5lOsUPTIbI-c,4020
18
18
  fastled/live_client.py,sha256=GPQf6Vj8mneEs4kc_nrfPlw-OmMMuDiIe2iWrP7FeeQ,3143
19
19
  fastled/open_browser.py,sha256=N0d_D87sSBOUbBUl7gktJufdyM1laEKIERCXnEYCyu4,5086
20
- fastled/parse_args.py,sha256=UiGgFoR_7ZCVC26rxE4FpxpmPu9xBhiiCD4pwmY_gLw,11520
20
+ fastled/parse_args.py,sha256=89jAzy4kn55AJhKvJhv6xL-96taR1YwUl1gHkvOwdlg,11889
21
21
  fastled/paths.py,sha256=VsPmgu0lNSCFOoEC0BsTYzDygXqy15AHUfN-tTuzDZA,99
22
22
  fastled/print_filter.py,sha256=nc_rqYYdCUPinFycaK7fiQF5PG1up51pmJptR__QyAs,1499
23
23
  fastled/project_init.py,sha256=bBt4DwmW5hZkm9ICt9Qk-0Nr_0JQM7icCgH5Iv-bCQs,3984
@@ -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.17.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
46
- fastled-1.4.17.dist-info/METADATA,sha256=RPd7A2q-2kzwWptmRngfg2U3DEYfg6Jmh_XnmBHjEBA,31910
47
- fastled-1.4.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
- fastled-1.4.17.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
49
- fastled-1.4.17.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
50
- fastled-1.4.17.dist-info/RECORD,,
45
+ fastled-1.4.19.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
46
+ fastled-1.4.19.dist-info/METADATA,sha256=RNeESBzaEqQvzaScIe9VOREeB9ylklKS3xyI1PHUiSw,31910
47
+ fastled-1.4.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
+ fastled-1.4.19.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
49
+ fastled-1.4.19.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
50
+ fastled-1.4.19.dist-info/RECORD,,