modular_api 0.0.9 copy "modular_api: ^0.0.9" to clipboard
modular_api: ^0.0.9 copied to clipboard

Use case centric API toolkit for Shelf UseCase base class, HTTP adapters, CORS/API-Key middlewares, and OpenAPI specifications.

140/ 160
pub points
179
downloads

We analyzed this package 3 days ago, and awarded it 140 pub points (of a possible 160):

Passed report section
Follow Dart file conventions
30 / 30trigger folding of the section

Passed check 10/10 points: Provide a valid pubspec.yaml

Passed check 5/5 points: Provide a valid README.md

Passed check 5/5 points: Provide a valid CHANGELOG.md

Passed check 10/10 points: Use an OSI-approved license

Detected license: MIT.

Passed report section
Provide documentation
20 / 20trigger folding of the section

Passed check 10/10 points: 20% or more of the public API has dartdoc comments

141 out of 178 API elements (79.2 %) have documentation comments.

Some symbols that are missing documentation: modular_api.AccessToken.AccessToken.new, modular_api.Env, modular_api.Env.Env.new, modular_api.Env.getInt, modular_api.Env.getString.

Passed check 10/10 points: Package has an example

Passed report section
Platform support
20 / 20trigger folding of the section

Passed check 20/20 points: Supports 5 of 6 possible platforms (iOS, Android, Web, Windows, macOS, Linux)

  • ✓ Android

  • ✓ iOS

  • ✓ Windows

  • ✓ Linux

  • ✓ macOS

These platforms are not supported:

Package not compatible with platform Web

Because:

  • package:modular_api/modular_api.dart that imports:
  • package:modular_api/src/utils/get_local_ip.dart that imports:
  • dart:io
Partially passed report section
Pass static analysis
40 / 50trigger folding of the section

Partially passed check 40/50 points: code has no errors, warnings, lints, or formatting issues

INFO: Use a function declaration rather than a variable assignment to bind a function to a name.

lib/src/core/modular_api.dart:60:13

   ╷
60 │         final strictHandler = (Request request) {
   │ ┌─────────────^
61 │ │         if (request.method.toUpperCase() != methodU) {
62 │ │           return Response(
63 │ │             405,
64 │ │             body: jsonEncode({
65 │ │               'error': 'method_not_allowed',
66 │ │               'error_description':
67 │ │                   'Method ${request.method} not allowed. Use $methodU instead.',
68 │ │             }),
69 │ │             headers: {
70 │ │               'Content-Type': 'application/json',
71 │ │               'Allow': methodU,
72 │ │             },
73 │ │           );
74 │ │         }
75 │ │         return handler(request);
   │ └───────────^
   ╵

To reproduce make sure you are using the lints_core and run dart analyze lib/src/core/modular_api.dart

Failed report section
Support up-to-date dependencies
30 / 40trigger folding of the section

Failed check 0/10 points: All of the package dependencies are supported in the latest version

Package Constraint Compatible Latest Notes
bcrypt ^1.1.3 1.1.3 1.1.3
crypto ^3.0.5 3.0.7 3.0.7
cryptography ^2.7.0 2.9.0 2.9.0
dart_jsonwebtoken ^2.17.0 2.17.0 3.3.1
dotenv ^4.2.0 4.2.0 4.2.0
ffi ^2.1.2 2.1.4 2.1.4
http ^1.5.0 1.6.0 1.6.0
path ^1.9.0 1.9.1 1.9.1
shelf ^1.4.2 1.4.2 1.4.2
shelf_router ^1.1.4 1.1.4 1.1.4
shelf_swagger_ui ^2.0.0 2.0.0 2.0.0
Transitive dependencies
Package Constraint Compatible Latest Notes
adaptive_number - 1.0.0 1.0.0
args - 2.7.0 2.7.0
async - 2.13.0 2.13.0
clock - 1.1.2 1.1.2
collection - 1.19.1 1.19.1
convert - 3.1.2 3.1.2
ed25519_edwards - 0.3.1 0.3.1
fixnum - 1.1.1 1.1.1
http_methods - 1.1.1 1.1.1
http_parser - 4.1.2 4.1.2
js - 0.7.2 0.7.2 Discontinued
meta - 1.17.0 1.17.0
mime - 1.0.6 2.0.0
pointycastle - 3.9.1 4.0.0
source_span - 1.10.1 1.10.1
stack_trace - 1.12.1 1.12.1
stream_channel - 2.1.4 2.1.4
string_scanner - 1.4.1 1.4.1
term_glyph - 1.2.2 1.2.2
typed_data - 1.4.0 1.4.0
web - 1.1.1 1.1.1
yaml - 3.1.3 3.1.3

To reproduce run dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides.

The constraint `^2.17.0` on dart_jsonwebtoken does not support the stable version `3.0.0`.

Try running dart pub upgrade --major-versions dart_jsonwebtoken to update the constraint.

Passed check 10/10 points: Package supports latest stable Dart and Flutter SDKs

Passed check 20/20 points: Compatible with dependency constraint lower bounds

pub downgrade does not expose any static analysis error.

Analyzed with Pana 0.23.3, Dart 3.10.4.

Check the analysis log for details.

Weekly downloads

Display as:
By versions:
0
likes
140
points
179
downloads

Publisher

verified publisherccisne.dev

Weekly Downloads

Use case centric API toolkit for Shelf UseCase base class, HTTP adapters, CORS/API-Key middlewares, and OpenAPI specifications.

Repository (GitHub)
View/report issues

Topics

#api #openapi #macss

Documentation

API reference

License

MIT (license)

Dependencies

bcrypt, crypto, cryptography, dart_jsonwebtoken, dotenv, ffi, http, path, shelf, shelf_router, shelf_swagger_ui

More

Packages that depend on modular_api