jaguar_reflect 2.1.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 79

jaguar_reflect

Uses reflection instead of source generation to serve Jaguar Api classes.

Usage

A simple usage example:

final book = new Book.make('0', 'Book1', ['Author1', 'Author2']);

@Api(path: '/api/book')
class BooksApi {
  @Get()
  Response<String> addBook(Context ctx) => Response.json(book.toMap());
}

Future<Null> main(List<String> args) async {
  final jaguar = new Jaguar(port: 8005);
  jaguar.addApi(reflect(new BooksApi()));
  await jaguar.serve();
}

Changelog

1.3.1

  • Faster processing of simple routes

1.2.6

  • Allow Symbols in Wrap and WrapOne

1.2.1

  • Wrap and WrapOne now take InterceptorCreator creator instead of Symbol

1.1.5

  • Bump to version 1.x.x

0.7.0

  • Jaguar 0.7.x

0.3.3

  • Collect inherited wrappers

0.3.2

  • Detect interceptor wrappers on RouteGroups and Apis

0.3.1

  • Fixed bug involving multiple groups

0.0.1

  • Initial version, created by Stagehand

example/example.dart

library jaguar.example.routes;

import 'package:jaguar/jaguar.dart';
import 'package:jaguar_reflect/jaguar_reflect.dart';

@Controller()
class ExampleController {
  @Get()
  String get(Context ctx) => 'Get';

  @Post()
  String post(_) => 'Post';

  @Put()
  String put(_) => 'Put';

  @Delete()
  String delete(_) => 'Delete';
}

main() async {
  Jaguar server = new Jaguar(port: 10000);
  server.add(reflect(new ExampleController()));
  await server.serve();
}

Use this package as a library

1. Depend on it

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


dependencies:
  jaguar_reflect: "^2.1.2"

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:jaguar_reflect/jaguar_reflect.dart';
  
Version Uploaded Documentation Archive
2.1.2 May 21, 2018 Go to the documentation of jaguar_reflect 2.1.2 Download jaguar_reflect 2.1.2 archive
2.1.1 May 20, 2018 Go to the documentation of jaguar_reflect 2.1.1 Download jaguar_reflect 2.1.1 archive
2.0.2 May 18, 2018 Go to the documentation of jaguar_reflect 2.0.2 Download jaguar_reflect 2.0.2 archive
2.0.1 May 18, 2018 Go to the documentation of jaguar_reflect 2.0.1 Download jaguar_reflect 2.0.1 archive
1.3.2 Feb 2, 2018 Go to the documentation of jaguar_reflect 1.3.2 Download jaguar_reflect 1.3.2 archive
1.3.1 Feb 2, 2018 Go to the documentation of jaguar_reflect 1.3.1 Download jaguar_reflect 1.3.1 archive
1.2.7 Jan 13, 2018 Go to the documentation of jaguar_reflect 1.2.7 Download jaguar_reflect 1.2.7 archive
1.2.6 Jan 13, 2018 Go to the documentation of jaguar_reflect 1.2.6 Download jaguar_reflect 1.2.6 archive
1.2.1 Jan 12, 2018 Go to the documentation of jaguar_reflect 1.2.1 Download jaguar_reflect 1.2.1 archive
1.1.5 Jan 11, 2018 Go to the documentation of jaguar_reflect 1.1.5 Download jaguar_reflect 1.1.5 archive

All 36 versions...

Analysis

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

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

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

Platforms

Detected platforms: web, other

Primary library: package:jaguar_reflect/jaguar_reflect.dart with components: mirrors.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 hint.

    Run dartfmt to format lib/reflect/reflect.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
jaguar ^2.1.1 2.1.7
Transitive dependencies
auth_header 0.0.3
charcode 1.1.1
collection 1.14.10
convert 2.0.1
crypto 2.0.5
http_server 0.9.7
logging 0.11.3+1
meta 1.1.5
mime 0.9.6+1
path 1.6.1
stack_trace 1.9.2
typed_data 1.1.5
Dev dependencies
http
jaguar_resty ^2.2.2
test ^0.12.15+10