wilt 3.4.0

  • README.md
  • changelog.md
  • Installing
  • Versions
  • 56

Wilt - both a browser and server based CouchDB client library

Introduction

Wilt is based on the lightweight SAG PHP CouchDB library available here. Users of this library should recognise the structure of Wilt easily. A common processing body is specialised by the use of browser(dart:html) or server(dart:io) HTTP adapters to allow operation in the browser or the server.

Wilt implements the document/attachment/database storage and manipulation interfaces of SAG along with the utility functions such as get session information etc. It does not directly implement the manipulation of design documents, clients however can manipulate these items by constructing their own URL's and using the basic httpRequest method.

Asynchronicity through the HTTP adapter is provided by the use of a standard Dart futures based interface or by using client supplied completion callbacks.

Authentication is provided using the Basic HTML method, cookie authentication is not supported, see the CouchDB_and CORS.txt document in the doc directory for more details here.

Wilt is a fully functional standalone library, however it is envisaged that higher level client specific application layers will be wrapped around Wilt to add specific CouchDB response parsing as Wilt returns JSON Objects(or strings) to the client. It has no knowledge of correct/incorrect responses such as conflict errors for instance, i.e it has no real CouchDB intelligence other than supplying success or error responses from its HTTP interface adapter.

Please read the STARTHERE.txt document in the docs directory for more detailed information.

Examples

Numerous examples of Wilt usage in both browser and server environments are coded as tests in the unit test suite under the test directory. Please read the Testing.txt document in doc/testing for further details.

Contact

Wilt is hosted here. Please use github to raise issues, any other queries you can direct to me at steve.hamblett@linux.com

3.4.0

Strong mode updates, switch to json_object_lite. Major test refactor Wilt now compiles under the dev compiler, tests factored into common and platform specific.

3.3.0

Update to latest packages/Dart environment. Retire the completion tests.

3.2.0

Issues 15, 21, 22 and 23.

3.1.2

Update to latest HTTP package

3.1.1

Issue 17, CouchDb 1.6.1 updates

3.1.0

Updates for Issues 13, 11 and 14

3.0.1

Updates for Dart V1.5.3, all tests running.

3.0.0

Issues 8 and 9, this makes Wilt both Browser and Server capable

2.3.0

Issue 7 fixed

2.2.2

Issue 6 fixed

2.2.1

Issue 5 fixed

2.2.0

Issues 3 and 4 fixed.

2.1.0

Standalone attachments added Change notification interface added

2.0.0

Updated for Dart 1.0 release Unit tests now use expectAsync0(() Native adapter success/error response hardening Various bugs NOTE - No API changes.

1.2.0

API docs generated

Updated to use dart:convert

1. Depend on it

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


dependencies:
  wilt: "^3.4.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 packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:wilt/wilt.dart';
        
Version Uploaded Documentation Archive
3.4.0 Dec 13, 2017 Go to the documentation of wilt 3.4.0 Download wilt 3.4.0 archive
3.3.0 Jul 19, 2017 Go to the documentation of wilt 3.3.0 Download wilt 3.3.0 archive
3.2.0 Nov 26, 2015 Go to the documentation of wilt 3.2.0 Download wilt 3.2.0 archive
3.1.2 Nov 5, 2015 Go to the documentation of wilt 3.1.2 Download wilt 3.1.2 archive
3.1.1 Aug 24, 2015 Go to the documentation of wilt 3.1.1 Download wilt 3.1.1 archive
3.1.0 Sep 4, 2014 Go to the documentation of wilt 3.1.0 Download wilt 3.1.0 archive
3.0.0 Mar 12, 2014 Go to the documentation of wilt 3.0.0 Download wilt 3.0.0 archive
2.3.0 Feb 27, 2014 Go to the documentation of wilt 2.3.0 Download wilt 2.3.0 archive
2.2.2 Feb 20, 2014 Go to the documentation of wilt 2.2.2 Download wilt 2.2.2 archive
2.2.1 Feb 20, 2014 Go to the documentation of wilt 2.2.1 Download wilt 2.2.1 archive

All 16 versions...

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Jan 21, 2018
  • Dart: 2.0.0-dev.15.0
  • pana: 0.10.0

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
40 / 100
Health:
Code health derived from static analysis. [more]
64 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
81 / 100
Overall score:
Weighted score of the above. [more]
56

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:wilt/wilt.dart.

Suggestions

  • Fix lib/src/httpAdapters/wilt_browser_http_adapter.dart.

    Strong-mode analysis of lib/src/httpAdapters/wilt_browser_http_adapter.dart failed with the following error:

    line: 44 col: 20
    The setter 'error' isn't defined for the class 'JsonObjectLite'.

  • Fix lib/src/httpAdapters/wilt_server_http_adapter.dart.

    Strong-mode analysis of lib/src/httpAdapters/wilt_server_http_adapter.dart failed with the following error:

    line: 51 col: 20
    The setter 'error' isn't defined for the class 'JsonObjectLite'.

  • Fix further 2 Dart files.

    Similar analysis of the following files failed:

    • lib/src/wilt_user_utils.dart
    • lib/src/wilt.dart
  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 3 error(s) and 0 warning(s).

  • Use constrained dependencies.

    The pubspec.yaml contains 2 dependencies without version constraints. Specify version ranges for the following dependencies: browser, http.

  • 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.

  • 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 wilt.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0-dev.infinity
browser any 0.10.0+2
crypto >=2.0.1 <3.0.0 2.0.2+1
http >=0.11.3+13 0.11.3+16
json_object_lite >=1.0.0 <=2.0.0 1.1.1
Transitive dependencies
async 2.0.3
charcode 1.1.1
collection 1.14.5
convert 2.0.1
http_parser 3.1.1
path 1.5.1
source_span 1.4.0
string_scanner 1.0.2
typed_data 1.1.5
Dev dependencies
coverage ^0.7.3
dart_dev ^1.0.0
dart_style >=0.2.0 <0.3.0
dartdoc >=0.8.0 <=0.10.0
test ^0.12.0