flet-cli 0.85.3.dev0__tar.gz → 0.86.0.dev0__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.
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/PKG-INFO +5 -2
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/pyproject.toml +7 -3
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/cli.py +50 -7
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/build.py +36 -1
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/build_base.py +552 -45
- flet_cli-0.86.0.dev0/src/flet_cli/commands/clean.py +76 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/create.py +4 -0
- flet_cli-0.86.0.dev0/src/flet_cli/commands/mcp.py +67 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/publish.py +31 -1
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/run.py +89 -3
- flet_cli-0.86.0.dev0/src/flet_cli/commands/test.py +292 -0
- flet_cli-0.86.0.dev0/src/flet_cli/commands/test_host.py +11 -0
- flet_cli-0.86.0.dev0/src/flet_cli/utils/android.py +53 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/android_sdk.py +1 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/distros.py +6 -3
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/flutter.py +50 -20
- flet_cli-0.86.0.dev0/src/flet_cli/utils/linux_deps.py +36 -0
- flet_cli-0.86.0.dev0/src/flet_cli/utils/pyodide.py +140 -0
- flet_cli-0.86.0.dev0/src/flet_cli/utils/python_versions.py +213 -0
- flet_cli-0.86.0.dev0/src/flet_cli/utils/template_cache.py +48 -0
- flet_cli-0.86.0.dev0/src/flet_cli/version.py +1 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli.egg-info/PKG-INFO +5 -2
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli.egg-info/SOURCES.txt +12 -1
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli.egg-info/requires.txt +5 -1
- flet_cli-0.86.0.dev0/tests/test_clean.py +53 -0
- flet_cli-0.86.0.dev0/tests/test_python_versions.py +111 -0
- flet_cli-0.85.3.dev0/src/flet_cli/version.py +0 -1
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/README.md +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/setup.cfg +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/__pyinstaller/__init__.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/__pyinstaller/config.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/__pyinstaller/hook-flet.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/__pyinstaller/macos_utils.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/__pyinstaller/rthooks/pyi_rth_localhost_fletd.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/__pyinstaller/utils.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/__pyinstaller/win_utils.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/base.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/debug.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/devices.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/doctor.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/emulators.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/flutter_base.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/options.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/pack.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/commands/serve.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/cli.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/hash_stamp.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/jdk.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/merge.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/plist.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/processes.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/project_dependencies.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli/utils/pyproject_toml.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli.egg-info/dependency_links.txt +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli.egg-info/entry_points.txt +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/src/flet_cli.egg-info/top_level.txt +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/tests/test_plist.py +0 -0
- {flet_cli-0.85.3.dev0 → flet_cli-0.86.0.dev0}/tests/test_project_dependencies.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flet-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.86.0.dev0
|
|
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.
|
|
12
|
+
Requires-Dist: flet==0.86.0.dev0
|
|
13
13
|
Requires-Dist: watchdog>=4.0.0
|
|
14
14
|
Requires-Dist: packaging>=25.0
|
|
15
15
|
Requires-Dist: qrcode>=7.4.2
|
|
@@ -17,6 +17,9 @@ Requires-Dist: tomli>=1.1.0; python_version < "3.11"
|
|
|
17
17
|
Requires-Dist: cookiecutter>=2.6.0
|
|
18
18
|
Requires-Dist: binaryornot<0.5
|
|
19
19
|
Requires-Dist: chardet<6
|
|
20
|
+
Requires-Dist: rich>=13.0.0
|
|
21
|
+
Provides-Extra: mcp
|
|
22
|
+
Requires-Dist: flet-mcp; extra == "mcp"
|
|
20
23
|
|
|
21
24
|
# Flet CLI
|
|
22
25
|
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "flet-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.86.0.dev0"
|
|
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.
|
|
10
|
+
"flet==0.86.0.dev0",
|
|
11
11
|
"watchdog >=4.0.0",
|
|
12
12
|
"packaging >=25.0",
|
|
13
13
|
"qrcode >=7.4.2",
|
|
14
14
|
"tomli >= 1.1.0 ; python_version < '3.11'",
|
|
15
15
|
"cookiecutter >=2.6.0",
|
|
16
16
|
"binaryornot <0.5",
|
|
17
|
-
"chardet <6"
|
|
17
|
+
"chardet <6",
|
|
18
|
+
"rich >=13.0.0"
|
|
18
19
|
]
|
|
19
20
|
|
|
21
|
+
[project.optional-dependencies]
|
|
22
|
+
mcp = ["flet-mcp"]
|
|
23
|
+
|
|
20
24
|
[project.urls]
|
|
21
25
|
Homepage = "https://flet.dev"
|
|
22
26
|
Repository = "https://github.com/flet-dev/flet"
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import argparse
|
|
2
|
+
import json
|
|
2
3
|
import sys
|
|
3
4
|
|
|
4
5
|
import flet.version
|
|
5
6
|
import flet_cli.commands.build
|
|
7
|
+
import flet_cli.commands.clean
|
|
6
8
|
import flet_cli.commands.create
|
|
7
9
|
import flet_cli.commands.debug
|
|
8
10
|
import flet_cli.commands.devices
|
|
@@ -12,6 +14,29 @@ import flet_cli.commands.pack
|
|
|
12
14
|
import flet_cli.commands.publish
|
|
13
15
|
import flet_cli.commands.run
|
|
14
16
|
import flet_cli.commands.serve
|
|
17
|
+
import flet_cli.commands.test
|
|
18
|
+
from flet_cli.utils.linux_deps import linux_dependencies
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _version_info() -> dict:
|
|
22
|
+
"""Build the machine-readable `flet --version --json` document.
|
|
23
|
+
|
|
24
|
+
Exposes Flet/Flutter versions and the Linux build dependencies. The
|
|
25
|
+
supported Python/Pyodide set is no longer surfaced here — it now comes from
|
|
26
|
+
python-build's manifest (see `flet_cli.utils.python_versions`).
|
|
27
|
+
"""
|
|
28
|
+
return {
|
|
29
|
+
"flet": flet.version.flet_version,
|
|
30
|
+
"flutter": flet.version.flutter_version,
|
|
31
|
+
"linux_dependencies": list(linux_dependencies),
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _render_version(as_json: bool) -> str:
|
|
36
|
+
"""Render `flet --version` output as JSON or the human-readable text block."""
|
|
37
|
+
if as_json:
|
|
38
|
+
return json.dumps(_version_info(), indent=2)
|
|
39
|
+
return f"Flet: {flet.version.flet_version}\nFlutter: {flet.version.flutter_version}"
|
|
15
40
|
|
|
16
41
|
|
|
17
42
|
# Source https://stackoverflow.com/a/26379693
|
|
@@ -68,16 +93,17 @@ def get_parser() -> argparse.ArgumentParser:
|
|
|
68
93
|
formatter_class=argparse.RawDescriptionHelpFormatter
|
|
69
94
|
)
|
|
70
95
|
|
|
71
|
-
# add version
|
|
96
|
+
# add version flags
|
|
72
97
|
parser.add_argument(
|
|
73
98
|
"--version",
|
|
74
99
|
"-V",
|
|
75
|
-
action="
|
|
76
|
-
version
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
100
|
+
action="store_true",
|
|
101
|
+
help="show version information and exit",
|
|
102
|
+
)
|
|
103
|
+
parser.add_argument(
|
|
104
|
+
"--json",
|
|
105
|
+
action="store_true",
|
|
106
|
+
help="with --version, output version information as JSON",
|
|
81
107
|
)
|
|
82
108
|
|
|
83
109
|
sp = parser.add_subparsers(dest="command")
|
|
@@ -86,7 +112,9 @@ def get_parser() -> argparse.ArgumentParser:
|
|
|
86
112
|
flet_cli.commands.create.Command.register_to(sp, "create")
|
|
87
113
|
flet_cli.commands.run.Command.register_to(sp, "run")
|
|
88
114
|
flet_cli.commands.build.Command.register_to(sp, "build")
|
|
115
|
+
flet_cli.commands.clean.Command.register_to(sp, "clean")
|
|
89
116
|
flet_cli.commands.debug.Command.register_to(sp, "debug")
|
|
117
|
+
flet_cli.commands.test.Command.register_to(sp, "test")
|
|
90
118
|
flet_cli.commands.pack.Command.register_to(sp, "pack")
|
|
91
119
|
flet_cli.commands.publish.Command.register_to(sp, "publish")
|
|
92
120
|
flet_cli.commands.serve.Command.register_to(sp, "serve")
|
|
@@ -94,6 +122,16 @@ def get_parser() -> argparse.ArgumentParser:
|
|
|
94
122
|
flet_cli.commands.devices.Command.register_to(sp, "devices")
|
|
95
123
|
flet_cli.commands.doctor.Command.register_to(sp, "doctor")
|
|
96
124
|
|
|
125
|
+
# Register MCP command only if flet-mcp is installed
|
|
126
|
+
try:
|
|
127
|
+
from importlib import import_module
|
|
128
|
+
|
|
129
|
+
import_module("flet_mcp")
|
|
130
|
+
mcp_cmd = import_module("flet_cli.commands.mcp")
|
|
131
|
+
mcp_cmd.Command.register_to(sp, "mcp")
|
|
132
|
+
except ImportError:
|
|
133
|
+
pass
|
|
134
|
+
|
|
97
135
|
# set "run" as the default subparser
|
|
98
136
|
set_default_subparser(parser, name="run", index=1)
|
|
99
137
|
|
|
@@ -111,6 +149,11 @@ def main():
|
|
|
111
149
|
# parse arguments
|
|
112
150
|
args = parser.parse_args()
|
|
113
151
|
|
|
152
|
+
# handle `flet --version [--json]` (no subcommand/handler is set)
|
|
153
|
+
if getattr(args, "version", False):
|
|
154
|
+
print(_render_version(args.json))
|
|
155
|
+
sys.exit(0)
|
|
156
|
+
|
|
114
157
|
# execute command
|
|
115
158
|
args.handler(args)
|
|
116
159
|
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import argparse
|
|
2
|
+
import os
|
|
3
|
+
import shutil
|
|
4
|
+
from pathlib import Path
|
|
2
5
|
|
|
3
6
|
from rich.console import Group
|
|
4
7
|
from rich.live import Live
|
|
5
8
|
|
|
6
9
|
from flet_cli.commands.build_base import BaseBuildCommand, console
|
|
10
|
+
from flet_cli.utils.android import flutter_target_platforms
|
|
7
11
|
|
|
8
12
|
|
|
9
13
|
class Command(BaseBuildCommand):
|
|
@@ -116,9 +120,24 @@ class Command(BaseBuildCommand):
|
|
|
116
120
|
["build", self.platforms[self.target_platform]["flutter_build_command"]]
|
|
117
121
|
)
|
|
118
122
|
|
|
119
|
-
if self.target_platform
|
|
123
|
+
if self.target_platform == "apk" and self.template_data["split_per_abi"]:
|
|
120
124
|
args.append("--split-per-abi")
|
|
121
125
|
|
|
126
|
+
if (
|
|
127
|
+
self.target_platform in ("apk", "aab")
|
|
128
|
+
and self.template_data["options"]["target_arch"]
|
|
129
|
+
):
|
|
130
|
+
args.extend(
|
|
131
|
+
[
|
|
132
|
+
"--target-platform",
|
|
133
|
+
",".join(
|
|
134
|
+
flutter_target_platforms(
|
|
135
|
+
self.template_data["options"]["target_arch"]
|
|
136
|
+
)
|
|
137
|
+
),
|
|
138
|
+
]
|
|
139
|
+
)
|
|
140
|
+
|
|
122
141
|
if self.target_platform in ["ipa"]:
|
|
123
142
|
if self.template_data["ios_provisioning_profile"]:
|
|
124
143
|
args.extend(
|
|
@@ -166,6 +185,22 @@ class Command(BaseBuildCommand):
|
|
|
166
185
|
f"{self.platforms[self.target_platform]['status_text']}[/cyan]..."
|
|
167
186
|
)
|
|
168
187
|
|
|
188
|
+
# Clear the build output directories of artifacts from previous runs. Flutter
|
|
189
|
+
# only ever adds files to them, and copy_build_output harvests them wholesale —
|
|
190
|
+
# so without this, a previous build with different options (e.g. --arch,
|
|
191
|
+
# --split-per-abi, or a renamed product) would leak its artifacts into the
|
|
192
|
+
# user's output directory.
|
|
193
|
+
assert self.flutter_dir
|
|
194
|
+
flutter_dir = self.flutter_dir.resolve()
|
|
195
|
+
for output in self.platforms[self.target_platform]["outputs"]:
|
|
196
|
+
output_dir = Path(
|
|
197
|
+
os.path.dirname(self.resolve_output_path(output))
|
|
198
|
+
).resolve()
|
|
199
|
+
# only delete directories that are strictly inside the generated Flutter
|
|
200
|
+
# project (and never the project directory itself).
|
|
201
|
+
if output_dir != flutter_dir and output_dir.is_relative_to(flutter_dir):
|
|
202
|
+
shutil.rmtree(output_dir, ignore_errors=True)
|
|
203
|
+
|
|
169
204
|
self._run_flutter_command()
|
|
170
205
|
|
|
171
206
|
console.log(
|