Publish angel3_framework
This commit is contained in:
parent
4d021e9f95
commit
f713c1f001
74 changed files with 211 additions and 239 deletions
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2016 angel-dart
|
Copyright (c) 2021 dukefirehawk.com
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
[![The Angel Framework](https://angel-dart.github.io/assets/images/logo.png)](https://angel-dart.dev)
|
[![The Angel Framework](https://angel-dart.github.io/assets/images/logo.png)](https://angel-dart.dev)
|
||||||
|
|
||||||
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/angel_dart/discussion)
|
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/angel_dart/discussion)
|
||||||
[![Pub](https://img.shields.io/pub/v/angel_framework.svg)](https://pub.dartlang.org/packages/angel_framework)
|
[![Pub](https://img.shields.io/pub/v/angel_framework.svg)](https://pub.dartlang.org/packages/angel3_framework)
|
||||||
[![Build status](https://travis-ci.org/angel-dart/framework.svg?branch=master)](https://travis-ci.org/angel-dart/framework)
|
[![Build status](https://travis-ci.org/angel-dart/framework.svg?branch=master)](https://travis-ci.org/angel-dart/framework)
|
||||||
![License](https://img.shields.io/github/license/angel-dart/framework.svg)
|
![License](https://img.shields.io/github/license/angel-dart/framework.svg)
|
||||||
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/LICENSE)
|
||||||
|
|
||||||
|
|
||||||
**A polished, production-ready backend framework in Dart.**
|
**A polished, production-ready backend framework in Dart.**
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_code_buffer)
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_code_buffer)
|
||||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/code_buffer)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/code_buffer/LICENSE)
|
||||||
|
|
||||||
An advanced StringBuffer geared toward generating code, and source maps.
|
An advanced StringBuffer geared toward generating code, and source maps.
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_combinator)
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_combinator)
|
||||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/combinator)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/combinator/LICENSE)
|
||||||
|
|
||||||
Packrat parser combinators that support static typing, generics, file spans, memoization, and more.
|
Packrat parser combinators that support static typing, generics, file spans, memoization, and more.
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_container)
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_container)
|
||||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/container/angel_container)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/container/angel_container/LICENSE)
|
||||||
|
|
||||||
A better IoC container for Angel, ultimately allowing Angel to be used without dart:mirrors.
|
A better IoC container for Angel, ultimately allowing Angel to be used without dart:mirrors.
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
# angel_framework
|
# angel3_framework
|
||||||
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_framework)
|
||||||
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
[![Pub](https://img.shields.io/pub/v/angel_framework.svg)](https://pub.dartlang.org/packages/angel_framework)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/framework/LICENSE)
|
||||||
[![build status](https://travis-ci.org/angel-dart/framework.svg)](https://travis-ci.org/angel-dart/framework)
|
|
||||||
|
|
||||||
A high-powered HTTP server with support for dependency injection, sophisticated routing and more.
|
A high-powered HTTP server with support for dependency injection, sophisticated routing and more.
|
||||||
|
|
||||||
This is the core of the [Angel](https://github.com/angel-dart/angel) framework.
|
This is the core of the [Angel](https://github.com/dukefirehawk/angel/tree/angel3) framework.
|
||||||
To build real-world applications, please see the [homepage](https://angel-dart.dev).
|
To build real-world applications, please see the [homepage](https://angel-dart.dev).
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
|
|
||||||
main() async {
|
main() async {
|
||||||
var app = Angel(reflector: MirrorsReflector());
|
var app = Angel(reflector: MirrorsReflector());
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
// Logging set up/boilerplate
|
// Logging set up/boilerplate
|
||||||
Logger.root.onRecord.listen(print);
|
Logger.root.onRecord.listen(print);
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
var app = Angel(reflector: MirrorsReflector())
|
var app = Angel(reflector: MirrorsReflector())
|
||||||
..logger = (Logger('angel')
|
..logger = (Logger('angel')
|
||||||
..onRecord.listen((rec) {
|
..onRecord.listen((rec) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
||||||
Future<void> apiConfigurer(Angel app) async {
|
Future<void> apiConfigurer(Angel app) async {
|
||||||
|
@ -14,7 +14,7 @@ Future<void> frontendConfigurer(Angel app) async {
|
||||||
app.fallback((req, res) => '(usually an index page would be shown here.)');
|
app.fallback((req, res) => '(usually an index page would be shown here.)');
|
||||||
}
|
}
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
// Logging set up/boilerplate
|
// Logging set up/boilerplate
|
||||||
hierarchicalLoggingEnabled = true;
|
hierarchicalLoggingEnabled = true;
|
||||||
//Logger.root.onRecord.listen(prettyLog);
|
//Logger.root.onRecord.listen(prettyLog);
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:angel_framework/http2.dart';
|
import 'package:angel3_framework/http2.dart';
|
||||||
import 'package:file/local.dart';
|
import 'package:file/local.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
var app = Angel();
|
var app = Angel();
|
||||||
app.logger = Logger('angel')
|
app.logger = Logger('angel')
|
||||||
..onRecord.listen((rec) {
|
..onRecord.listen((rec) {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:angel_framework/http2.dart';
|
import 'package:angel3_framework/http2.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
var app = Angel()
|
var app = Angel()
|
||||||
..encoders.addAll({
|
..encoders.addAll({
|
||||||
'gzip': gzip.encoder,
|
'gzip': gzip.encoder,
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:angel_framework/http2.dart';
|
import 'package:angel3_framework/http2.dart';
|
||||||
import 'package:file/local.dart';
|
import 'package:file/local.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
var app = Angel();
|
var app = Angel();
|
||||||
app.logger = Logger('angel')
|
app.logger = Logger('angel')
|
||||||
..onRecord.listen((rec) {
|
..onRecord.listen((rec) {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:isolate';
|
import 'dart:isolate';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
int x = 0;
|
int x = 0;
|
||||||
var c = Completer();
|
var c = Completer();
|
||||||
var exit = ReceivePort();
|
var exit = ReceivePort();
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
// Logging set up/boilerplate
|
// Logging set up/boilerplate
|
||||||
//Logger.root.onRecord.listen(prettyLog);
|
//Logger.root.onRecord.listen(prettyLog);
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
// Logging set up/boilerplate
|
// Logging set up/boilerplate
|
||||||
Logger.root.onRecord.listen(print);
|
Logger.root.onRecord.listen(print);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
var app = Angel();
|
var app = Angel();
|
||||||
var http = AngelHttp(app);
|
var http = AngelHttp(app);
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
var app = Angel(reflector: MirrorsReflector());
|
var app = Angel(reflector: MirrorsReflector());
|
||||||
|
|
||||||
app.viewGenerator = (name, [data]) async =>
|
app.viewGenerator = (name, [data]) async =>
|
||||||
|
|
7
packages/framework/lib/angel3_framework.dart
Normal file
7
packages/framework/lib/angel3_framework.dart
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
/// An easily-extensible web server framework in Dart.
|
||||||
|
library angel3_framework;
|
||||||
|
|
||||||
|
export 'package:angel3_http_exception/angel3_http_exception.dart';
|
||||||
|
export 'package:angel3_model/angel3_model.dart';
|
||||||
|
export 'package:angel3_route/angel3_route.dart';
|
||||||
|
export 'src/core/core.dart';
|
|
@ -1,7 +0,0 @@
|
||||||
/// An easily-extensible web server framework in Dart.
|
|
||||||
library angel_framework;
|
|
||||||
|
|
||||||
export 'package:angel_http_exception/angel_http_exception.dart';
|
|
||||||
export 'package:angel_model/angel_model.dart';
|
|
||||||
export 'package:angel_route/angel_route.dart';
|
|
||||||
export 'src/core/core.dart';
|
|
|
@ -1,8 +1,8 @@
|
||||||
library angel_framework.http.controller;
|
library angel_framework.http.controller;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_container/angel_container.dart';
|
import 'package:angel3_container/angel3_container.dart';
|
||||||
import 'package:angel_route/angel_route.dart';
|
import 'package:angel3_route/angel3_route.dart';
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
import 'package:recase/recase.dart';
|
import 'package:recase/recase.dart';
|
||||||
import '../core/core.dart';
|
import '../core/core.dart';
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io' show stderr, Cookie;
|
import 'dart:io' show stderr, Cookie;
|
||||||
import 'package:angel_http_exception/angel_http_exception.dart';
|
import 'package:angel3_http_exception/angel3_http_exception.dart';
|
||||||
import 'package:angel_route/angel_route.dart';
|
import 'package:angel3_route/angel3_route.dart';
|
||||||
import 'package:combinator/combinator.dart';
|
import 'package:angel3_combinator/angel3_combinator.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:stack_trace/stack_trace.dart';
|
import 'package:stack_trace/stack_trace.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_container/angel_container.dart';
|
import 'package:angel3_container/angel3_container.dart';
|
||||||
import 'package:angel_route/angel_route.dart';
|
import 'package:angel3_route/angel3_route.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'env.dart';
|
import 'env.dart';
|
||||||
import 'hostname_parser.dart';
|
import 'hostname_parser.dart';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:angel_http_exception/angel_http_exception.dart';
|
import 'package:angel3_http_exception/angel3_http_exception.dart';
|
||||||
|
|
||||||
import 'service.dart';
|
import 'service.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
library angel_framework.http.metadata;
|
library angel_framework.http.metadata;
|
||||||
|
|
||||||
import 'package:angel_http_exception/angel_http_exception.dart';
|
import 'package:angel3_http_exception/angel3_http_exception.dart';
|
||||||
|
|
||||||
import 'hooked_service.dart' show HookedServiceEventListener;
|
import 'hooked_service.dart' show HookedServiceEventListener;
|
||||||
import 'request_context.dart';
|
import 'request_context.dart';
|
||||||
|
|
|
@ -11,7 +11,7 @@ import 'dart:io'
|
||||||
HttpSession,
|
HttpSession,
|
||||||
InternetAddress;
|
InternetAddress;
|
||||||
|
|
||||||
import 'package:angel_container/angel_container.dart';
|
import 'package:angel3_container/angel3_container.dart';
|
||||||
import 'package:http_parser/http_parser.dart';
|
import 'package:http_parser/http_parser.dart';
|
||||||
import 'package:http_server/http_server.dart';
|
import 'package:http_server/http_server.dart';
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'dart:convert' as c show json;
|
||||||
import 'dart:io' show BytesBuilder, Cookie;
|
import 'dart:io' show BytesBuilder, Cookie;
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:angel_route/angel_route.dart';
|
import 'package:angel3_route/angel3_route.dart';
|
||||||
import 'package:file/file.dart';
|
import 'package:file/file.dart';
|
||||||
import 'package:http_parser/http_parser.dart';
|
import 'package:http_parser/http_parser.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
|
@ -2,8 +2,8 @@ library angel_framework.http.routable;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:angel_container/angel_container.dart';
|
import 'package:angel3_container/angel3_container.dart';
|
||||||
import 'package:angel_route/angel_route.dart';
|
import 'package:angel3_route/angel3_route.dart';
|
||||||
|
|
||||||
import '../util.dart';
|
import '../util.dart';
|
||||||
import 'hooked_service.dart';
|
import 'hooked_service.dart';
|
||||||
|
|
|
@ -3,10 +3,10 @@ library angel_framework.http.server;
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:collection' show HashMap;
|
import 'dart:collection' show HashMap;
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:angel_container/angel_container.dart';
|
import 'package:angel3_container/angel3_container.dart';
|
||||||
import 'package:angel_http_exception/angel_http_exception.dart';
|
import 'package:angel3_http_exception/angel3_http_exception.dart';
|
||||||
import 'package:angel_route/angel_route.dart';
|
import 'package:angel3_route/angel3_route.dart';
|
||||||
import 'package:combinator/combinator.dart';
|
import 'package:angel3_combinator/angel3_combinator.dart';
|
||||||
import 'package:http_parser/http_parser.dart';
|
import 'package:http_parser/http_parser.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:mime/mime.dart';
|
import 'package:mime/mime.dart';
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
library angel_framework.http.service;
|
library angel_framework.http.service;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_http_exception/angel_http_exception.dart';
|
import 'package:angel3_http_exception/angel3_http_exception.dart';
|
||||||
import 'package:merge_map/merge_map.dart';
|
import 'package:angel3_merge_map/angel3_merge_map.dart';
|
||||||
import 'package:quiver/core.dart';
|
import 'package:quiver/core.dart';
|
||||||
import '../util.dart';
|
import '../util.dart';
|
||||||
import 'anonymous_service.dart';
|
import 'anonymous_service.dart';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import 'dart:io'
|
||||||
HttpServer,
|
HttpServer,
|
||||||
Platform,
|
Platform,
|
||||||
SecurityContext;
|
SecurityContext;
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import '../core/core.dart';
|
import '../core/core.dart';
|
||||||
import 'http_request_context.dart';
|
import 'http_request_context.dart';
|
||||||
import 'http_response_context.dart';
|
import 'http_response_context.dart';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_container/angel_container.dart';
|
import 'package:angel3_container/angel3_container.dart';
|
||||||
import 'package:http_parser/http_parser.dart';
|
import 'package:http_parser/http_parser.dart';
|
||||||
|
|
||||||
import '../core/core.dart';
|
import '../core/core.dart';
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_framework/angel_framework.dart' hide Header;
|
import 'package:angel3_framework/angel3_framework.dart' hide Header;
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:http2/transport.dart';
|
import 'package:http2/transport.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'http2_request_context.dart';
|
import 'http2_request_context.dart';
|
||||||
import 'http2_response_context.dart';
|
import 'http2_response_context.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_container/src/container.dart';
|
import 'package:angel3_container/src/container.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:collection/collection.dart' show IterableExtension;
|
import 'package:collection/collection.dart' show IterableExtension;
|
||||||
import 'package:http2/transport.dart';
|
import 'package:http2/transport.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
final RegExp _comma = RegExp(r',\s*');
|
final RegExp _comma = RegExp(r',\s*');
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_framework/angel_framework.dart' hide Header;
|
import 'package:angel3_framework/angel3_framework.dart' hide Header;
|
||||||
import 'package:http2/transport.dart';
|
import 'package:http2/transport.dart';
|
||||||
import 'http2_request_context.dart';
|
import 'http2_request_context.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:angel_container/angel_container.dart';
|
import 'package:angel3_container/angel3_container.dart';
|
||||||
|
|
||||||
final RegExp straySlashes = RegExp(r'(^/+)|(/+$)');
|
final RegExp straySlashes = RegExp(r'(^/+)|(/+$)');
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
/// A basic server that prints "Hello, world!"
|
/// A basic server that prints "Hello, world!"
|
||||||
library performance.hello;
|
library performance.hello;
|
||||||
|
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
var app = Angel();
|
var app = Angel();
|
||||||
var http = AngelHttp.custom(app, startShared, useZone: false);
|
var http = AngelHttp.custom(app, startShared, useZone: false);
|
||||||
|
|
||||||
|
|
|
@ -1,59 +1,28 @@
|
||||||
name: angel_framework
|
name: angel3_framework
|
||||||
version: 4.0.0
|
version: 4.0.0
|
||||||
description: A high-powered HTTP server with dependency injection, routing and much more.
|
description: A high-powered HTTP server with dependency injection, routing and much more.
|
||||||
homepage: https://github.com/dukefirehawk/angel
|
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/framework
|
||||||
publish_to: none
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
angel_container:
|
angel3_container: ^3.0.0
|
||||||
git:
|
angel3_http_exception: ^3.0.0
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
angel3_model: ^3.0.0
|
||||||
ref: sdk-2.12.x_nnbd
|
angel3_route: ^5.0.0
|
||||||
path: packages/container/angel_container
|
angel3_combinator: ^2.0.0
|
||||||
angel_http_exception:
|
angel3_merge_map: ^2.0.0
|
||||||
git:
|
angel3_mock_request: ^2.0.0
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x_nnbd
|
|
||||||
path: packages/http_exception
|
|
||||||
angel_model:
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x_nnbd
|
|
||||||
path: packages/model
|
|
||||||
angel_route:
|
|
||||||
# path: ../route
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x_nnbd
|
|
||||||
path: packages/route
|
|
||||||
charcode: ^1.2.0
|
charcode: ^1.2.0
|
||||||
combinator:
|
|
||||||
# path: ../combinator
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x_nnbd
|
|
||||||
path: packages/combinator
|
|
||||||
file: ^6.1.0
|
file: ^6.1.0
|
||||||
http_parser: ^4.0.0
|
http_parser: ^4.0.0
|
||||||
http_server: ^1.0.0
|
http_server: ^1.0.0
|
||||||
http2: ^2.0.0
|
http2: ^2.0.0
|
||||||
logging: ^1.0.0
|
logging: ^1.0.0
|
||||||
matcher: ^0.12.10
|
matcher: ^0.12.10
|
||||||
merge_map:
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x_nnbd
|
|
||||||
path: packages/merge_map
|
|
||||||
meta: ^1.3.0
|
meta: ^1.3.0
|
||||||
mime: ^1.0.0
|
mime: ^1.0.0
|
||||||
mock_request:
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x_nnbd
|
|
||||||
path: packages/mock_request
|
|
||||||
path: ^1.8.0
|
path: ^1.8.0
|
||||||
quiver: ^3.0.0
|
quiver: ^3.0.1
|
||||||
recase: ^4.0.0
|
recase: ^4.0.0
|
||||||
stack_trace: ^1.10.0
|
stack_trace: ^1.10.0
|
||||||
string_scanner: ^1.1.0
|
string_scanner: ^1.1.0
|
||||||
|
@ -63,5 +32,5 @@ dependencies:
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
http: ^0.13.1
|
http: ^0.13.1
|
||||||
io: ^1.0.0
|
io: ^1.0.0
|
||||||
test: ^1.17.3
|
test: ^1.17.4
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:charcode/ascii.dart';
|
import 'package:charcode/ascii.dart';
|
||||||
import 'package:http/io_client.dart' as http;
|
import 'package:http/io_client.dart' as http;
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
final Uri ENDPOINT = Uri.parse('http://example.com/accept');
|
final Uri ENDPOINT = Uri.parse('http://example.com/accept');
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
test('no content type', () async {
|
test('no content type', () async {
|
||||||
var req = await acceptContentTypes();
|
var req = await acceptContentTypes();
|
||||||
expect(req.acceptsAll, isFalse);
|
expect(req.acceptsAll, isFalse);
|
||||||
|
|
|
@ -30,7 +30,7 @@ import 'view_generator_test.dart' as view_generator;
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
/// For running with coverage
|
/// For running with coverage
|
||||||
main() {
|
void main() {
|
||||||
print(cyan.wrap('Running tests on ${Platform.version}'));
|
print(cyan.wrap('Running tests on ${Platform.version}'));
|
||||||
group('404_hole', hole404.main);
|
group('404_hole', hole404.main);
|
||||||
group('accepts', accepts.main);
|
group('accepts', accepts.main);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
library angel_framework.test.common;
|
library angel_framework.test.common;
|
||||||
|
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:matcher/matcher.dart';
|
import 'package:matcher/matcher.dart';
|
||||||
|
|
||||||
class Todo extends Model {
|
class Todo extends Model {
|
||||||
|
|
|
@ -2,11 +2,11 @@ import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_container/angel_container.dart';
|
import 'package:angel3_container/angel3_container.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
|
@ -14,7 +14,7 @@ import 'common.dart';
|
||||||
final String TEXT = "make your bed";
|
final String TEXT = "make your bed";
|
||||||
final String OVER = "never";
|
final String OVER = "never";
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
late Angel app;
|
late Angel app;
|
||||||
late http.Client client;
|
late http.Client client;
|
||||||
late HttpServer server;
|
late HttpServer server;
|
||||||
|
|
|
@ -3,10 +3,10 @@ import 'dart:convert';
|
||||||
import 'dart:io' show BytesBuilder;
|
import 'dart:io' show BytesBuilder;
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
Future<List<int>> getBody(MockHttpResponse rs) async {
|
Future<List<int>> getBody(MockHttpResponse rs) async {
|
||||||
|
@ -16,7 +16,7 @@ Future<List<int>> getBody(MockHttpResponse rs) async {
|
||||||
return bb.takeBytes();
|
return bb.takeBytes();
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
late Angel app;
|
late Angel app;
|
||||||
|
|
||||||
setUp(() {
|
setUp(() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:matcher/matcher.dart';
|
import 'package:matcher/matcher.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
test('named constructors', () {
|
test('named constructors', () {
|
||||||
expect(
|
expect(
|
||||||
AngelHttpException.badRequest(), isException(400, '400 Bad Request'));
|
AngelHttpException.badRequest(), isException(400, '400 Bad Request'));
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
final Uri ENDPOINT = Uri.parse('http://example.com');
|
final Uri ENDPOINT = Uri.parse('http://example.com');
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
test('single extension', () async {
|
test('single extension', () async {
|
||||||
var req = await makeRequest('foo.js');
|
var req = await makeRequest('foo.js');
|
||||||
expect(req.extension, '.js');
|
expect(req.extension, '.js');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
late Angel app;
|
late Angel app;
|
||||||
late http.Client client;
|
late http.Client client;
|
||||||
late HttpServer server;
|
late HttpServer server;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import 'dart:async';
|
||||||
import 'package:io/ansi.dart';
|
import 'package:io/ansi.dart';
|
||||||
import 'all.dart' as hm;
|
import 'all.dart' as hm;
|
||||||
|
|
||||||
main() async {
|
void main() async {
|
||||||
var zone = Zone.current.fork(
|
var zone = Zone.current.fork(
|
||||||
specification: ZoneSpecification(print: (self, parent, zone, line) {
|
specification: ZoneSpecification(print: (self, parent, zone, line) {
|
||||||
if (line == 'null') {
|
if (line == 'null') {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
Map headers = <String, String>{
|
Map headers = <String, String>{
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart' hide Header;
|
import 'package:angel3_framework/angel3_framework.dart' hide Header;
|
||||||
import 'package:angel_framework/http2.dart';
|
import 'package:angel3_framework/http2.dart';
|
||||||
import 'package:collection/collection.dart' show IterableExtension;
|
import 'package:collection/collection.dart' show IterableExtension;
|
||||||
import 'package:http/src/multipart_file.dart' as http;
|
import 'package:http/src/multipart_file.dart' as http;
|
||||||
import 'package:http/src/multipart_request.dart' as http;
|
import 'package:http/src/multipart_request.dart' as http;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:http_parser/http_parser.dart';
|
import 'package:http_parser/http_parser.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
test('preinjects functions', () async {
|
test('preinjects functions', () async {
|
||||||
var app = Angel(reflector: MirrorsReflector())
|
var app = Angel(reflector: MirrorsReflector())
|
||||||
..configuration['foo'] = 'bar'
|
..configuration['foo'] = 'bar'
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io' show stderr;
|
import 'dart:io' show stderr;
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
late Angel app;
|
late Angel app;
|
||||||
late AngelHttp http;
|
late AngelHttp http;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
MockHttpRequest mk(int id) {
|
MockHttpRequest mk(int id) {
|
||||||
return MockHttpRequest('GET', Uri.parse('/test/$id'))..close();
|
return MockHttpRequest('GET', Uri.parse('/test/$id'))..close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:http/io_client.dart' as http;
|
import 'package:http/io_client.dart' as http;
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:io/ansi.dart';
|
import 'package:io/ansi.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:http_parser/http_parser.dart';
|
import 'package:http_parser/http_parser.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
late Angel app;
|
late Angel app;
|
||||||
late http.Client client;
|
late http.Client client;
|
||||||
late HttpServer server;
|
late HttpServer server;
|
||||||
|
|
|
@ -2,18 +2,18 @@ import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:matcher/matcher.dart';
|
import 'package:matcher/matcher.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
final Uri $foo = Uri.parse('http://localhost:3000/foo');
|
final Uri $foo = Uri.parse('http://localhost:3000/foo');
|
||||||
|
|
||||||
/// Additional tests to improve coverage of server.dart
|
/// Additional tests to improve coverage of server.dart
|
||||||
main() {
|
void main() {
|
||||||
group('scoping', () {
|
group('scoping', () {
|
||||||
var parent = Angel(reflector: MirrorsReflector())..configuration['two'] = 2;
|
var parent = Angel(reflector: MirrorsReflector())..configuration['two'] = 2;
|
||||||
var child = Angel(reflector: MirrorsReflector());
|
var child = Angel(reflector: MirrorsReflector());
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:stack_trace/stack_trace.dart';
|
import 'package:stack_trace/stack_trace.dart';
|
||||||
|
@ -13,7 +13,7 @@ class Todo extends Model {
|
||||||
String? over;
|
String? over;
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
Map headers = <String, String>{
|
Map headers = <String, String>{
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
|
|
@ -3,11 +3,11 @@ import 'dart:convert';
|
||||||
import 'dart:io' show stderr;
|
import 'dart:io' show stderr;
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_container/mirrors.dart';
|
import 'package:angel3_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
test('default view generator', () async {
|
test('default view generator', () async {
|
||||||
var app = Angel();
|
var app = Angel();
|
||||||
var view = await app.viewGenerator!('foo', {'bar': 'baz'});
|
var view = await app.viewGenerator!('foo', {'bar': 'baz'});
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_merge_map)
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_merge_map)
|
||||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/merge_map)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/merge_map/LICENSE)
|
||||||
|
|
||||||
Combine multiple Maps into one. Equivalent to
|
Combine multiple Maps into one. Equivalent to
|
||||||
[Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
|
[Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_mock_request)
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_mock_request)
|
||||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/mock_request)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/mock_request/LICENSE)
|
||||||
|
|
||||||
Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc.
|
Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc.
|
||||||
This makes it possible to test server-side Dart applications without
|
This makes it possible to test server-side Dart applications without
|
||||||
having to ever bind to a port.
|
having to ever bind to a port.
|
||||||
|
|
||||||
This package was originally designed to testing
|
This package was originally designed to testing
|
||||||
[Angel](https://github.com/dukefirehawk/angel)
|
[Angel](https://github.com/dukefirehawk/angel/tree/angel3)
|
||||||
applications smoother, but works with any Dart-based server. :)
|
applications smoother, but works with any Dart-based server. :)
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_model)
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_model)
|
||||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/model)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/model/LICENSE)
|
||||||
|
|
||||||
Angel's basic data model class, no longer with the added weight of the whole framework.
|
Angel's basic data model class, no longer with the added weight of the whole framework.
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_pretty_logging)
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_pretty_logging)
|
||||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/pretty_logging)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/pretty_logging/LICENSE)
|
||||||
|
|
||||||
Standalone helper for colorful logging output, using pkg:io AnsiCode.
|
Standalone helper for colorful logging output, using pkg:io AnsiCode.
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_route)
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_route)
|
||||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/route)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/route/LICENSE)
|
||||||
|
|
||||||
|
|
||||||
A powerful, isomorphic routing library for Dart.
|
A powerful, isomorphic routing library for Dart.
|
||||||
|
|
Loading…
Reference in a new issue