stream 2.2.1

Stream #

Stream is a Dart web server supporting request routing, filtering, template engine, WebSocket, MVC design pattern and file-based static resources.

Stream is distributed under an Apache 2.0 License.

Build Status

Installation #

Add this to your pubspec.yaml (or create it):

dependencies:
  stream:

Usage #

Compile RSP (Rikulo Stream Page) to dart files #

There are two ways to compile RSP files into dart files: automatic building with Dart Editor or manual compiling.

RSP is a template technology allowing developers to create dynamically generated web pages based on HTML, XML or other document types (such as this and this). Please refer to here for more information.

Build with Dart Editor #

To compile your RSP files automatically, you just need to add a build.dart file in the root directory of your project, with the following content:

import 'package:stream/rspc.dart';
void main(List<String> arguments) {
  build(arguments);
}

With this build.dart script, whenever your RSP is modified, it will be re-compiled.

Compile Manually #

To compile a RSP file manually, run rspc (RSP compiler) to compile it into the dart file with command line interface as follows:

dart -c lib/rspc.dart -n dir1 dir2 file1 fire2...

A dart file is generated for each RSP file you gave. Fore more options, please run:

dart -c lib/rspc.dart -h

Notes to Contributors #

Fork Stream #

If you'd like to contribute back to the core, you can fork this repository and send us a pull request, when it is ready.

Please be aware that one of Stream's design goals is to keep the sphere of API as neat and consistency as possible. Strong enhancement always demands greater consensus.

If you are new to Git or GitHub, please read this guide first.

Who Uses #

  • Quire - a simple, collaborative, multi-level task management tool.
  • Keikai - a sophisticated spreadsheet for big data

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate stream

2. Use it

The package has the following executables:


$ rspc

Use this package as a library

1. Depend on it

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


dependencies:
  stream: ^2.2.1

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:stream/stream.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
63
Health:
Code health derived from static analysis. [more]
8
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: other

Primary library: package:stream/stream.dart with components: io, mirrors.

Health suggestions

Fix lib/src/rspc/compiler.dart. (-39.73 points)

Analysis of lib/src/rspc/compiler.dart reported 101 hints, including:

line 6 col 1: Prefer using /// for doc comments.

line 30 col 59: Use = to separate a named parameter from its default value.

line 31 col 19: Use = to separate a named parameter from its default value.

line 31 col 43: Use = to separate a named parameter from its default value.

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

Fix lib/src/plugin/router.dart. (-24.85 points)

Analysis of lib/src/plugin/router.dart reported 57 hints, including:

line 6 col 1: Prefer using /// for doc comments.

line 10 col 3: Prefer using /// for doc comments.

line 19 col 48: Use = to separate a named parameter from its default value.

line 20 col 3: Prefer using /// for doc comments.

line 28 col 64: Use = to separate a named parameter from its default value.

Fix lib/src/rspc/tag.dart. (-21.78 points)

Analysis of lib/src/rspc/tag.dart reported 49 hints, including:

line 6 col 1: Prefer using /// for doc comments.

line 11 col 3: Prefer using /// for doc comments.

line 18 col 3: Prefer using /// for doc comments.

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

line 71 col 1: Prefer using /// for doc comments.

Fix additional 15 files with analysis or formatting issues. (-133.08 points)

Additional issues in the following files:

  • lib/src/server.dart (43 hints)
  • lib/src/server_impl.dart (39 hints)
  • lib/src/plugin/loader.dart (35 hints)
  • lib/src/rspc/tag_util.dart (31 hints)
  • lib/src/connect.dart (30 hints)
  • lib/src/rspc/build.dart (26 hints)
  • lib/src/connect_impl.dart (25 hints)
  • lib/src/rsp_util.dart (20 hints)
  • lib/src/plugin/loader_impl.dart (19 hints)
  • lib/src/rspc/main.dart (9 hints)
  • lib/proxy.dart (6 hints)
  • lib/plugin.dart (1 hint)
  • lib/rspc.dart (1 hint)
  • lib/stream.dart (1 hint)
  • bin/rspc.dart (Run dartfmt to format bin/rspc.dart.)

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Documentation URL is insecure. (-5 points)

Update the documentation field and use a secure (https) URL.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and stream.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
args >=0.13.0 <2.0.0 1.5.2
charcode >=1.1.0 <2.0.0 1.1.2
http >=0.11.0 <2.0.0 0.12.0+2
logging >=0.11.0 <2.0.0 0.11.3+2
path >=1.3.0 <2.0.0 1.6.2
rikulo_commons >=3.0.0 <4.0.0 3.2.1
Transitive dependencies
async 2.2.0
collection 1.14.11
http_parser 3.1.3
meta 1.1.7
mime 0.9.6+3
pedantic 1.8.0+1
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6

Admin