Publish angel3_framework

This commit is contained in:
thomashii 2021-05-14 18:34:09 +08:00
parent 4d021e9f95
commit f713c1f001
74 changed files with 211 additions and 239 deletions

View file

@ -1,6 +1,6 @@
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
of this software and associated documentation files (the "Software"), to deal

View file

@ -1,9 +1,11 @@
[![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)
[![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)
![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.**

View file

@ -2,7 +2,7 @@
[![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)
[![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.

View file

@ -2,7 +2,7 @@
[![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)
[![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.

View file

@ -2,7 +2,7 @@
[![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)
[![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.

View file

@ -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)
[![build status](https://travis-ci.org/angel-dart/framework.svg)](https://travis-ci.org/angel-dart/framework)
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/framework/LICENSE)
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).
```dart
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
main() async {
var app = Angel(reflector: MirrorsReflector());

View file

@ -1,9 +1,9 @@
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:logging/logging.dart';
main() async {
void main() async {
// Logging set up/boilerplate
Logger.root.onRecord.listen(print);

View file

@ -1,11 +1,11 @@
import 'dart:async';
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:logging/logging.dart';
main() async {
void main() async {
var app = Angel(reflector: MirrorsReflector())
..logger = (Logger('angel')
..onRecord.listen((rec) {

View file

@ -1,6 +1,6 @@
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:logging/logging.dart';
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.)');
}
main() async {
void main() async {
// Logging set up/boilerplate
hierarchicalLoggingEnabled = true;
//Logger.root.onRecord.listen(prettyLog);

View file

@ -1,11 +1,11 @@
import 'dart:io';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel_framework/http2.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_framework/http2.dart';
import 'package:file/local.dart';
import 'package:logging/logging.dart';
main() async {
void main() async {
var app = Angel();
app.logger = Logger('angel')
..onRecord.listen((rec) {

View file

@ -1,11 +1,11 @@
import 'dart:io';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel_framework/http2.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_framework/http2.dart';
import 'package:logging/logging.dart';
import 'common.dart';
main() async {
void main() async {
var app = Angel()
..encoders.addAll({
'gzip': gzip.encoder,

View file

@ -1,11 +1,11 @@
import 'dart:io';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel_framework/http2.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_framework/http2.dart';
import 'package:file/local.dart';
import 'package:logging/logging.dart';
main() async {
void main() async {
var app = Angel();
app.logger = Logger('angel')
..onRecord.listen((rec) {

View file

@ -1,10 +1,10 @@
import 'dart:async';
import 'dart:io';
import 'dart:isolate';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
main() async {
void main() async {
int x = 0;
var c = Completer();
var exit = ReceivePort();

View file

@ -1,11 +1,11 @@
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:logging/logging.dart';
main() async {
void main() async {
// Logging set up/boilerplate
//Logger.root.onRecord.listen(prettyLog);

View file

@ -1,9 +1,9 @@
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:logging/logging.dart';
main() async {
void main() async {
// Logging set up/boilerplate
Logger.root.onRecord.listen(print);

View file

@ -1,7 +1,7 @@
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
main() async {
void main() async {
var app = Angel();
var http = AngelHttp(app);

View file

@ -1,10 +1,10 @@
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
main() async {
void main() async {
var app = Angel(reflector: MirrorsReflector());
app.viewGenerator = (name, [data]) async =>

View 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';

View file

@ -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';

View file

@ -1,8 +1,8 @@
library angel_framework.http.controller;
import 'dart:async';
import 'package:angel_container/angel_container.dart';
import 'package:angel_route/angel_route.dart';
import 'package:angel3_container/angel3_container.dart';
import 'package:angel3_route/angel3_route.dart';
import 'package:meta/meta.dart';
import 'package:recase/recase.dart';
import '../core/core.dart';

View file

@ -1,9 +1,9 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io' show stderr, Cookie;
import 'package:angel_http_exception/angel_http_exception.dart';
import 'package:angel_route/angel_route.dart';
import 'package:combinator/combinator.dart';
import 'package:angel3_http_exception/angel3_http_exception.dart';
import 'package:angel3_route/angel3_route.dart';
import 'package:angel3_combinator/angel3_combinator.dart';
import 'package:logging/logging.dart';
import 'package:stack_trace/stack_trace.dart';
import 'package:tuple/tuple.dart';

View file

@ -1,6 +1,6 @@
import 'dart:async';
import 'package:angel_container/angel_container.dart';
import 'package:angel_route/angel_route.dart';
import 'package:angel3_container/angel3_container.dart';
import 'package:angel3_route/angel3_route.dart';
import 'package:logging/logging.dart';
import 'env.dart';
import 'hostname_parser.dart';

View file

@ -1,6 +1,6 @@
import 'dart:async';
import 'package:angel_http_exception/angel_http_exception.dart';
import 'package:angel3_http_exception/angel3_http_exception.dart';
import 'service.dart';

View file

@ -1,6 +1,6 @@
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 'request_context.dart';

View file

@ -11,7 +11,7 @@ import 'dart:io'
HttpSession,
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_server/http_server.dart';
import 'package:meta/meta.dart';

View file

@ -6,7 +6,7 @@ import 'dart:convert' as c show json;
import 'dart:io' show BytesBuilder, Cookie;
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:http_parser/http_parser.dart';
import 'package:logging/logging.dart';

View file

@ -2,8 +2,8 @@ library angel_framework.http.routable;
import 'dart:async';
import 'package:angel_container/angel_container.dart';
import 'package:angel_route/angel_route.dart';
import 'package:angel3_container/angel3_container.dart';
import 'package:angel3_route/angel3_route.dart';
import '../util.dart';
import 'hooked_service.dart';

View file

@ -3,10 +3,10 @@ library angel_framework.http.server;
import 'dart:async';
import 'dart:collection' show HashMap;
import 'dart:convert';
import 'package:angel_container/angel_container.dart';
import 'package:angel_http_exception/angel_http_exception.dart';
import 'package:angel_route/angel_route.dart';
import 'package:combinator/combinator.dart';
import 'package:angel3_container/angel3_container.dart';
import 'package:angel3_http_exception/angel3_http_exception.dart';
import 'package:angel3_route/angel3_route.dart';
import 'package:angel3_combinator/angel3_combinator.dart';
import 'package:http_parser/http_parser.dart';
import 'package:logging/logging.dart';
import 'package:mime/mime.dart';

View file

@ -1,8 +1,8 @@
library angel_framework.http.service;
import 'dart:async';
import 'package:angel_http_exception/angel_http_exception.dart';
import 'package:merge_map/merge_map.dart';
import 'package:angel3_http_exception/angel3_http_exception.dart';
import 'package:angel3_merge_map/angel3_merge_map.dart';
import 'package:quiver/core.dart';
import '../util.dart';
import 'anonymous_service.dart';

View file

@ -8,7 +8,7 @@ import 'dart:io'
HttpServer,
Platform,
SecurityContext;
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import '../core/core.dart';
import 'http_request_context.dart';
import 'http_response_context.dart';

View file

@ -1,7 +1,7 @@
import 'dart:async';
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 '../core/core.dart';

View file

@ -1,10 +1,10 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:angel_framework/angel_framework.dart' hide Header;
import 'package:angel_framework/http.dart';
import 'package:angel3_framework/angel3_framework.dart' hide Header;
import 'package:angel3_framework/http.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_response_context.dart';
import 'package:uuid/uuid.dart';

View file

@ -1,11 +1,11 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:angel_container/src/container.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_container/src/container.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:collection/collection.dart' show IterableExtension;
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';
final RegExp _comma = RegExp(r',\s*');

View file

@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:convert';
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 'http2_request_context.dart';

View file

@ -1,4 +1,4 @@
import 'package:angel_container/angel_container.dart';
import 'package:angel3_container/angel3_container.dart';
final RegExp straySlashes = RegExp(r'(^/+)|(/+$)');

View file

@ -1,10 +1,10 @@
/// A basic server that prints "Hello, world!"
library performance.hello;
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
main() async {
void main() async {
var app = Angel();
var http = AngelHttp.custom(app, startShared, useZone: false);

View file

@ -1,59 +1,28 @@
name: angel_framework
name: angel3_framework
version: 4.0.0
description: A high-powered HTTP server with dependency injection, routing and much more.
homepage: https://github.com/dukefirehawk/angel
publish_to: none
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/framework
environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
angel_container:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/container/angel_container
angel_http_exception:
git:
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
angel3_container: ^3.0.0
angel3_http_exception: ^3.0.0
angel3_model: ^3.0.0
angel3_route: ^5.0.0
angel3_combinator: ^2.0.0
angel3_merge_map: ^2.0.0
angel3_mock_request: ^2.0.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
http_parser: ^4.0.0
http_server: ^1.0.0
http2: ^2.0.0
logging: ^1.0.0
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
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
quiver: ^3.0.0
quiver: ^3.0.1
recase: ^4.0.0
stack_trace: ^1.10.0
string_scanner: ^1.1.0
@ -63,5 +32,5 @@ dependencies:
dev_dependencies:
http: ^0.13.1
io: ^1.0.0
test: ^1.17.3
test: ^1.17.4

View file

@ -1,6 +1,6 @@
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:charcode/ascii.dart';
import 'package:http/io_client.dart' as http;
import 'package:logging/logging.dart';

View file

@ -1,14 +1,14 @@
import 'dart:async';
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:mock_request/mock_request.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_mock_request/angel3_mock_request.dart';
import 'package:test/test.dart';
final Uri ENDPOINT = Uri.parse('http://example.com/accept');
main() {
void main() {
test('no content type', () async {
var req = await acceptContentTypes();
expect(req.acceptsAll, isFalse);

View file

@ -30,7 +30,7 @@ import 'view_generator_test.dart' as view_generator;
import 'package:test/test.dart';
/// For running with coverage
main() {
void main() {
print(cyan.wrap('Running tests on ${Platform.version}'));
group('404_hole', hole404.main);
group('accepts', accepts.main);

View file

@ -1,4 +1,4 @@
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:test/test.dart';
main() {

View file

@ -1,9 +1,9 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:mock_request/mock_request.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_mock_request/angel3_mock_request.dart';
import 'package:test/test.dart';
void main() {

View file

@ -1,6 +1,6 @@
library angel_framework.test.common;
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:matcher/matcher.dart';
class Todo extends Model {

View file

@ -2,11 +2,11 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
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 'common.dart';

View file

@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:mock_request/mock_request.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_mock_request/angel3_mock_request.dart';
import 'package:test/test.dart';
void main() {

View file

@ -1,12 +1,12 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:angel_container/angel_container.dart';
import 'package:angel_framework/http.dart';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_container/angel3_container.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
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 'common.dart';
@ -14,7 +14,7 @@ import 'common.dart';
final String TEXT = "make your bed";
final String OVER = "never";
main() {
void main() {
late Angel app;
late http.Client client;
late HttpServer server;

View file

@ -3,10 +3,10 @@ import 'dart:convert';
import 'dart:io' show BytesBuilder;
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:mock_request/mock_request.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_mock_request/angel3_mock_request.dart';
import 'package:test/test.dart';
Future<List<int>> getBody(MockHttpResponse rs) async {
@ -16,7 +16,7 @@ Future<List<int>> getBody(MockHttpResponse rs) async {
return bb.takeBytes();
}
main() {
void main() {
late Angel app;
setUp(() {

View file

@ -1,5 +1,5 @@
import 'dart:io';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:test/test.dart';
void main() {

View file

@ -1,9 +1,9 @@
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'dart:convert';
import 'package:matcher/matcher.dart';
import 'package:test/test.dart';
main() {
void main() {
test('named constructors', () {
expect(
AngelHttpException.badRequest(), isException(400, '400 Bad Request'));

View file

@ -1,13 +1,13 @@
import 'dart:async';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:mock_request/mock_request.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_mock_request/angel3_mock_request.dart';
import 'package:test/test.dart';
final Uri ENDPOINT = Uri.parse('http://example.com');
main() {
void main() {
test('single extension', () async {
var req = await makeRequest('foo.js');
expect(req.extension, '.js');

View file

@ -1,4 +1,4 @@
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:test/test.dart';
import 'common.dart';

View file

@ -1,12 +1,12 @@
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:test/test.dart';
main() {
void main() {
late Angel app;
late http.Client client;
late HttpServer server;

View file

@ -2,7 +2,7 @@ import 'dart:async';
import 'package:io/ansi.dart';
import 'all.dart' as hm;
main() async {
void main() async {
var zone = Zone.current.fork(
specification: ZoneSpecification(print: (self, parent, zone, line) {
if (line == 'null') {

View file

@ -1,13 +1,13 @@
import 'dart:convert';
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:http/http.dart' as http;
import 'package:test/test.dart';
import 'common.dart';
main() {
void main() {
Map headers = <String, String>{
'Accept': 'application/json',
'Content-Type': 'application/json'

View file

@ -1,9 +1,9 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart' hide Header;
import 'package:angel_framework/http2.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart' hide Header;
import 'package:angel3_framework/http2.dart';
import 'package:collection/collection.dart' show IterableExtension;
import 'package:http/src/multipart_file.dart' as http;
import 'package:http/src/multipart_request.dart' as http;

View file

@ -1,9 +1,9 @@
import 'dart:async';
import 'dart:convert';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.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';
void main() {

View file

@ -1,10 +1,10 @@
import 'dart:async';
import 'dart:convert';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:mock_request/mock_request.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_mock_request/angel3_mock_request.dart';
import 'package:test/test.dart';

View file

@ -1,4 +1,4 @@
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:test/test.dart';
void main() {

View file

@ -1,13 +1,13 @@
import 'dart:convert';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:mock_request/mock_request.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_mock_request/angel3_mock_request.dart';
import 'package:test/test.dart';
main() {
void main() {
test('preinjects functions', () async {
var app = Angel(reflector: MirrorsReflector())
..configuration['foo'] = 'bar'

View file

@ -1,14 +1,14 @@
import 'dart:convert';
import 'dart:io' show stderr;
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:mock_request/mock_request.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_mock_request/angel3_mock_request.dart';
import 'package:test/test.dart';
main() {
void main() {
late Angel app;
late AngelHttp http;

View file

@ -1,13 +1,13 @@
import 'dart:async';
import 'dart:convert';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:mock_request/mock_request.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:angel3_mock_request/angel3_mock_request.dart';
import 'package:test/test.dart';
main() {
void main() {
MockHttpRequest mk(int id) {
return MockHttpRequest('GET', Uri.parse('/test/$id'))..close();
}

View file

@ -1,6 +1,6 @@
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:http/io_client.dart' as http;
import 'package:logging/logging.dart';
import 'package:test/test.dart';

View file

@ -1,9 +1,9 @@
import 'dart:convert';
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:http/http.dart' as http;
import 'package:io/ansi.dart';
import 'package:logging/logging.dart';

View file

@ -1,13 +1,13 @@
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'package:http/http.dart' as http;
import 'package:http_parser/http_parser.dart';
import 'package:test/test.dart';
main() {
void main() {
late Angel app;
late http.Client client;
late HttpServer server;

View file

@ -2,18 +2,18 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.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';
final Uri $foo = Uri.parse('http://localhost:3000/foo');
/// Additional tests to improve coverage of server.dart
main() {
void main() {
group('scoping', () {
var parent = Angel(reflector: MirrorsReflector())..configuration['two'] = 2;
var child = Angel(reflector: MirrorsReflector());

View file

@ -1,4 +1,4 @@
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:test/test.dart';
void main() {

View file

@ -1,8 +1,8 @@
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:stack_trace/stack_trace.dart';
@ -13,7 +13,7 @@ class Todo extends Model {
String? over;
}
main() {
void main() {
Map headers = <String, String>{
'Accept': 'application/json',
'Content-Type': 'application/json'

View file

@ -3,11 +3,11 @@ import 'dart:convert';
import 'dart:io' show stderr;
import 'dart:io';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.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';

View file

@ -1,7 +1,7 @@
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:test/test.dart';
main() {
void main() {
test('default view generator', () async {
var app = Angel();
var view = await app.viewGenerator!('foo', {'bar': 'baz'});

View file

@ -2,7 +2,7 @@
[![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)
[![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
[Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)

View file

@ -2,14 +2,14 @@
[![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)
[![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.
This makes it possible to test server-side Dart applications without
having to ever bind to a port.
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. :)
# Usage

View file

@ -2,7 +2,7 @@
[![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)
[![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.

View file

@ -2,7 +2,7 @@
[![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)
[![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.

View file

@ -2,7 +2,7 @@
[![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)
[![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.