flutter-dev 0.1.10__tar.gz → 0.1.11__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.
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/CHANGELOG.md +11 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/PKG-INFO +6 -6
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/README.md +5 -5
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/fdev.py +1 -1
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/flutter_dev.egg-info/SOURCES.txt +1 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/app.py +42 -25
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/pyproject.toml +1 -1
- flutter_dev-0.1.11/tests/test_app_commands.py +66 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/.env.example +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/LICENSE +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/MANIFEST.in +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/common_utils.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/core/__init__.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/core/ai_config.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/core/constants.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/core/state.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/create_page.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/gemini_api.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/git_diff_output_editor.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/install_legacy.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/__init__.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/ai.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/brew.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/build.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/datetime.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/device.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/doctor.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/git.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/git_account.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/localization.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/merge.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/mirror.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/package.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/project.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/managers/web_deploy.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/requirements.txt +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/setup.cfg +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/setup.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/switch_ai.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/tests/test_ai_config.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/tests/test_fdev_cli.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/tests/test_localization.py +0 -0
- {flutter_dev-0.1.10 → flutter_dev-0.1.11}/tests/test_package_commands.py +0 -0
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.1.11 - 2026-07-22
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added Python regression coverage for project-root and outside-project `fdev clear-data` behavior.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Changed `fdev clear-data` to target the current project's Android package without confirmation when run from a Flutter project root, matching `fdev uninstall`; outside a project it still confirms before clearing the foreground app.
|
|
14
|
+
- Updated the PyPI publishing workflow to run on pushes to the `deployment` branch as well as manual dispatches.
|
|
15
|
+
|
|
5
16
|
## 0.1.10 - 2026-07-16
|
|
6
17
|
|
|
7
18
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flutter-dev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.11
|
|
4
4
|
Summary: A cross-platform CLI toolkit for Flutter development workflows.
|
|
5
5
|
Author: Royal Court BD
|
|
6
6
|
License-Expression: MIT
|
|
@@ -42,14 +42,14 @@ The package is published on PyPI as `flutter-dev` and installs console commands
|
|
|
42
42
|
python -m pip install flutter-dev
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Current package metadata declares version `0.1.
|
|
45
|
+
Current package metadata declares version `0.1.11`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
|
|
46
46
|
|
|
47
47
|
## Key Features
|
|
48
48
|
|
|
49
49
|
- Flutter build automation for APK, split APK, AAB, IPA, release install, and Firebase web deploy.
|
|
50
50
|
- Project maintenance helpers for `flutter clean`, dependency refresh, `build_runner`, localization generation, analysis, formatting, cache repair, and CocoaPods.
|
|
51
51
|
- Localization CSV helpers for exporting ARB files to translator-friendly CSV files and generating ARB files back from CSV.
|
|
52
|
-
- Android device helpers for APK install, app uninstall, foreground app data clearing, screen mirroring with `scrcpy`, wireless ADB setup, and Date & Time settings.
|
|
52
|
+
- Android device helpers for APK install, app uninstall, project/foreground app data clearing, screen mirroring with `scrcpy`, wireless ADB setup, and Date & Time settings.
|
|
53
53
|
- AI-assisted Git commits using Groq, Mistral, SambaNova, or OpenRouter-compatible chat completion APIs.
|
|
54
54
|
- Git workflow helpers for version tags, branch sync, deployment branch merge, discard, and GitHub account management through `gh`.
|
|
55
55
|
- Feature/page generator that creates a `lib/features/<name>` structure using the project's presenter/base-state pattern.
|
|
@@ -201,7 +201,7 @@ Android APK/AAB build commands rename output files using the Android app label a
|
|
|
201
201
|
| --- | --- |
|
|
202
202
|
| `fdev install` | Installs a built APK from `build/app/outputs/flutter-apk`, prefers `arm64-v8a`, retries after uninstall on failure, then launches the app. |
|
|
203
203
|
| `fdev uninstall` | In a Flutter project root, uninstalls by package/bundle id. Outside a project, detects the foreground app and asks for confirmation. |
|
|
204
|
-
| `fdev clear-data` |
|
|
204
|
+
| `fdev clear-data` | In a Flutter project root, clears the project's Android package data without confirmation. Outside a project, detects the foreground app and shows a default-Yes safety prompt. iOS prints manual options. |
|
|
205
205
|
| `fdev install-scrcpy` | Installs `scrcpy` using the best supported package manager for the current platform. |
|
|
206
206
|
| `fdev mirror` | Launches `scrcpy` for a selected Android device. |
|
|
207
207
|
| `fdev mirror --wireless` | Guides wireless ADB setup using a USB-connected Android device. |
|
|
@@ -390,7 +390,7 @@ core/constants.py Shared regex patterns, paths, and build command constant
|
|
|
390
390
|
core/state.py Selected Android device state
|
|
391
391
|
managers/build.py APK/AAB/IPA/release-run build workflow
|
|
392
392
|
managers/project.py setup, cleanup, lang, db, pod, cache repair
|
|
393
|
-
managers/app.py install, uninstall, foreground app data clearing
|
|
393
|
+
managers/app.py install, uninstall, project/foreground app data clearing
|
|
394
394
|
managers/device.py ADB device detection and selection
|
|
395
395
|
managers/mirror.py scrcpy install, mirror, wireless ADB setup
|
|
396
396
|
managers/git.py commit, tag, discard, branch sync, deployment merge
|
|
@@ -413,7 +413,7 @@ The installed Python layout is top-level modules plus the `core` and `managers`
|
|
|
413
413
|
- `fdev tag` updates `pubspec.yaml`, creates a commit, creates a Git tag, and pushes both.
|
|
414
414
|
- `fdev discard` removes tracked changes and untracked files after confirmation.
|
|
415
415
|
- `fdev cleanup` applies `dart fix`, formats the project, and runs a major-version dependency upgrade.
|
|
416
|
-
- `fdev clear-data`
|
|
416
|
+
- `fdev clear-data` targets the current project's Android package without confirmation when run from a Flutter project root. Outside a project, it targets the foreground app after a default-Yes `[Y/n]` confirmation.
|
|
417
417
|
- `fdev uninstall` may fall back to foreground app detection outside a Flutter project root.
|
|
418
418
|
- `fdev upgrade` and `fdev delete` manage the local `flutter-dev` Python package, not the Flutter app on a device.
|
|
419
419
|
- `fdev upgrade` reports the installed version and location before upgrading, then shows the before→after version when the active process can verify it immediately.
|
|
@@ -8,14 +8,14 @@ The package is published on PyPI as `flutter-dev` and installs console commands
|
|
|
8
8
|
python -m pip install flutter-dev
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Current package metadata declares version `0.1.
|
|
11
|
+
Current package metadata declares version `0.1.11`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
|
|
12
12
|
|
|
13
13
|
## Key Features
|
|
14
14
|
|
|
15
15
|
- Flutter build automation for APK, split APK, AAB, IPA, release install, and Firebase web deploy.
|
|
16
16
|
- Project maintenance helpers for `flutter clean`, dependency refresh, `build_runner`, localization generation, analysis, formatting, cache repair, and CocoaPods.
|
|
17
17
|
- Localization CSV helpers for exporting ARB files to translator-friendly CSV files and generating ARB files back from CSV.
|
|
18
|
-
- Android device helpers for APK install, app uninstall, foreground app data clearing, screen mirroring with `scrcpy`, wireless ADB setup, and Date & Time settings.
|
|
18
|
+
- Android device helpers for APK install, app uninstall, project/foreground app data clearing, screen mirroring with `scrcpy`, wireless ADB setup, and Date & Time settings.
|
|
19
19
|
- AI-assisted Git commits using Groq, Mistral, SambaNova, or OpenRouter-compatible chat completion APIs.
|
|
20
20
|
- Git workflow helpers for version tags, branch sync, deployment branch merge, discard, and GitHub account management through `gh`.
|
|
21
21
|
- Feature/page generator that creates a `lib/features/<name>` structure using the project's presenter/base-state pattern.
|
|
@@ -167,7 +167,7 @@ Android APK/AAB build commands rename output files using the Android app label a
|
|
|
167
167
|
| --- | --- |
|
|
168
168
|
| `fdev install` | Installs a built APK from `build/app/outputs/flutter-apk`, prefers `arm64-v8a`, retries after uninstall on failure, then launches the app. |
|
|
169
169
|
| `fdev uninstall` | In a Flutter project root, uninstalls by package/bundle id. Outside a project, detects the foreground app and asks for confirmation. |
|
|
170
|
-
| `fdev clear-data` |
|
|
170
|
+
| `fdev clear-data` | In a Flutter project root, clears the project's Android package data without confirmation. Outside a project, detects the foreground app and shows a default-Yes safety prompt. iOS prints manual options. |
|
|
171
171
|
| `fdev install-scrcpy` | Installs `scrcpy` using the best supported package manager for the current platform. |
|
|
172
172
|
| `fdev mirror` | Launches `scrcpy` for a selected Android device. |
|
|
173
173
|
| `fdev mirror --wireless` | Guides wireless ADB setup using a USB-connected Android device. |
|
|
@@ -356,7 +356,7 @@ core/constants.py Shared regex patterns, paths, and build command constant
|
|
|
356
356
|
core/state.py Selected Android device state
|
|
357
357
|
managers/build.py APK/AAB/IPA/release-run build workflow
|
|
358
358
|
managers/project.py setup, cleanup, lang, db, pod, cache repair
|
|
359
|
-
managers/app.py install, uninstall, foreground app data clearing
|
|
359
|
+
managers/app.py install, uninstall, project/foreground app data clearing
|
|
360
360
|
managers/device.py ADB device detection and selection
|
|
361
361
|
managers/mirror.py scrcpy install, mirror, wireless ADB setup
|
|
362
362
|
managers/git.py commit, tag, discard, branch sync, deployment merge
|
|
@@ -379,7 +379,7 @@ The installed Python layout is top-level modules plus the `core` and `managers`
|
|
|
379
379
|
- `fdev tag` updates `pubspec.yaml`, creates a commit, creates a Git tag, and pushes both.
|
|
380
380
|
- `fdev discard` removes tracked changes and untracked files after confirmation.
|
|
381
381
|
- `fdev cleanup` applies `dart fix`, formats the project, and runs a major-version dependency upgrade.
|
|
382
|
-
- `fdev clear-data`
|
|
382
|
+
- `fdev clear-data` targets the current project's Android package without confirmation when run from a Flutter project root. Outside a project, it targets the foreground app after a default-Yes `[Y/n]` confirmation.
|
|
383
383
|
- `fdev uninstall` may fall back to foreground app detection outside a Flutter project root.
|
|
384
384
|
- `fdev upgrade` and `fdev delete` manage the local `flutter-dev` Python package, not the Flutter app on a device.
|
|
385
385
|
- `fdev upgrade` reports the installed version and location before upgrading, then shows the before→after version when the active process can verify it immediately.
|
|
@@ -102,7 +102,7 @@ def show_usage(exit_code=1):
|
|
|
102
102
|
print(f"\n{BLUE}Device Commands:{NC}")
|
|
103
103
|
print(" install Install built APK on connected device")
|
|
104
104
|
print(" uninstall Uninstall app from connected device")
|
|
105
|
-
print(" clear-data Clear
|
|
105
|
+
print(" clear-data Clear project app data, or foreground app data outside a project")
|
|
106
106
|
print(" install-scrcpy Install scrcpy for Android screen mirroring")
|
|
107
107
|
print(" mirror Launch scrcpy screen mirror (auto-detect device)")
|
|
108
108
|
print(" --wireless Setup wireless ADB connection")
|
|
@@ -186,10 +186,43 @@ def get_current_foreground_app():
|
|
|
186
186
|
|
|
187
187
|
def clear_app_data():
|
|
188
188
|
"""
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
Clear app data from a connected device.
|
|
190
|
+
|
|
191
|
+
In a Flutter project root, clear the project's Android package without a
|
|
192
|
+
confirmation prompt. Outside a project root, detect the foreground app and
|
|
193
|
+
require confirmation before clearing its data.
|
|
191
194
|
"""
|
|
192
|
-
print(f"{YELLOW}Clearing app data
|
|
195
|
+
print(f"{YELLOW}Clearing app data...{NC}\n")
|
|
196
|
+
|
|
197
|
+
# Match uninstall behavior in a Flutter project: target the project's
|
|
198
|
+
# package directly instead of whichever app happens to be in the foreground.
|
|
199
|
+
if is_flutter_project_root() and get_all_connected_devices():
|
|
200
|
+
print(f"{GREEN}✓ Flutter project detected{NC}\n")
|
|
201
|
+
print(f"{BLUE}Android device detected{NC}")
|
|
202
|
+
|
|
203
|
+
if not ensure_device_connected("Device selection failed!"):
|
|
204
|
+
return False
|
|
205
|
+
|
|
206
|
+
package_name = get_package_name()
|
|
207
|
+
if not package_name:
|
|
208
|
+
print(f"{RED}Cannot proceed without package name{NC}")
|
|
209
|
+
return False
|
|
210
|
+
|
|
211
|
+
print(f"{BLUE}Package name: {package_name}{NC}\n")
|
|
212
|
+
|
|
213
|
+
success = run_flutter_command(
|
|
214
|
+
build_adb_cmd(["shell", "pm", "clear", package_name]),
|
|
215
|
+
"Clearing app data... "
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
if success:
|
|
219
|
+
print(f"\n{GREEN}✓ App data cleared successfully!{NC}")
|
|
220
|
+
print(f"{BLUE}You can now relaunch the app from the device{NC}")
|
|
221
|
+
else:
|
|
222
|
+
print(f"\n{RED}✗ Failed to clear app data!{NC}")
|
|
223
|
+
print(f"{YELLOW}Make sure the app package name is correct{NC}")
|
|
224
|
+
|
|
225
|
+
return success
|
|
193
226
|
|
|
194
227
|
# Get current foreground app
|
|
195
228
|
platform_type, package_name = get_current_foreground_app()
|
|
@@ -207,28 +240,12 @@ def clear_app_data():
|
|
|
207
240
|
print(f"{BLUE}Platform: {platform_type.upper()}{NC}")
|
|
208
241
|
print(f"{BLUE}App: {package_name}{NC}\n")
|
|
209
242
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
and project_package == package_name
|
|
217
|
-
)
|
|
218
|
-
|
|
219
|
-
if is_current_project_app:
|
|
220
|
-
print(f"{GREEN}✓ Foreground app matches the current Flutter project{NC}\n")
|
|
221
|
-
else:
|
|
222
|
-
if project_package and platform_type == "android":
|
|
223
|
-
print(f"{YELLOW}⚠️ Foreground app does not match the current Flutter project{NC}")
|
|
224
|
-
print(f"{BLUE}Project package: {project_package}{NC}\n")
|
|
225
|
-
|
|
226
|
-
user_input = input(
|
|
227
|
-
f"Clear data for {GREEN}{package_name}{NC}? [Y/n]: "
|
|
228
|
-
).strip().lower()
|
|
229
|
-
if user_input in ("n", "no"):
|
|
230
|
-
print(f"{YELLOW}Operation cancelled{NC}")
|
|
231
|
-
return False
|
|
243
|
+
user_input = input(
|
|
244
|
+
f"Clear data for {GREEN}{package_name}{NC}? [Y/n]: "
|
|
245
|
+
).strip().lower()
|
|
246
|
+
if user_input in ("n", "no"):
|
|
247
|
+
print(f"{YELLOW}Operation cancelled{NC}")
|
|
248
|
+
return False
|
|
232
249
|
|
|
233
250
|
# Clear data based on platform
|
|
234
251
|
if platform_type == "android":
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from unittest.mock import patch
|
|
3
|
+
|
|
4
|
+
from managers import app
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ClearAppDataTests(unittest.TestCase):
|
|
8
|
+
def test_project_root_clears_project_package_without_confirmation(self):
|
|
9
|
+
with (
|
|
10
|
+
patch.object(app, "is_flutter_project_root", return_value=True),
|
|
11
|
+
patch.object(app, "get_all_connected_devices", return_value=["device-1"]),
|
|
12
|
+
patch.object(app, "ensure_device_connected", return_value=True),
|
|
13
|
+
patch.object(app, "get_package_name", return_value="com.example.app"),
|
|
14
|
+
patch.object(
|
|
15
|
+
app,
|
|
16
|
+
"build_adb_cmd",
|
|
17
|
+
return_value=["adb", "shell", "pm", "clear", "com.example.app"],
|
|
18
|
+
),
|
|
19
|
+
patch.object(app, "run_flutter_command", return_value=True) as run_command,
|
|
20
|
+
patch.object(app, "get_current_foreground_app") as foreground_app,
|
|
21
|
+
patch("builtins.input") as user_input,
|
|
22
|
+
):
|
|
23
|
+
result = app.clear_app_data()
|
|
24
|
+
|
|
25
|
+
self.assertTrue(result)
|
|
26
|
+
foreground_app.assert_not_called()
|
|
27
|
+
user_input.assert_not_called()
|
|
28
|
+
run_command.assert_called_once_with(
|
|
29
|
+
["adb", "shell", "pm", "clear", "com.example.app"],
|
|
30
|
+
"Clearing app data... ",
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
def test_outside_project_confirms_before_clearing_foreground_app(self):
|
|
34
|
+
with (
|
|
35
|
+
patch.object(app, "is_flutter_project_root", return_value=False),
|
|
36
|
+
patch.object(
|
|
37
|
+
app,
|
|
38
|
+
"get_current_foreground_app",
|
|
39
|
+
return_value=("android", "com.example.foreground"),
|
|
40
|
+
),
|
|
41
|
+
patch.object(
|
|
42
|
+
app,
|
|
43
|
+
"build_adb_cmd",
|
|
44
|
+
return_value=[
|
|
45
|
+
"adb",
|
|
46
|
+
"shell",
|
|
47
|
+
"pm",
|
|
48
|
+
"clear",
|
|
49
|
+
"com.example.foreground",
|
|
50
|
+
],
|
|
51
|
+
),
|
|
52
|
+
patch.object(app, "run_flutter_command", return_value=True) as run_command,
|
|
53
|
+
patch("builtins.input", return_value="") as user_input,
|
|
54
|
+
):
|
|
55
|
+
result = app.clear_app_data()
|
|
56
|
+
|
|
57
|
+
self.assertTrue(result)
|
|
58
|
+
user_input.assert_called_once()
|
|
59
|
+
run_command.assert_called_once_with(
|
|
60
|
+
["adb", "shell", "pm", "clear", "com.example.foreground"],
|
|
61
|
+
"Clearing app data... ",
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
if __name__ == "__main__":
|
|
66
|
+
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|