tdf_tool 2.4.4__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.
- tdf_tool-2.4.4/LICENSE +21 -0
- tdf_tool-2.4.4/PKG-INFO +398 -0
- tdf_tool-2.4.4/README.md +365 -0
- tdf_tool-2.4.4/pyproject.toml +64 -0
- tdf_tool-2.4.4/setup.py +56 -0
- tdf_tool-2.4.4/tdf_tool/app.py +15 -0
- tdf_tool-2.4.4/tdf_tool/pipeline.py +36 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/anno.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/annotation.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/api_interaction.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/cmd.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/fix_header.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/fix_header.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/git.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/git.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/init.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/module.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/module.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/package.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/package.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/router.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/router.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/translate.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/translate.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/upgrade.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/__pycache__/upgrade.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/annotation.py +119 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/api_interaction.py +204 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/fix_header.py +36 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/git.py +33 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/module.py +62 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/package.py +49 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/router.py +588 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/translate.py +48 -0
- tdf_tool-2.4.4/tdf_tool/pipelines/upgrade.py +8 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/cmd.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/cmd.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/dependencies_analysis.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/dependencies_analysis.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/env.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/env.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/platform_tools.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/platform_tools.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/print.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/print.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/regular_tool.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/regular_tool.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/shell_dir.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/__pycache__/shell_dir.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/cli/__pycache__/module_deps_rewrite.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/cli/__pycache__/module_deps_rewrite.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/cli/__pycache__/project_cli.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/cli/__pycache__/project_cli.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/cli/bean/__pycache__/deps_item.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/cli/bean/deps_item.py +46 -0
- tdf_tool-2.4.4/tdf_tool/tools/cli/module_deps_rewrite.py +279 -0
- tdf_tool-2.4.4/tdf_tool/tools/cli/project_cli.py +119 -0
- tdf_tool-2.4.4/tdf_tool/tools/cli/utils/__pycache__/yaml_utils.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/cli/utils/yaml_utils.py +50 -0
- tdf_tool-2.4.4/tdf_tool/tools/cmd.py +20 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/__pycache__/config.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/__pycache__/config.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/__pycache__/initial_json_config.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/__pycache__/initial_json_config.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/__pycache__/json.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/__pycache__/module_json_config.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/__pycache__/module_json_config.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/__pycache__/packages_config.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/__pycache__/packages_config.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/config.py +114 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/initial_json_config.py +38 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/module_json_config.py +47 -0
- tdf_tool-2.4.4/tdf_tool/tools/config/packages_config.py +127 -0
- tdf_tool-2.4.4/tdf_tool/tools/dependencies_analysis.py +212 -0
- tdf_tool-2.4.4/tdf_tool/tools/env.py +27 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/__pycache__/fix_header_entry.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/__pycache__/fix_header_entry.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/__pycache__/fix_header_lint.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/__pycache__/fix_header_lint.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/__pycache__/fix_header_lint_tool.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/__pycache__/fix_header_lint_tool.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/__pycache__/fix_header_replace_tool.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/__pycache__/fix_header_replace_tool.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/__pycache__/fix_header_tool.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/fix_header_entry.py +80 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/fix_header_lint.py +46 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/fix_header_lint_tool.py +58 -0
- tdf_tool-2.4.4/tdf_tool/tools/fix_header/fix_header_replace_tool.py +100 -0
- tdf_tool-2.4.4/tdf_tool/tools/flutter_script.py +36 -0
- tdf_tool-2.4.4/tdf_tool/tools/gitlab/__pycache__/gitlab_utils.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/gitlab/__pycache__/gitlab_utils.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/gitlab/__pycache__/python_gitlab_api.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/gitlab/__pycache__/python_gitlab_api.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/gitlab/__pycache__/raw_git.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/gitlab/gitlab_utils.py +142 -0
- tdf_tool-2.4.4/tdf_tool/tools/gitlab/python_gitlab_api.py +109 -0
- tdf_tool-2.4.4/tdf_tool/tools/module/__pycache__/module_tools.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/module/__pycache__/module_tools.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/module/module_tools.py +30 -0
- tdf_tool-2.4.4/tdf_tool/tools/package/__pycache__/seal_off_package_utils.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/package/__pycache__/seal_off_package_utils.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/package/seal_off_package_utils.py +274 -0
- tdf_tool-2.4.4/tdf_tool/tools/platform_tools.py +39 -0
- tdf_tool-2.4.4/tdf_tool/tools/print.py +45 -0
- tdf_tool-2.4.4/tdf_tool/tools/regular_tool.py +211 -0
- tdf_tool-2.4.4/tdf_tool/tools/shell_dir.py +165 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/__pycache__/file_util.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/__pycache__/file_util.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/__pycache__/translate_lint.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/__pycache__/translate_lint.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/__pycache__/translate_tools.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/file_util.py +66 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/flutter/__pycache__/flutter_translate_lint.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/flutter/__pycache__/flutter_translate_lint.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/flutter/__pycache__/flutter_translate_tools.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/flutter/__pycache__/flutter_translate_tools.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/flutter/flutter_translate_lint.py +273 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/flutter/flutter_translate_tools.py +445 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/flutter/tools/__pycache__/flutter_translate_integrate.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/flutter/tools/__pycache__/flutter_translate_integrate.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/flutter/tools/flutter_translate_integrate.py +134 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/__pycache__/file_util.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/__pycache__/ios_module.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/__pycache__/ios_translate.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/__pycache__/ios_translate.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/__pycache__/ios_translate_lint.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/__pycache__/ios_translate_lint.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/__pycache__/ios_translate_pattern.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/__pycache__/ios_translate_tools.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/__pycache__/podspec.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/__pycache__/string_util.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/ios_translate.py +105 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/ios_translate_lint.py +52 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/batch_pod_tools.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/batch_pod_tools.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/ios_module.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/ios_module.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/ios_translate_integrate.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/ios_translate_integrate.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/ios_translate_pattern.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/ios_translate_pattern.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/ios_translate_tools.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/ios_translate_tools.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/location_string_temp.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/location_string_temp.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/podspec.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/podspec.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/string_util.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/__pycache__/string_util.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/batch_pod_tools.py +87 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/ios_module.py +362 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/ios_translate_integrate.py +121 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/ios_translate_pattern.py +22 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/ios_translate_tools.py +213 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/location_string_temp.py +71 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/podspec.py +218 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/ios/tools/string_util.py +91 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/tools/__pycache__/translate_tool.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/tools/__pycache__/translate_tool.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/tools/translate_tool.py +154 -0
- tdf_tool-2.4.4/tdf_tool/tools/translate/translate_lint.py +44 -0
- tdf_tool-2.4.4/tdf_tool/tools/vscode/__pycache__/vscode.cpython-311.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/vscode/__pycache__/vscode.cpython-39.pyc +0 -0
- tdf_tool-2.4.4/tdf_tool/tools/vscode/vscode.py +13 -0
tdf_tool-2.4.4/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [year] [fullname]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
tdf_tool-2.4.4/PKG-INFO
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: tdf-tool
|
|
3
|
+
Version: 2.4.4
|
|
4
|
+
Summary: 二维火 flutter 脚手架工具
|
|
5
|
+
Home-page: https://git.2dfire.net/app/flutter/tools/package_tools
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: tdf,tdf-tool,tdf_tool
|
|
8
|
+
Author: Jian Xu
|
|
9
|
+
Author-email: 3386218996@qq.com
|
|
10
|
+
Requires-Python: >=3.9.0,<4.0.0
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Web Environment
|
|
13
|
+
Classifier: Framework :: AsyncIO
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: POSIX
|
|
17
|
+
Classifier: Programming Language :: Python
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
+
Classifier: Topic :: Software Development
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
24
|
+
Requires-Dist: environs (>=9.5.0,<10.0.0)
|
|
25
|
+
Requires-Dist: fire (>=0.4.0,<0.5.0)
|
|
26
|
+
Requires-Dist: googletrans (==3.1.0a0)
|
|
27
|
+
Requires-Dist: python-gitlab (==1.15.0)
|
|
28
|
+
Requires-Dist: requests (==2.27.1)
|
|
29
|
+
Requires-Dist: ruamel.yaml (>=0.17.21,<0.18.0)
|
|
30
|
+
Project-URL: Repository, https://git.2dfire.net/app/flutter/tools/package_tools.git
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
## 帮助文档
|
|
34
|
+
|
|
35
|
+
```shell
|
|
36
|
+
NAME
|
|
37
|
+
tdf_tool - 二维火 Flutter 脚手架工具,包含项目构建,依赖分析,git等功能。。
|
|
38
|
+
|
|
39
|
+
SYNOPSIS
|
|
40
|
+
tdf_tool GROUP | COMMAND
|
|
41
|
+
|
|
42
|
+
DESCRIPTION
|
|
43
|
+
二维火 Flutter 脚手架工具,包含项目构建,依赖分析,git等功能。。
|
|
44
|
+
|
|
45
|
+
GROUPS
|
|
46
|
+
GROUP is one of the following:
|
|
47
|
+
|
|
48
|
+
module
|
|
49
|
+
模块相关工具: tdf_tool module -h 查看详情
|
|
50
|
+
|
|
51
|
+
package
|
|
52
|
+
封包工具相关:tdf_tool package -h 查看详情
|
|
53
|
+
|
|
54
|
+
translate
|
|
55
|
+
国际化相关:tdf_tool translate -h 查看详情
|
|
56
|
+
|
|
57
|
+
COMMANDS
|
|
58
|
+
COMMAND is one of the following:
|
|
59
|
+
|
|
60
|
+
git
|
|
61
|
+
tdf_tool git【git 命令】:批量操作 git 命令, 例如 tdf_tool git push
|
|
62
|
+
|
|
63
|
+
router
|
|
64
|
+
tdf_tool router:会以交互式进行路由操作,对指定的模块执行路由生成和路由注册逻辑
|
|
65
|
+
|
|
66
|
+
upgrade
|
|
67
|
+
tdf_tool upgrade:升级插件到最新版本
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## 插件安装方式
|
|
74
|
+
|
|
75
|
+
安装python包
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
pip3 install tdf-tool --user
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
安装并更新python包
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
pip3 install --upgrade tdf-tool --user
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
安装测试环境python包
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
pip3 install -i https://test.pypi.org/simple/ tdf-tool --user
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
安装并更新测试环境python包
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
pip3 install --upgrade -i https://test.pypi.org/simple/ tdf-tool --user
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## 工具使用流程说明
|
|
102
|
+
|
|
103
|
+
### 1.准备工作
|
|
104
|
+
|
|
105
|
+
- 确保python的bin插件目录已经被配置到环境变量中(这一步不满足的话,插件安装之后是无法识别到本插件命令的)
|
|
106
|
+
|
|
107
|
+
- 在~目录下,创建.tdf_tool_config文件并配置相关必需属性如下
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
git_private_token=***
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
git_private_token是gitlab的token
|
|
114
|
+
|
|
115
|
+
获取途径:进入gitlab页面,点击右上角头像,选择Preferences,选择左侧列表中的AccessToken进行创建
|
|
116
|
+
|
|
117
|
+
**上述步骤如果没有做,会在使用插件时,会有提示**
|
|
118
|
+
|
|
119
|
+
### 2.初始化
|
|
120
|
+
|
|
121
|
+
#### i.进入壳目录(确保执行命令在壳目录内)
|
|
122
|
+
|
|
123
|
+
#### ii.执行tdf_tool module init
|
|
124
|
+
|
|
125
|
+
- 判断当前目录是否存在tdf_cache,若不存在,则会自动创建tdf_cache
|
|
126
|
+
- 自动读取当前壳模块名称,写入initial_config.json配置文件;
|
|
127
|
+
- 读取当前壳分支,写入initial_config.json配置文件;
|
|
128
|
+
- 交互式提示用户输入需要开发的模块名并写入initial_config.json配置文件的moduleNameList列表字段中
|
|
129
|
+
- !退出,即输入完成
|
|
130
|
+
- 自动clone所有开发模块到 ```../.tdf_flutter``` 隐藏目录中;
|
|
131
|
+
- 将所有开发模块分支切换至与壳一致;
|
|
132
|
+
- 自动分析依赖树,并**由下至上**对所有模块自动执行```flutter pub upgrade```;
|
|
133
|
+
|
|
134
|
+
#### iii.开发过程中
|
|
135
|
+
|
|
136
|
+
##### 1.开发模块添加
|
|
137
|
+
|
|
138
|
+
- 若是有新模块需要添加入开发模块中,可直接修改initial_config.json配置文件,修改moduleNameList字段;
|
|
139
|
+
- 执行tdf_tool deps更新依赖
|
|
140
|
+
|
|
141
|
+
##### 2.新开发模块添加
|
|
142
|
+
|
|
143
|
+
- 添加新模块后,会提示找不到模块,实际查找的是```tdf_cache```文件夹中的module_config.json文件;
|
|
144
|
+
- 如果没有找到该模块,则可以执行```tdf_tool module-update```,更新远程module_config.json文件;
|
|
145
|
+
- 删掉本地的module_config.json文件,重新执行命令即可,脚本会自动判断本地是否存在该配置文件,如果不存在会**下载**;
|
|
146
|
+
|
|
147
|
+
<span style="color:#ff0000">请确保gitlab仓库的新开发模块master分支是一个flutter模块,如果判定不是flutter模块,则会报错(判定条件为存在pubspec.yaml文件)</span>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### 3.版本控制
|
|
152
|
+
|
|
153
|
+
版本控制请使用tdf_tool命令,命令详情可使用 ```tdf_tool -h``` 查看,现已支持大部分命令,若有特殊命令需要执行,可以使用 ```tdf_tool <git命令>``` ,如:```tdf_tool git add .```
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### 4.自动打包发布
|
|
158
|
+
|
|
159
|
+
暂未接入打包工具,预计下一季度进行支持;
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
**<span style="color:#ff0000">FAQ</span>**
|
|
164
|
+
|
|
165
|
+
windows系统请使用bash命令;
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## 额外功能说明
|
|
170
|
+
|
|
171
|
+
### 1.二维数组表达依赖树
|
|
172
|
+
|
|
173
|
+
生成一个二维数组,可根据该二维数组的数据进行**并发**打tag,每一层的模块,都可以同时进行打tag发布操作,减少发布耗时;
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
[
|
|
177
|
+
["tdf_channel", "tdf_event", "tdf_network"],
|
|
178
|
+
["tdf_widgets"],
|
|
179
|
+
["tdf_smart_devices", "tdf_account_module"],
|
|
180
|
+
["flutter_reset_module"]
|
|
181
|
+
]
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
如上数据,数组中每一个节点中的模块均可同时打tag,节点之间需要由上至下的顺序进行tag操作
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
### 2.插件更新
|
|
189
|
+
|
|
190
|
+
执行 ```tdf_tool upgrade```
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### 3.远程模块配置文件更新
|
|
195
|
+
|
|
196
|
+
执行 ```tdf_tool module module_update```
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
## 依赖树分析原理
|
|
201
|
+
|
|
202
|
+
采用有向有/无环图进行依赖树的分析
|
|
203
|
+
|
|
204
|
+
数据结构采用如下:
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
class DependencyNode:
|
|
208
|
+
def __init__(self):
|
|
209
|
+
self.nodeName = ''
|
|
210
|
+
self.parent = [] # 父亲节点列表
|
|
211
|
+
self.children = [] # 子孙节点列表
|
|
212
|
+
self.delete = False
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+

|
|
216
|
+
|
|
217
|
+
如上图1:一个正常的依赖树表示;
|
|
218
|
+
|
|
219
|
+
如上图2:对图1中,依赖树所有节点去重,变换为图2有向图;
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
**分析流程:**
|
|
224
|
+
|
|
225
|
+
**依赖图构建**
|
|
226
|
+
|
|
227
|
+
```python
|
|
228
|
+
# 生成依赖图
|
|
229
|
+
def _generateDependenciesMap(self):
|
|
230
|
+
for package in self.__moduleDependenciesMap:
|
|
231
|
+
for module in moduleNameList:
|
|
232
|
+
if package == module:
|
|
233
|
+
# 到这一步表明当前这个模块属于开发模块且在当前模块的依赖模块列表中,是当前模块的子模块
|
|
234
|
+
self._mNodeDict[self.__moduleName].children.append(package)
|
|
235
|
+
self._mNodeDict[package].parent.append(self.__moduleName)
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
- 共5个节点
|
|
239
|
+
|
|
240
|
+
- node构建:
|
|
241
|
+
|
|
242
|
+
- ```python
|
|
243
|
+
{
|
|
244
|
+
"模块1":{
|
|
245
|
+
"nodeNmae": "模块1",
|
|
246
|
+
"parent": [],
|
|
247
|
+
"children": ["模块2","模块3","模块4","模块5"],
|
|
248
|
+
"delete": False
|
|
249
|
+
},
|
|
250
|
+
"模块2":{
|
|
251
|
+
"nodeNmae": "模块2",
|
|
252
|
+
"parent": ["模块1"],
|
|
253
|
+
"children": ["模块4","模块5"],
|
|
254
|
+
"delete": False
|
|
255
|
+
}
|
|
256
|
+
"模块3":{
|
|
257
|
+
"nodeNmae": "模块3",
|
|
258
|
+
"parent": ["模块1"],
|
|
259
|
+
"children": ["模块5"],
|
|
260
|
+
"delete": False
|
|
261
|
+
}
|
|
262
|
+
"模块4":{
|
|
263
|
+
"nodeNmae": "模块4",
|
|
264
|
+
"parent": ["模块1","模块2"],
|
|
265
|
+
"children": [],
|
|
266
|
+
"delete": False
|
|
267
|
+
}
|
|
268
|
+
"模块5":{
|
|
269
|
+
"nodeNmae": "模块5",
|
|
270
|
+
"parent": ["模块1","模块2","模块3"],
|
|
271
|
+
"children": [],
|
|
272
|
+
"delete": False
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
**依赖图解析伪代码(以一维数组为例)**
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
# 返回二维数组,用于并发打tag
|
|
281
|
+
def _generateDependenciesOrder(self):
|
|
282
|
+
resList = []
|
|
283
|
+
while 存在节点delete属性不为True:
|
|
284
|
+
|
|
285
|
+
for:查找子节点为0的节点
|
|
286
|
+
设置节点delete属性为True
|
|
287
|
+
|
|
288
|
+
for:deleteItemList = 拿到所有delete属性为true的节点
|
|
289
|
+
|
|
290
|
+
for:遍历所有节点,如果节点的子节点中包含deleteItemList的节点,则将其从子节点列表中删除
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
- **initial_config.json文件说明**
|
|
298
|
+
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"featureBranch": "feature/test_dev_1", // 开发分支
|
|
302
|
+
"shellName": "flutter_reset_module",
|
|
303
|
+
// 项目需要开发的模块,可自由配置
|
|
304
|
+
"moduleNameList": [
|
|
305
|
+
"flutter_reset_module",
|
|
306
|
+
"tdf_smart_devices",
|
|
307
|
+
"tdf_widgets",
|
|
308
|
+
"tdf_channel"
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
- **module_config.json文件说明**
|
|
314
|
+
|
|
315
|
+
```json
|
|
316
|
+
{
|
|
317
|
+
"flutter_globalyun_us_module": {
|
|
318
|
+
"id": "11111"
|
|
319
|
+
"type": "shell",
|
|
320
|
+
"git": "git@git.2dfire.net:app/flutter/app/flutter_globalyun_us_module.git"
|
|
321
|
+
},
|
|
322
|
+
"tdf_router_anno": {
|
|
323
|
+
"type": "base",
|
|
324
|
+
"git": "git@git.2dfire.net:app/flutter/app/tdf_router_anno.git"
|
|
325
|
+
},
|
|
326
|
+
}
|
|
327
|
+
//语意
|
|
328
|
+
{
|
|
329
|
+
"模块名":{
|
|
330
|
+
"id": 项目gitlab id
|
|
331
|
+
"类型": gitlab group名
|
|
332
|
+
"git": gitlab地址
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
## 后续计划
|
|
340
|
+
|
|
341
|
+
<span style="color:#ff0000">**问题:**</span>由于现在flutter ci 【lint】【tag】任务脚本成功率过于低,很多时候是因为项目模块的配置问题导致的,且后续会接入一键打tag工具
|
|
342
|
+
|
|
343
|
+
方案:在执行统一push前,对所有模块的项目配置信息进行校验,确保数据规范;
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
## 插件打包发布命令
|
|
348
|
+
|
|
349
|
+
**插件打包命令**
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
poetry build
|
|
353
|
+
```
|
|
354
|
+
**插件发布命令**
|
|
355
|
+
|
|
356
|
+
```
|
|
357
|
+
poetry publish
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
## History
|
|
361
|
+
|
|
362
|
+
### 2.1.00
|
|
363
|
+
|
|
364
|
+
- 路由功能支持flutter版本3.3.10,兼容flutter版本2.2.3;
|
|
365
|
+
|
|
366
|
+
### 2.0.61
|
|
367
|
+
|
|
368
|
+
- Flutter国际化字符串整合;
|
|
369
|
+
|
|
370
|
+
### 2.0.38
|
|
371
|
+
|
|
372
|
+
- 路由生成完后增加路由相关代码format(解决windows代码生成后顺序错乱);
|
|
373
|
+
|
|
374
|
+
### 2.0.01
|
|
375
|
+
|
|
376
|
+
- Cli 框架升级;
|
|
377
|
+
- 代码重构;
|
|
378
|
+
|
|
379
|
+
### **1.1.00(2022-4-28)**
|
|
380
|
+
|
|
381
|
+
- 国际化解决输出json中包含转义字符的问题,如\n;
|
|
382
|
+
- 四类语言输出文件自动格式化
|
|
383
|
+
|
|
384
|
+
### **1.0.55(2022-4-28)**
|
|
385
|
+
|
|
386
|
+
- 国际化key使用中文(依照ios项目开发形式);
|
|
387
|
+
|
|
388
|
+
### **1.0.53(2022-4-28)**
|
|
389
|
+
|
|
390
|
+
- 国际化流程中,兼容解决部分json解析失败问题,譬如字符串中包含"="符号;
|
|
391
|
+
|
|
392
|
+
> 错误日志如:Unterminated string starting at: line 1 column 5650 (char 5649)
|
|
393
|
+
|
|
394
|
+
### **1.0.50(2022-4-28)**
|
|
395
|
+
|
|
396
|
+
- 国际化增加繁体字翻译;
|
|
397
|
+
|
|
398
|
+
|