flet-cli 0.82.3.dev7907__tar.gz → 0.82.3.dev7921__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 (46) hide show
  1. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/PKG-INFO +2 -2
  2. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/pyproject.toml +2 -2
  3. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/build_base.py +56 -13
  4. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/create.py +17 -4
  5. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/run.py +4 -1
  6. flet_cli-0.82.3.dev7921/src/flet_cli/version.py +1 -0
  7. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli.egg-info/PKG-INFO +2 -2
  8. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli.egg-info/requires.txt +1 -1
  9. flet_cli-0.82.3.dev7907/src/flet_cli/version.py +0 -1
  10. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/README.md +0 -0
  11. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/setup.cfg +0 -0
  12. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/__pyinstaller/__init__.py +0 -0
  13. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/__pyinstaller/config.py +0 -0
  14. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/__pyinstaller/hook-flet.py +0 -0
  15. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/__pyinstaller/macos_utils.py +0 -0
  16. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/__pyinstaller/rthooks/pyi_rth_localhost_fletd.py +0 -0
  17. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/__pyinstaller/utils.py +0 -0
  18. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/__pyinstaller/win_utils.py +0 -0
  19. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/cli.py +0 -0
  20. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/base.py +0 -0
  21. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/build.py +0 -0
  22. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/debug.py +0 -0
  23. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/devices.py +0 -0
  24. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/doctor.py +0 -0
  25. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/emulators.py +0 -0
  26. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/flutter_base.py +0 -0
  27. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/options.py +0 -0
  28. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/pack.py +0 -0
  29. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/publish.py +0 -0
  30. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/commands/serve.py +0 -0
  31. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/android_sdk.py +0 -0
  32. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/cli.py +0 -0
  33. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/distros.py +0 -0
  34. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/flutter.py +0 -0
  35. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/hash_stamp.py +0 -0
  36. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/jdk.py +0 -0
  37. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/merge.py +0 -0
  38. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/plist.py +0 -0
  39. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/processes.py +0 -0
  40. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/project_dependencies.py +0 -0
  41. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli/utils/pyproject_toml.py +0 -0
  42. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli.egg-info/SOURCES.txt +0 -0
  43. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli.egg-info/dependency_links.txt +0 -0
  44. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli.egg-info/entry_points.txt +0 -0
  45. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/src/flet_cli.egg-info/top_level.txt +0 -0
  46. {flet_cli-0.82.3.dev7907 → flet_cli-0.82.3.dev7921}/tests/test_plist.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-cli
3
- Version: 0.82.3.dev7907
3
+ Version: 0.82.3.dev7921
4
4
  Summary: Flet CLI
5
5
  Author-email: "Appveyor Systems Inc." <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/flet-dev/flet
9
9
  Project-URL: Documentation, https://flet.dev/docs
10
10
  Requires-Python: >=3.10
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: flet==0.82.3.dev7907
12
+ Requires-Dist: flet==0.82.3.dev7921
13
13
  Requires-Dist: watchdog>=4.0.0
14
14
  Requires-Dist: packaging>=25.0
15
15
  Requires-Dist: qrcode>=7.4.2
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "flet-cli"
3
- version = "0.82.3.dev7907"
3
+ version = "0.82.3.dev7921"
4
4
  description = "Flet CLI"
5
5
  authors = [{ name = "Appveyor Systems Inc.", email = "hello@flet.dev" }]
6
6
  license = "Apache-2.0"
7
7
  readme = "README.md"
8
8
  requires-python = ">=3.10"
9
9
  dependencies = [
10
- "flet==0.82.3.dev7907",
10
+ "flet==0.82.3.dev7921",
11
11
  "watchdog >=4.0.0",
12
12
  "packaging >=25.0",
13
13
  "qrcode >=7.4.2",
@@ -1,4 +1,5 @@
1
1
  import argparse
2
+ import copy
2
3
  import glob
3
4
  import os
4
5
  import platform
@@ -7,7 +8,6 @@ from pathlib import Path
7
8
  from typing import Optional, cast
8
9
 
9
10
  import yaml
10
- from packaging import version
11
11
  from packaging.requirements import Requirement
12
12
  from rich.panel import Panel
13
13
  from rich.table import Column, Table
@@ -33,7 +33,10 @@ from flet_cli.utils.project_dependencies import (
33
33
  )
34
34
  from flet_cli.utils.pyproject_toml import load_pyproject_toml
35
35
 
36
- DEFAULT_TEMPLATE_URL = "gh:flet-dev/flet-build-template"
36
+ DEFAULT_TEMPLATE_URL = (
37
+ "https://github.com/flet-dev/flet/releases/download/"
38
+ "v{version}/flet-build-template.zip"
39
+ )
37
40
 
38
41
 
39
42
  class BaseBuildCommand(BaseFlutterCommand):
@@ -1141,18 +1144,32 @@ class BaseBuildCommand(BaseFlutterCommand):
1141
1144
  self.build_dir / ".hash" / f"template-{'2' if second_pass else '1'}"
1142
1145
  )
1143
1146
 
1144
- template_url = (
1145
- self.options.template
1146
- or self.get_pyproject("tool.flet.template.url")
1147
- or DEFAULT_TEMPLATE_URL
1147
+ template_url = self.options.template or self.get_pyproject(
1148
+ "tool.flet.template.url"
1148
1149
  )
1149
- hash.update(template_url)
1150
1150
 
1151
1151
  template_ref = self.options.template_ref or self.get_pyproject(
1152
1152
  "tool.flet.template.ref"
1153
1153
  )
1154
1154
  if not template_ref:
1155
- template_ref = version.Version(flet.version.flet_version).base_version
1155
+ template_ref = flet.version.flet_version
1156
+
1157
+ is_local_dev = False
1158
+ if template_url:
1159
+ # User-provided template (git repo or local path) — use checkout
1160
+ checkout = template_ref
1161
+ else:
1162
+ # Check for local dev templates first (running from source checkout)
1163
+ local_tpl = Path(__file__).resolve().parents[5] / "templates" / "build"
1164
+ if local_tpl.is_dir():
1165
+ template_url = str(local_tpl)
1166
+ checkout = None
1167
+ is_local_dev = True
1168
+ else:
1169
+ template_url = DEFAULT_TEMPLATE_URL.format(version=template_ref)
1170
+ checkout = None
1171
+
1172
+ hash.update(template_url)
1156
1173
  hash.update(template_ref)
1157
1174
 
1158
1175
  template_dir = self.options.template_dir or self.get_pyproject(
@@ -1178,17 +1195,18 @@ class BaseBuildCommand(BaseFlutterCommand):
1178
1195
  # create a new Flutter bootstrap project directory, if non-existent
1179
1196
  if not second_pass:
1180
1197
  self.flutter_dir.mkdir(parents=True, exist_ok=True)
1181
- self.update_status(
1182
- "[bold blue]Creating app shell from "
1183
- f'{template_url} with ref "{template_ref}"...'
1184
- )
1198
+ status = f"[bold blue]Creating app shell from {template_url}"
1199
+ if checkout:
1200
+ status += f' with ref "{template_ref}"'
1201
+ status += "..."
1202
+ self.update_status(status)
1185
1203
 
1186
1204
  try:
1187
1205
  from cookiecutter.main import cookiecutter
1188
1206
 
1189
1207
  cookiecutter(
1190
1208
  template=template_url,
1191
- checkout=template_ref,
1209
+ checkout=checkout,
1192
1210
  directory=template_dir,
1193
1211
  output_dir=str(self.flutter_dir.parent),
1194
1212
  no_input=True,
@@ -1201,10 +1219,35 @@ class BaseBuildCommand(BaseFlutterCommand):
1201
1219
  shutil.rmtree(self.flutter_dir)
1202
1220
  self.cleanup(1, f"{e}")
1203
1221
 
1222
+ # For local development, override flet dependency with path
1223
+ if is_local_dev:
1224
+ repo_root = flet.version.find_repo_root(Path(__file__).resolve().parent)
1225
+ if repo_root:
1226
+ flet_pkg_path = str(repo_root / "packages" / "flet")
1227
+ pubspec = self.load_yaml(self.pubspec_path)
1228
+ pubspec["dependencies"]["flet"] = {"path": flet_pkg_path}
1229
+ pubspec.setdefault("dependency_overrides", {})["flet"] = {
1230
+ "path": flet_pkg_path
1231
+ }
1232
+ self.save_yaml(self.pubspec_path, pubspec)
1233
+
1204
1234
  pyproject_pubspec = self.get_pyproject("tool.flet.flutter.pubspec")
1205
1235
 
1206
1236
  if pyproject_pubspec:
1237
+ pyproject_pubspec = copy.deepcopy(pyproject_pubspec)
1207
1238
  pubspec = self.load_yaml(self.pubspec_path)
1239
+ # Replace individual dependency entries from pyproject rather
1240
+ # than deep-merging them — a Dart dependency can only have one
1241
+ # source, so merging {"path":…} with {"git":…} is invalid.
1242
+ for section in (
1243
+ "dependencies",
1244
+ "dependency_overrides",
1245
+ "dev_dependencies",
1246
+ ):
1247
+ if section in pyproject_pubspec:
1248
+ pubspec.setdefault(section, {}).update(
1249
+ pyproject_pubspec.pop(section)
1250
+ )
1208
1251
  pubspec = merge_dict(pubspec, pyproject_pubspec)
1209
1252
  self.save_yaml(self.pubspec_path, pubspec)
1210
1253
 
@@ -3,7 +3,6 @@ import os
3
3
  import platform
4
4
  from pathlib import Path
5
5
 
6
- from packaging import version
7
6
  from rich.console import Console
8
7
  from rich.style import Style
9
8
 
@@ -14,6 +13,11 @@ from flet_cli.commands.base import BaseCommand
14
13
  error_style = Style(color="red1", bold=True)
15
14
  console = Console(log_path=False)
16
15
 
16
+ DEFAULT_APP_TEMPLATE_URL = (
17
+ "https://github.com/flet-dev/flet/releases/download/"
18
+ "v{version}/flet-app-templates.zip"
19
+ )
20
+
17
21
 
18
22
  class Command(BaseCommand):
19
23
  """
@@ -99,7 +103,16 @@ class Command(BaseCommand):
99
103
 
100
104
  template_ref = options.template_ref
101
105
  if not template_ref:
102
- template_ref = version.Version(flet.version.flet_version).base_version
106
+ template_ref = flet.version.flet_version
107
+
108
+ # Resolve template source: local dev, or zip from GitHub release
109
+ local_tpl = Path(__file__).resolve().parents[5] / "templates" / "app"
110
+ if local_tpl.is_dir():
111
+ template_url = str(local_tpl)
112
+ checkout = None
113
+ else:
114
+ template_url = DEFAULT_APP_TEMPLATE_URL.format(version=template_ref)
115
+ checkout = None
103
116
 
104
117
  out_dir = Path(options.output_directory).resolve()
105
118
  template_data["out_dir"] = out_dir.name
@@ -115,8 +128,8 @@ class Command(BaseCommand):
115
128
  # print("Template data:", template_data)
116
129
  try:
117
130
  cookiecutter(
118
- "gh:flet-dev/flet-app-templates",
119
- checkout=template_ref,
131
+ template_url,
132
+ checkout=checkout,
120
133
  directory=options.template,
121
134
  output_dir=str(out_dir.parent),
122
135
  no_input=True,
@@ -397,7 +397,10 @@ class Handler(FileSystemEventHandler):
397
397
  line = line.rstrip("\r\n")
398
398
  if line.startswith(self.page_url_prefix):
399
399
  if not self.page_url:
400
- self.page_url = line[len(self.page_url_prefix) + 1 :]
400
+ parts = line[len(self.page_url_prefix) + 1 :].split(" ", 1)
401
+ self.page_url = parts[0]
402
+ if len(parts) > 1 and parts[1] == "flet_app_hidden":
403
+ self.hidden = True
401
404
  if (
402
405
  self.page_url.startswith("http")
403
406
  and not self.ios
@@ -0,0 +1 @@
1
+ version = "0.82.3.dev7921"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-cli
3
- Version: 0.82.3.dev7907
3
+ Version: 0.82.3.dev7921
4
4
  Summary: Flet CLI
5
5
  Author-email: "Appveyor Systems Inc." <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/flet-dev/flet
9
9
  Project-URL: Documentation, https://flet.dev/docs
10
10
  Requires-Python: >=3.10
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: flet==0.82.3.dev7907
12
+ Requires-Dist: flet==0.82.3.dev7921
13
13
  Requires-Dist: watchdog>=4.0.0
14
14
  Requires-Dist: packaging>=25.0
15
15
  Requires-Dist: qrcode>=7.4.2
@@ -1,4 +1,4 @@
1
- flet==0.82.3.dev7907
1
+ flet==0.82.3.dev7921
2
2
  watchdog>=4.0.0
3
3
  packaging>=25.0
4
4
  qrcode>=7.4.2
@@ -1 +0,0 @@
1
- version = "0.82.3.dev7907"