mgpcli 0.1.71

Magpie Workflow #


Magpie Workflow是一个Flutter开发的工具流,通过workflow实现Flutter模块的创建,开发,编译,打包,上传流程;

整体包含三部分:

  • 脚手架:命令行工具,如创建工程,启动可视化界面等
  • workflow前端: 开发编译的可视化页面
  • workflow后端: 为前端提供服务的server

使用说明 #

脚手架安装 #

确保您安装并正确配置了flutter环境

a. macos环境变量配置 #

flutter环境变量配置

export PATH=/*flutter directory*/flutter/bin:$PATH

同时建议配置dart相关的环境变量,方便pub的使用

export PATH="/*flutter directory*/flutter/bin/cache/dart-sdk/bin:$PATH"
export PATH="$PATH":"$HOME/.pub-cache/bin"

b. windows环境变量配置 #

flutter环境变量配置,在用户变量中选择PATH,双击后在末尾增加如下配置

\*flutter directory*\flutter\bin;

同时建议配置dart相关的环境变量,方便pub的使用

\*flutter directory*\flutter\bin\cache\dart-sdk\bin;
C:\Users\{替换用户名}\AppData\Roaming\Pub\Cache\bin

通过如上环境配置后,再运行pub命令安装mgpcli脚手架 (如何让环境变量生效 --- 可以关闭原有终端窗口再重新打开新终端) (如果使用flutter pub安装,需要替换上面Pub-Cache的路径为flutter安装路径)

pub global activate mgpcli

脚手架的开发/编译,请参考mgpcli 脚手架

workflow使用 #

通过mpcli命令工具可以创建一个flutter项目,并启动worklow进行编译。

1.创建flutter模块工程

# 创建模板工程
mgpcli create -n flutter_sample

2.启动workflow

# 进入新创建的工程目录内
cd flutter_sample
# 启动workflow
mgpcli start

3.进入workflow

现在已经为您打开了一个浏览器窗口,请移步至窗口进行:编译、Attach

贡献 #

源码贡献,请参考CONTRIBUTING

LICENSE #

BSD 3-Clause "New" or "Revised" License

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate mgpcli

2. Use it

The package has the following executables:


$ mgpcli

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  mgpcli: ^0.1.71

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:mgpcli/executable.dart';
import 'package:mgpcli/runner.dart';
import 'package:mgpcli/utils/util.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
75
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
10
Overall:
Weighted score of the above. [more]
25
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/src/vmservice.dart. (-15.25 points)

Analysis of lib/src/vmservice.dart reported 33 hints, including:

line 75 col 7: DO use curly braces for all flow control structures.

line 82 col 7: DO use curly braces for all flow control structures.

line 124 col 11: DO use curly braces for all flow control structures.

line 126 col 11: DO use curly braces for all flow control structures.

line 128 col 11: DO use curly braces for all flow control structures.

Fix lib/src/android/gradle.dart. (-12.22 points)

Analysis of lib/src/android/gradle.dart reported 26 hints, including:

line 296 col 5: DO use curly braces for all flow control structures.

line 434 col 5: DO use curly braces for all flow control structures.

line 447 col 5: DO use curly braces for all flow control structures.

line 605 col 5: DO use curly braces for all flow control structures.

line 613 col 5: DO use curly braces for all flow control structures.

Fix lib/src/android/android_device.dart. (-9.99 points)

Analysis of lib/src/android/android_device.dart reported 21 hints, including:

line 143 col 7: DO use curly braces for all flow control structures.

line 214 col 17: The value of the field '_logReader' isn't used.

line 266 col 16: The declaration '_checkForSupportedAdbVersion' isn't referenced.

line 268 col 7: DO use curly braces for all flow control structures.

line 273 col 9: DO use curly braces for all flow control structures.

Fix additional 74 files with analysis or formatting issues. (-162.20 points)

Additional issues in the following files:

  • lib/src/android/android_sdk.dart (20 hints)
  • lib/src/base/logger.dart (18 hints)
  • lib/src/ios/xcodeproj.dart (17 hints)
  • lib/src/base/process.dart (16 hints)
  • lib/src/version.dart (16 hints)
  • lib/src/doctor.dart (15 hints)
  • lib/src/dart/pub.dart (13 hints)
  • lib/src/ios/mac.dart (12 hints)
  • lib/src/base/os.dart (11 hints)
  • lib/src/flutter_manifest.dart (11 hints)
  • lib/src/project.dart (11 hints)
  • lib/src/ios/code_signing.dart (10 hints)
  • lib/src/cache.dart (9 hints)
  • lib/src/base/version.dart (8 hints)
  • lib/src/bundle.dart (8 hints)
  • lib/src/ios/simulators.dart (8 hints)
  • lib/src/macos/xcode.dart (8 hints)
  • lib/src/template.dart (8 hints)
  • lib/src/base/context.dart (7 hints)
  • lib/src/base/fingerprint.dart (7 hints)
  • lib/src/emulator.dart (7 hints)
  • lib/src/ios/devices.dart (7 hints)
  • lib/src/base/file_system.dart (6 hints)
  • lib/src/base/utils.dart (6 hints)
  • lib/src/device.dart (6 hints)
  • lib/src/macos/cocoapods.dart (6 hints)
  • lib/runner.dart (5 hints)
  • lib/src/android/android_studio.dart (5 hints)
  • lib/src/artifacts.dart (4 hints)
  • lib/src/base/terminal.dart (4 hints)
  • lib/src/build_info.dart (4 hints)
  • lib/src/dart/package_map.dart (4 hints)
  • lib/src/plugins.dart (4 hints)
  • lib/src/simple_device_entity.dart (4 hints)
  • lib/src/runner/mpcli_command.dart (3 hints)
  • lib/src/vmservice_record_replay.dart (3 hints)
  • bin/mgpcli.dart (2 hints)
  • lib/src/base/flags.dart (2 hints)
  • lib/src/base/net.dart (2 hints)
  • lib/src/commands/service.dart (2 hints)
  • lib/src/ios/plist_parser.dart (2 hints)
  • lib/src/services.dart (2 hints)
  • lib/src/android/android_console.dart (1 hint)
  • lib/src/base/config.dart (1 hint)
  • lib/src/base/io.dart (1 hint)
  • lib/src/commands/create.dart (1 hint)
  • lib/src/commands/doctor.dart (1 hint)
  • lib/src/ios/ios_emulators.dart (1 hint)
  • lib/src/macos/xcode_validator.dart (1 hint)
  • lib/src/web/web_device.dart (1 hint)
  • lib/utils/util.dart (1 hint)
  • lib/executable.dart (Run dartfmt to format lib/executable.dart.)
  • lib/src/android/android_emulator.dart (Run dartfmt to format lib/src/android/android_emulator.dart.)
  • lib/src/android/android_studio_validator.dart (Run dartfmt to format lib/src/android/android_studio_validator.dart.)
  • lib/src/android/android_workflow.dart (Run dartfmt to format lib/src/android/android_workflow.dart.)
  • lib/src/base/common.dart (Run dartfmt to format lib/src/base/common.dart.)
  • lib/src/base/process_manager.dart (Run dartfmt to format lib/src/base/process_manager.dart.)
  • lib/src/base/user_messages.dart (Run dartfmt to format lib/src/base/user_messages.dart.)
  • lib/src/commands/clean.dart (Run dartfmt to format lib/src/commands/clean.dart.)
  • lib/src/commands/devices.dart (Run dartfmt to format lib/src/commands/devices.dart.)
  • lib/src/commands/version.dart (Run dartfmt to format lib/src/commands/version.dart.)
  • lib/src/convert.dart (Run dartfmt to format lib/src/convert.dart.)
  • lib/src/dart/sdk.dart (Run dartfmt to format lib/src/dart/sdk.dart.)
  • lib/src/features.dart (Run dartfmt to format lib/src/features.dart.)
  • lib/src/ios/ios_workflow.dart (Run dartfmt to format lib/src/ios/ios_workflow.dart.)
  • lib/src/macos/cocoapod_utils.dart (Run dartfmt to format lib/src/macos/cocoapod_utils.dart.)
  • lib/src/macos/cocoapods_validator.dart (Run dartfmt to format lib/src/macos/cocoapods_validator.dart.)
  • lib/src/macos/macos_workflow.dart (Run dartfmt to format lib/src/macos/macos_workflow.dart.)
  • lib/src/reporting/crash_reporting.dart (Run dartfmt to format lib/src/reporting/crash_reporting.dart.)
  • lib/src/reporting/disabled_usage.dart (Run dartfmt to format lib/src/reporting/disabled_usage.dart.)
  • lib/src/reporting/events.dart (Run dartfmt to format lib/src/reporting/events.dart.)
  • lib/src/reporting/usage.dart (Run dartfmt to format lib/src/reporting/usage.dart.)
  • lib/src/web/chrome.dart (Run dartfmt to format lib/src/web/chrome.dart.)
  • lib/src/web/workflow.dart (Run dartfmt to format lib/src/web/workflow.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-40 points)

The version constraint in pubspec.yaml does not support the latest published versions for 4 dependencies (analyzer, dwds, protobuf, vm_service).

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and mgpcli.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
analyzer ^0.38.5 0.38.5 0.39.4
archive ^2.0.11 2.0.13
args ^1.5.2 1.5.2
async ^2.4.0 2.4.0
build ^1.2.1 1.2.2
build_config ^0.4.1+1 0.4.1+1
build_daemon ^2.1.0 2.1.0 2.1.3
build_modules ^2.6.3 2.7.0
build_runner ^1.7.2 1.7.3
build_runner_core ^4.1.0 4.3.0
build_test ^0.10.9+1 0.10.12
build_web_compilers ^2.7.1 2.8.0
code_builder ^3.2.0 3.2.0 3.2.1
completion ^0.2.1+1 0.2.1+1
convert ^2.1.1 2.1.1
coverage ^0.13.3+1 0.13.3+3
crypto ^2.1.3 2.1.4
dart_style ^1.3.3 1.3.3
dwds ^0.7.9 0.7.9 0.9.0
file ^5.1.0 5.1.0
glob ^1.2.0 1.2.0
graphs ^0.2.0 0.2.0
http ^0.12.0+2 0.12.0+4
http_multi_server ^2.0.5 2.1.0
intl ^0.16.0 0.16.1
json_rpc_2 ^2.1.0 2.1.0
linter ^0.1.101 0.1.101 0.1.109
logging ^0.11.3+2 0.11.4
meta ^1.1.8 1.1.8
multicast_dns ^0.2.2 0.2.2
mustache ^1.1.1 1.1.1
package_config ^1.1.0 1.1.0
path ^1.6.4 1.6.4
platform ^2.2.1 2.2.1
plugin ^0.2.0+3 0.2.0+3
pool ^1.4.0 1.4.0
process ^3.0.12 3.0.12
protobuf ^0.13.15 0.13.16+1 1.0.1
pub_semver ^1.4.2 1.4.2
quiver ^2.0.5 2.1.2+1
scratch_space ^0.0.4+1 0.0.4+2
shelf ^0.7.5 0.7.5
shelf_packages_handler ^1.0.4 1.0.4
shelf_static ^0.2.8 0.2.8
shelf_web_socket ^0.2.3 0.2.3
stack_trace ^1.9.3 1.9.3
stream_channel ^2.0.0 2.0.0
test_api ^0.2.11 0.2.13
test_core ^0.2.15 0.2.18
usage ^3.4.1 3.4.1
vm_service ^1.2.0 1.2.0 2.3.1
vm_service_client ^0.2.6+2 0.2.6+3
watcher ^0.9.7+13 0.9.7+13
web_socket_channel ^1.1.0 1.1.0
webkit_inspection_protocol ^0.5.0 0.5.0
xml ^3.5.0 3.7.0
yaml ^2.2.0 2.2.0
Transitive dependencies
analyzer_plugin 0.2.1
bazel_worker 0.1.21 0.1.23
boolean_selector 1.0.5
browser_launcher 0.1.5
build_resolvers 1.2.1 1.3.1
built_collection 4.3.2
built_value 6.8.2 7.0.8
built_value_generator 6.8.2 7.0.8
charcode 1.1.2
checked_yaml 1.0.2
csslib 0.16.1
devtools 0.1.13 0.1.14-dev.2
devtools_server 0.1.12
fixnum 0.10.11
front_end 0.1.27 0.1.29
html 0.14.0+3
http_parser 3.1.3
io 0.3.3
js 0.6.1+1
json_annotation 3.0.1
kernel 0.3.27 0.3.29
matcher 0.12.6
mime 0.9.6+3
node_interop 1.0.3
node_io 1.0.1+2
package_resolver 1.0.10
pedantic 1.9.0
petitparser 3.0.0
pubspec_parse 0.1.5
shelf_proxy 0.1.0+7
source_gen 0.9.4+6 0.9.4+7
source_map_stack_trace 1.1.5
source_maps 0.10.8
source_span 1.6.0
sse 2.1.2 3.1.1
stream_transform 0.0.20 1.1.0
string_scanner 1.0.5
term_glyph 1.1.0
timing 0.1.1+2
typed_data 1.1.6
uuid 2.0.4
Dev dependencies
build_vm_compilers 1.0.4
collection 1.14.11 1.14.12
file_testing 2.1.0
mockito 4.1.1
multi_server_socket 1.0.2 1.0.2
node_preamble 1.4.8 1.4.8
test 1.9.4 1.11.1