process_plus 1.0.0

  • README.md
  • Installing
  • Versions
  • 42

process_plus

Pub build status

Helpers for package:process. Including ForwardingProcessManager, PooledProcessManager, MockProcessManager, and CompletedProcess.

ForwardingProcessManager

A simple ProcessManager that delegates to another one. Typically used as a base class to extend functionality.

var manager = new ForwwardingProcessManager(const LocalProcessManager());

PooledProcessManager

A ProcessManager that uses a Pool to limit to the max amount of concurrently-running processes.

var manager = new PooledProcessManager(const LocalProcessManager(), Platform.numberOfProcessors);

MockProcessManager

A ProcessManager that can enqueue results in advance, rather than actually spawning OS processes.

var manager = new MockProcessManager();
manager.enqueue(new ProcessResult(0, 1337, stdout, stderr));

var p = await manager.run(['foo', '--bar=baz']);
await p.exitCode; // 1337

CompletedProcess

A Process implementation that simply outputs the result of a CompletedProcess.

var p = new CompletedProcess(new ProcessResult(0, 1337, stdout, stderr));
await p.exitCode; // 1337

Use this package as a library

1. Depend on it

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


dependencies:
  process_plus: "^1.0.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


      import 'package:process_plus/process_plus.dart';
  
Version Uploaded Documentation Archive
1.0.0 Mar 2, 2018 Go to the documentation of process_plus 1.0.0 Download process_plus 1.0.0 archive

Analysis

We analyzed this package on May 22, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.54.0
  • pana: 0.11.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
88 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80 / 100
Overall score:
Weighted score of the above. [more]
42
Learn more about scoring.

Platforms

Detected platforms: Flutter, other

Primary library: package:process_plus/process_plus.dart with components: io.

Suggestions

  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 18 hints.

    Run dartfmt to format lib/process_plus.dart.

    Strong-mode analysis of lib/src/completed_process.dart gave the following hint:

    line: 11 col: 51
    'SIGTERM' is deprecated and shouldn't be used.

    Similar analysis of the following files failed:

    • lib/src/forwarding_process_manager.dart (hint)
    • lib/src/mock_process_manager.dart (hint)
    • lib/src/pooled_process_manager.dart (hint)
  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use process_plus.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
pool ^1.0.0 1.3.5
process ^2.0.0 2.0.9 3.0.1
Transitive dependencies
async 2.0.7
collection 1.14.9
file 3.0.0 5.0.1
intl 0.15.6
meta 1.1.5
path 1.5.1
platform 2.1.2
stack_trace 1.9.2
Dev dependencies
test ^0.12.0