shelf_packages_handler 1.0.4

  • Readme
  • Changelog
  • Installing
  • 82

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]
95
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
30
Overall:
Weighted score of the above. [more]
82
Learn more about scoring.

We analyzed this package on Jan 25, 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/shelf_packages_handler.dart. (-1.49 points)

Analysis of lib/shelf_packages_handler.dart reported 3 hints:

line 25 col 10: Unnecessary new keyword.

line 30 col 14: Unnecessary new keyword.

line 44 col 5: Unnecessary new keyword.

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

Analysis of lib/src/async_handler.dart reported 3 hints:

line 13 col 52: Unnecessary new keyword.

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

line 21 col 14: Unnecessary new keyword.

Fix lib/src/package_config_handler.dart. (-1.49 points)

Analysis of lib/src/package_config_handler.dart reported 3 hints:

line 19 col 28: Unnecessary new keyword.

line 35 col 14: Unnecessary new keyword.

line 37 col 22: Unnecessary new keyword.

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

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

line 34 col 12: Unnecessary new keyword.

Maintenance suggestions

Package is getting outdated. (-52.05 points)

The package was last published 79 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+4
http_parser 3.1.3
meta 1.1.8
mime 0.9.6+3
package_config 1.1.0
pedantic 1.9.0
source_span 1.6.0
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