magpie_cli 0.1.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 32

English 中文说明

Pub Platform License build

Magpie Workflow is a visualized platform which is designed to create, develop and compile your standalone flutter module;

It's designed to manage the complexity of building mixed flutter apps, connect developers and flutter like the Magpie Bridge. This project has three parts:

  • cli: similar to flutter tool, used to create template project and start the web server;
  • workflow web: A flutter-web application used to develop & compile the flutter module;
  • workflow server:A dart server work with flutter-web;

How to use #

Install cli #

Make sure you have already installed the flutter sdk, the version should be v1.12.x.
If you haven't configure the flutter and dart environment, follow the guide at Magpie CLI#environment

pub global activate magpie_cli

Start Workflow #

Since you've installed the mgpcli, you may start to create a flutter module project now:

1.Create module project

mgpcli create -n flutter_sample

2.Start service

cd flutter_sample
mgpcli start

3.Switch to browser

The browser should have been opened instantly,http://127.0.0.1:8080

Contribution #

As we mentioned previously, Magpie has multi-parts;

Magpie also has some relative projects, you may check out these codebase as listed bellow:

Magpie Native&Dart SDK

Work with Magpie Workflow, it's native sdk which should be integrated into App. https://github.com/wuba/magpie_sdk

Magpie Fly

A Flutter UIKit. https://github.com/wuba/magpie_fly

Magpie Log

A visualized dynamic programme for log collection based on flutter. https://github.com/wuba/magpie_log

About #

This project is maintained by 58 Magpie Tech Team, thank you all for the contributions :)

avenwu, CoCodeDZ, haijun, hxinGood, iamagirlforios, Kcwind, lyx0224, MuYuLi, xiubojin, zdl51go, zhangkaixiao23

Thanks to Alina_0516 for the design.

LICENSE #

This project is open source under the BSD license.

We are using the flutter tools codebase and made some changes; There are many libraries we depend on, here is a short list, thanks you all:

effective_dart, provider, qr_flutter, process_run, dio, jaguar

For more details please refer to pubspec.yaml

[0.1.5] #

  • 添加debug产物
  • 修复日志崩溃
  • 适配部分路径问题
  • 适配Debug AAR发布
  • 修复open命令在windows引起崩溃
  • 调整构建提示内容

[0.1.4] #

  • 修复gitignore问题

[0.1.3] #

  • 更新引用资源

[0.1.2] #

  • 添加顶层帮助文档,方便查阅
  • 调整构建脚本,避免冗余资源

[0.1.1] #

  • 清理发布资源

[0.1.0] #

  • 清理发布资源

[0.0.1] #

  • 开源发布
  • 修复Windows下启动Workflow无法访问bug
  • 处理flutter tool部分代码的analyzer缺陷
  • 剔除部分无用依赖

example/README.md

A sample command-line application.

Created from templates made available by Stagehand under a BSD-style license.

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate magpie_cli

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:
  magpie_cli: ^0.1.5

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:magpie_cli/executable.dart';
import 'package:magpie_cli/runner.dart';
import 'package:magpie_cli/utils/generated_config.dart';
import 'package:magpie_cli/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]
50
Overall:
Weighted score of the above. [more]
32
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.13

Analysis suggestions

Package not compatible with SDK flutter

Because it is not compatible with any of the supported runtimes: flutter-native, flutter-web

Package not compatible with runtime flutter-native on android

Because of the import of dart:mirrors via the import chain package:magpie_cli/executable.dartpackage:magpie_cli/src/runner/mpcli_command.dartpackage:magpie_cli/src/reporting/reporting.dartpackage:magpie_cli/src/doctor.dartpackage:magpie_cli/src/macos/xcode_validator.dartpackage:magpie_cli/src/macos/xcode.dartpackage:magpie_cli/src/ios/xcodeproj.dartpackage:magpie_cli/src/project.dartpackage:magpie_cli/src/template.dartpackage:mustache/mustache.dartpackage:mustache/src/template.dartpackage:mustache/src/renderer.dartdart:mirrors

Package not compatible with runtime flutter-native on ios

Because of the import of dart:mirrors via the import chain package:magpie_cli/executable.dartpackage:magpie_cli/src/runner/mpcli_command.dartpackage:magpie_cli/src/reporting/reporting.dartpackage:magpie_cli/src/doctor.dartpackage:magpie_cli/src/macos/xcode_validator.dartpackage:magpie_cli/src/macos/xcode.dartpackage:magpie_cli/src/ios/xcodeproj.dartpackage:magpie_cli/src/project.dartpackage:magpie_cli/src/template.dartpackage:mustache/mustache.dartpackage:mustache/src/template.dartpackage:mustache/src/renderer.dartdart:mirrors

Package not compatible with runtime flutter-native on linux

Because of the import of dart:mirrors via the import chain package:magpie_cli/executable.dartpackage:magpie_cli/src/runner/mpcli_command.dartpackage:magpie_cli/src/reporting/reporting.dartpackage:magpie_cli/src/doctor.dartpackage:magpie_cli/src/macos/xcode_validator.dartpackage:magpie_cli/src/macos/xcode.dartpackage:magpie_cli/src/ios/xcodeproj.dartpackage:magpie_cli/src/project.dartpackage:magpie_cli/src/template.dartpackage:mustache/mustache.dartpackage:mustache/src/template.dartpackage:mustache/src/renderer.dartdart:mirrors

Package not compatible with runtime flutter-native on macos

Because of the import of dart:mirrors via the import chain package:magpie_cli/executable.dartpackage:magpie_cli/src/runner/mpcli_command.dartpackage:magpie_cli/src/reporting/reporting.dartpackage:magpie_cli/src/doctor.dartpackage:magpie_cli/src/macos/xcode_validator.dartpackage:magpie_cli/src/macos/xcode.dartpackage:magpie_cli/src/ios/xcodeproj.dartpackage:magpie_cli/src/project.dartpackage:magpie_cli/src/template.dartpackage:mustache/mustache.dartpackage:mustache/src/template.dartpackage:mustache/src/renderer.dartdart:mirrors

Package not compatible with runtime flutter-native on windows

Because of the import of dart:mirrors via the import chain package:magpie_cli/executable.dartpackage:magpie_cli/src/runner/mpcli_command.dartpackage:magpie_cli/src/reporting/reporting.dartpackage:magpie_cli/src/doctor.dartpackage:magpie_cli/src/macos/xcode_validator.dartpackage:magpie_cli/src/macos/xcode.dartpackage:magpie_cli/src/ios/xcodeproj.dartpackage:magpie_cli/src/project.dartpackage:magpie_cli/src/template.dartpackage:mustache/mustache.dartpackage:mustache/src/template.dartpackage:mustache/src/renderer.dartdart:mirrors

Package not compatible with runtime flutter-web on web

Because of the import of dart:io via the import chain package:magpie_cli/executable.dartpackage:magpie_cli/src/runner/mpcli_command.dartpackage:magpie_cli/src/reporting/reporting.dartpackage:magpie_cli/src/version.dartpackage:magpie_cli/src/globals.dartpackage:magpie_cli/src/cache.dartpackage:magpie_cli/src/base/platform.dartpackage:magpie_cli/src/base/file_system.dartpackage:magpie_cli/src/base/os.dartpackage:magpie_cli/src/base/process_manager.dartpackage:magpie_cli/src/base/process.dartpackage:magpie_cli/src/base/utils.dartpackage:magpie_cli/src/base/terminal.dartpackage:magpie_cli/src/base/io.dartdart:io

Package not compatible with runtime native-aot

Because of the import of dart:mirrors via the import chain package:magpie_cli/executable.dartpackage:magpie_cli/src/runner/mpcli_command.dartpackage:magpie_cli/src/reporting/reporting.dartpackage:magpie_cli/src/doctor.dartpackage:magpie_cli/src/macos/xcode_validator.dartpackage:magpie_cli/src/macos/xcode.dartpackage:magpie_cli/src/ios/xcodeproj.dartpackage:magpie_cli/src/project.dartpackage:magpie_cli/src/template.dartpackage:mustache/mustache.dartpackage:mustache/src/template.dartpackage:mustache/src/renderer.dartdart:mirrors

Package not compatible with runtime web

Because of the import of dart:io via the import chain package:magpie_cli/executable.dartpackage:magpie_cli/src/runner/mpcli_command.dartpackage:magpie_cli/src/reporting/reporting.dartpackage:magpie_cli/src/version.dartpackage:magpie_cli/src/globals.dartpackage:magpie_cli/src/cache.dartpackage:magpie_cli/src/base/platform.dartpackage:magpie_cli/src/base/file_system.dartpackage:magpie_cli/src/base/os.dartpackage:magpie_cli/src/base/process_manager.dartpackage:magpie_cli/src/base/process.dartpackage:magpie_cli/src/base/utils.dartpackage:magpie_cli/src/base/terminal.dartpackage:magpie_cli/src/base/io.dartdart:io

Health suggestions

Fix lib/src/dart/pub.dart. (-3.45 points)

Analysis of lib/src/dart/pub.dart reported 7 hints, including:

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

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

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

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

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

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

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

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

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

line 287 col 16: The declaration '_checkForSupportedAndroidVersion' isn't referenced.

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

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

Fix lib/src/base/logger.dart. (-2.96 points)

Analysis of lib/src/base/logger.dart reported 6 hints, including:

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

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

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

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

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

Fix additional 39 files with analysis or formatting issues. (-53.20 points)

Additional issues in the following files:

  • lib/src/ios/mac.dart (6 hints)
  • lib/src/template.dart (6 hints)
  • lib/src/vmservice.dart (6 hints)
  • lib/src/base/os.dart (5 hints)
  • lib/src/ios/code_signing.dart (5 hints)
  • lib/src/project.dart (5 hints)
  • lib/src/android/gradle.dart (4 hints)
  • lib/src/base/process.dart (4 hints)
  • lib/src/bundle.dart (4 hints)
  • lib/src/doctor.dart (4 hints)
  • lib/src/macos/cocoapods.dart (4 hints)
  • lib/src/macos/xcode.dart (4 hints)
  • lib/src/simple_device_entity.dart (4 hints)
  • lib/src/version.dart (4 hints)
  • lib/runner.dart (3 hints)
  • lib/src/base/file_system.dart (3 hints)
  • lib/src/dart/package_map.dart (3 hints)
  • lib/src/flutter_manifest.dart (3 hints)
  • bin/mgpcli.dart (2 hints)
  • lib/src/base/context.dart (2 hints)
  • lib/src/base/fingerprint.dart (2 hints)
  • lib/src/base/terminal.dart (2 hints)
  • lib/src/cache.dart (2 hints)
  • lib/src/commands/service.dart (2 hints)
  • lib/src/emulator.dart (2 hints)
  • lib/src/ios/devices.dart (2 hints)
  • lib/src/ios/simulators.dart (2 hints)
  • lib/src/android/android_studio.dart (1 hint)
  • lib/src/base/config.dart (1 hint)
  • lib/src/base/flags.dart (1 hint)
  • lib/src/base/utils.dart (1 hint)
  • lib/src/commands/create.dart (1 hint)
  • lib/src/device.dart (1 hint)
  • lib/src/ios/plist_parser.dart (1 hint)
  • lib/src/macos/xcode_validator.dart (1 hint)
  • lib/src/plugins.dart (1 hint)
  • lib/src/runner/mpcli_command.dart (1 hint)
  • lib/src/services.dart (1 hint)
  • lib/src/vmservice_record_replay.dart (1 hint)

Maintenance issues and suggestions

Support latest dependencies. (-50 points)

The version constraint in pubspec.yaml does not support the latest published versions for 5 dependencies (coverage, dwds, vm_service, webkit_inspection_protocol, xml).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
archive ^2.0.11 2.0.13
args ^1.5.2 1.6.0
async ^2.4.0 2.4.2
build_config ^0.4.1+1 0.4.2
build_runner ^1.7.2 1.9.0 1.10.0
completion ^0.2.1+1 0.2.2
convert ^2.1.1 2.1.1
coverage ^0.13.3+1 0.13.11 0.14.0
crypto ^2.1.3 2.1.5
dwds ^0.7.9 0.7.9 5.0.0
file ^5.1.0 5.2.1
glob ^1.2.0 1.2.0
graphs ^0.2.0 0.2.0
http ^0.12.0+2 0.12.1
http_multi_server ^2.0.5 2.2.0
intl ^0.16.0 0.16.1
json_rpc_2 ^2.1.0 2.2.1
linter ^0.1.101 0.1.101 0.1.117
logging ^0.11.3+2 0.11.4
meta ^1.1.8 1.2.1
multicast_dns ^0.2.2 0.2.2
mustache ^1.1.1 1.1.1
package_config ^1.1.0 1.9.3
path ^1.6.4 1.7.0
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.13
pub_semver ^1.4.2 1.4.4
quiver ^2.0.5 2.1.3
scratch_space ^0.0.4+1 0.0.4+2
shelf ^0.7.5 0.7.7
shelf_static ^0.2.8 0.2.8
shelf_web_socket ^0.2.3 0.2.3
stack_trace ^1.9.3 1.9.5
stream_channel ^2.0.0 2.0.0
test_api ^0.2.11 0.2.17
usage ^3.4.1 3.4.2
vm_service ^1.2.0 1.2.0 4.1.0
vm_service_client ^0.2.6+2 0.2.6+3
watcher ^0.9.7+13 0.9.7+15
web_socket_channel ^1.1.0 1.1.0
webkit_inspection_protocol ^0.5.0 0.5.4 0.7.3
xml ^3.5.0 3.7.0 4.2.0
yaml ^2.2.0 2.2.1
Transitive dependencies
analyzer 0.38.5 0.39.12
analyzer_plugin 0.2.1 0.2.5
boolean_selector 2.0.0
browser_launcher 0.1.7
build 1.2.2 1.3.0
build_daemon 2.1.0 2.1.4
build_resolvers 1.2.1 1.3.10
build_runner_core 5.1.0 6.0.0
built_collection 4.3.2
built_value 6.8.2 7.1.0
built_value_generator 6.8.2 7.1.0
charcode 1.1.3
checked_yaml 1.0.2
code_builder 3.2.0 3.4.0
collection 1.14.13 1.15.0-nnbd
csslib 0.16.1
dart_style 1.3.3 1.3.6
devtools 0.1.8 0.8.0+1
devtools_server 0.1.10 0.8.0+1
fixnum 0.10.11
front_end 0.1.27 0.1.29
html 0.14.0+3
http_parser 3.1.4
io 0.3.4
js 0.6.2
json_annotation 3.0.1
kernel 0.3.27 0.3.29
matcher 0.12.8
mime 0.9.6+3
node_interop 1.1.1
node_io 1.1.1
package_resolver 1.0.10
pedantic 1.9.1
petitparser 3.0.4
pubspec_parse 0.1.5
shelf_proxy 0.1.0+7
source_gen 0.9.4+6 0.9.5
source_maps 0.10.9
source_span 1.7.0
sse 2.1.2 3.5.0
stream_transform 0.0.20 1.2.0
string_scanner 1.0.5
term_glyph 1.1.0
timing 0.1.1+2
typed_data 1.2.0 1.3.0-nnbd
uuid 2.2.0