shelf_packages_handler 1.0.4

  • Readme
  • Changelog
  • Installing
  • 88

A package that provides a shelf handler for serving a packages/ directory. It's intended to be usable as the first handler in a Cascade, where any requests that include /packages/ are served package assets, and all other requests cascade to additional handlers.

1.0.4 #

  • Set max SDK version to <3.0.0, and adjust other dependencies.

1.0.3 #

  • Require Dart SDK 1.22.0
  • Support package:async v2

1.0.2 #

  • Fix Strong mode errors with package:shelf v0.7.x

1.0.1 #

  • Allow dependencies on package:shelf v0.7.x

0.0.1 #

  • Initial version

Use this package as a library

1. Depend on it

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


dependencies:
  shelf_packages_handler: ^1.0.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


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

We analyzed this package on Nov 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

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

Health suggestions

Fix lib/src/async_handler.dart. (-0.50 points)

Analysis of lib/src/async_handler.dart reported 1 hint:

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

Maintenance suggestions

Package is getting outdated. (-30.68 points)

The package was last published 68 weeks ago.

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 shelf_packages_handler.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

The package description is too short. (-8 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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.22.0 <3.0.0
async >=1.1.0 <3.0.0 2.4.0
package_resolver ^1.0.0 1.0.10
path ^1.0.0 1.6.4
shelf >=0.6.0 <0.8.0 0.7.5
shelf_static ^0.2.0 0.2.8
Transitive dependencies
charcode 1.1.2
collection 1.14.12
convert 2.1.1
http 0.12.0+2
http_parser 3.1.3
meta 1.1.8
mime 0.9.6+3
package_config 1.1.0
pedantic 1.8.0+1
source_span 1.5.5
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test >=0.12.0 <2.0.0