Skip to content
This repository was archived by the owner on Mar 18, 2021. It is now read-only.

Commit 38fede8

Browse files
authored
3.0 release (#525)
* release pubspecs * update template and test pubspecs * path version * dartfmt * ci versions
1 parent 7b0f164 commit 38fede8

15 files changed

Lines changed: 56 additions & 51 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: dart
22
dart:
3-
- dev
3+
- stable
44
addons:
55
postgresql: "9.6"
66

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ environment:
1111
- TEST_DIR: aqueduct
1212

1313
install:
14-
- ps: wget https://storage.googleapis.com/dart-archive/channels/dev/release/latest/sdk/dartsdk-windows-x64-release.zip -OutFile dart-sdk.zip
14+
- ps: wget https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-windows-x64-release.zip -OutFile dart-sdk.zip
1515
- cmd: echo "Unzipping dart-sdk..."
1616
- cmd: 7z x dart-sdk.zip -o"C:\tools" -y > nul
1717
- set PATH=%PATH%;C:\tools\dart-sdk\bin

aqueduct/lib/src/application/service_registry.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import '../db/persistent_store/persistent_store.dart';
1818
/// when instantiated. If you are unsure whether an object has already been registered, you may re-register it -
1919
/// multiple registrations have no effect.
2020
class ServiceRegistry {
21-
static final ServiceRegistry defaultInstance =
22-
ServiceRegistry();
21+
static final ServiceRegistry defaultInstance = ServiceRegistry();
2322

2423
List<_ServiceRegistration> _registrations = [];
2524

aqueduct/lib/src/cli/commands/oai_client.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,22 @@ import 'package:aqueduct/src/cli/command.dart';
1111
class CLIDocumentClient extends CLICommand with CLIProject, CLIDocumentOptions {
1212
@override
1313
Future<int> handle() async {
14-
final doc = await documentProject(projectDirectory.uri, libraryName, projectSpecificationFile);
14+
final doc = await documentProject(
15+
projectDirectory.uri, libraryName, projectSpecificationFile);
1516
final source = _getHtmlSource(json.encode(doc));
1617
final file = File("client.html");
1718
file.writeAsStringSync(source);
1819

19-
displayInfo("OpenAPI client for application '${doc["info"]["title"]}' successfully created.", color: CLIColor.boldGreen);
20-
displayProgress("Configured to connect to '${doc["servers"].first["url"]}'.");
20+
displayInfo(
21+
"OpenAPI client for application '${doc["info"]["title"]}' successfully created.",
22+
color: CLIColor.boldGreen);
23+
displayProgress(
24+
"Configured to connect to '${doc["servers"].first["url"]}'.");
2125
displayProgress("Open '${file.absolute.path}' in your browser.");
2226

2327
return 0;
2428
}
2529

26-
2730
String _getHtmlSource(String spec) {
2831
return """
2932
<!DOCTYPE html>

aqueduct/lib/src/http/file_controller.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ class FileController extends Controller {
129129
///
130130
/// Note that the 'Last-Modified' header is always applied to a response served from this instance.
131131
///
132-
void addCachePolicy(
133-
CachePolicy policy, bool shouldApplyToPath(String path)) {
132+
void addCachePolicy(CachePolicy policy, bool shouldApplyToPath(String path)) {
134133
_policyPairs.add(_PolicyPair(policy, shouldApplyToPath));
135134
}
136135

aqueduct/lib/src/http/request.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ class Request implements RequestOrResponse {
307307

308308
Codec<dynamic, List<int>> codec;
309309
if (resp.encodeBody) {
310-
codec = CodecRegistry.defaultInstance
311-
.codecForContentType(resp.contentType);
310+
codec =
311+
CodecRegistry.defaultInstance.codecForContentType(resp.contentType);
312312
}
313313

314314
// todo(joeconwaystk): Set minimum threshold on number of bytes needed to perform gzip, do not gzip otherwise.
@@ -344,8 +344,8 @@ class Request implements RequestOrResponse {
344344
Response resp, _Reference<String> compressionType) {
345345
Codec<dynamic, List<int>> codec;
346346
if (resp.encodeBody) {
347-
codec = CodecRegistry.defaultInstance
348-
.codecForContentType(resp.contentType);
347+
codec =
348+
CodecRegistry.defaultInstance.codecForContentType(resp.contentType);
349349
}
350350

351351
var canGzip = CodecRegistry.defaultInstance

aqueduct/lib/src/http/resource_controller.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ abstract class ResourceController extends Controller
314314
.map((b) => b.boundValueType)
315315
.forEach((b) {
316316
final type = b.reflectedType;
317-
if (!context.schema.hasRegisteredType(type) && _shouldDocumentSerializable(type)) {
317+
if (!context.schema.hasRegisteredType(type) &&
318+
_shouldDocumentSerializable(type)) {
318319
context.schema.register(MirrorSystem.getName(b.simpleName),
319320
Serializable.document(context, type),
320321
representation: type);
@@ -325,9 +326,11 @@ abstract class ResourceController extends Controller
325326

326327
bool _shouldDocumentSerializable(Type type) {
327328
final hierarchy = classHierarchyForClass(reflectClass(type));
328-
final mostSpecificType = hierarchy.firstWhere((classMirror) => classMirror.staticMembers.containsKey(#shouldAutomaticallyDocument));
329+
final mostSpecificType = hierarchy.firstWhere((classMirror) =>
330+
classMirror.staticMembers.containsKey(#shouldAutomaticallyDocument));
329331

330-
return mostSpecificType.getField(#shouldAutomaticallyDocument).reflectee as bool;
332+
return mostSpecificType.getField(#shouldAutomaticallyDocument).reflectee
333+
as bool;
331334
}
332335

333336
/// Adds [methodScopes] to [operationScopes] if they do not exist.

aqueduct/lib/src/http/resource_controller_internal/bindings.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ class BoundBody extends BoundInput {
198198
}
199199

200200
if (intoType.isSubtypeOf(reflectType(Serializable))) {
201-
final value = intoType.newInstance(const Symbol(""), []).reflectee
202-
as Serializable;
201+
final value =
202+
intoType.newInstance(const Symbol(""), []).reflectee as Serializable;
203203
value.readFromMap(request.body.as());
204204

205205
return value;
@@ -211,8 +211,8 @@ class BoundBody extends BoundInput {
211211

212212
final typeArg = intoType.typeArguments.first as ClassMirror;
213213
return bodyList.map((object) {
214-
final value = typeArg.newInstance(const Symbol(""), []).reflectee
215-
as Serializable;
214+
final value =
215+
typeArg.newInstance(const Symbol(""), []).reflectee as Serializable;
216216
value.readFromMap(object);
217217

218218
return value;

aqueduct/lib/src/openapi/documentable.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ class APIComponentCollection<T extends APIObject> {
295295
return;
296296
}
297297

298-
if (representation != null && _typeReferenceMap.containsKey(representation)) {
298+
if (representation != null &&
299+
_typeReferenceMap.containsKey(representation)) {
299300
return;
300301
}
301302

aqueduct/pubspec.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
name: aqueduct
2-
version: 3.0.0-beta.2
2+
version: 3.0.0
33
description: A modern HTTP server application framework, ORM and OAuth2 provider with OpenAPI 3.0 integration. Foundation for REST, RPC or GraphQL services.
44
author: stable|kernel <http://stablekernel.com>
55
homepage: https://aqueduct.io
66
documentation:
77

88
environment:
9-
sdk: ">=2.0.0-dev <3.0.0"
9+
sdk: ">=2.0.0 <3.0.0"
1010

1111
dependencies:
1212
analyzer: '>=0.32.0 <0.33.0'
13-
args: ^1.4.0
14-
crypto: ^2.0.0
13+
args: ^1.5.0
14+
crypto: ^2.0.6
1515
logging: ^0.11.3
16-
isolate_executor: ^2.0.0-dev.2
16+
isolate_executor: ^2.0.0
1717
meta: ^1.1.5
18-
open_api: ^2.0.0-beta.4
19-
password_hash: ^2.0.0-beta
20-
path: ^1.4.1
21-
postgres: ^1.0.0-beta.1
18+
open_api: ^2.0.0
19+
password_hash: ^2.0.0
20+
path: ^1.6.1
21+
postgres: ^1.0.0
2222
pub_cache: '>=0.2.0 <0.3.0'
23-
pub_semver: ^1.0.0
24-
safe_config: ^2.0.0-beta.1
25-
yaml: ^2.1.9
23+
pub_semver: ^1.4.0
24+
safe_config: ^2.0.0
25+
yaml: ^2.1.15
2626

2727
dev_dependencies:
28-
matcher: ^0.12.0+2
29-
test: ^1.0.0
28+
matcher: ^0.12.3
29+
test: ^1.3.0
3030
http: ^0.11.3+7
3131
aqueduct_test:
3232
path: ../aqueduct_test

0 commit comments

Comments
 (0)