Updated package client
This commit is contained in:
parent
0752498a16
commit
e1302d6a6a
7 changed files with 128 additions and 46 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -8,13 +8,16 @@
|
||||||
* Upgrade angel_framework to 3.0.0
|
* Upgrade angel_framework to 3.0.0
|
||||||
* Upgrade angel_auth to 3.0.0
|
* Upgrade angel_auth to 3.0.0
|
||||||
* Upgrade angel_configuration to 3.0.0
|
* Upgrade angel_configuration to 3.0.0
|
||||||
* Upgrade angel_jael to 3.0.0
|
* Upgrade jael to 3.0.0
|
||||||
* Upgrade jael to 3.0.0 (todo)
|
* Upgrade jael_preprocessor to 3.0.0
|
||||||
* Upgrade jael_preprocessor to 3.0.0 (todo)
|
* Upgrade validate to 3.0.0
|
||||||
* Upgrade test to 3.0.0 (todo)
|
* Upgrade json_god to 3.0.0
|
||||||
|
|
||||||
* Upgrade angel_client to 3.0.0 (todo)
|
* Upgrade angel_client to 3.0.0 (todo)
|
||||||
* Upgrade angel_websocket to 3.0.0 (todo)
|
* Upgrade angel_websocket to 3.0.0 (todo)
|
||||||
|
* Upgrade test to 3.0.0 (todo)
|
||||||
|
* Upgrade angel_jael to 3.0.0 (todo)
|
||||||
|
|
||||||
|
|
||||||
# 2.2.0
|
# 2.2.0
|
||||||
* Changed Dart SDK requirements for all packages to ">=2.10.0 <2.12.0"
|
* Changed Dart SDK requirements for all packages to ">=2.10.0 <2.12.0"
|
||||||
|
|
|
@ -87,8 +87,8 @@ abstract class Angel extends http.BaseClient {
|
||||||
Service<Id, Data> service<Id, Data>(String path,
|
Service<Id, Data> service<Id, Data>(String path,
|
||||||
{@deprecated Type type, AngelDeserializer<Data> deserializer});
|
{@deprecated Type type, AngelDeserializer<Data> deserializer});
|
||||||
|
|
||||||
@override
|
//@override
|
||||||
Future<http.Response> delete(url, {Map<String, String> headers});
|
//Future<http.Response> delete(url, {Map<String, String> headers});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<http.Response> get(url, {Map<String, String> headers});
|
Future<http.Response> get(url, {Map<String, String> headers});
|
||||||
|
|
|
@ -174,10 +174,10 @@ abstract class BaseAngelClient extends Angel {
|
||||||
return u.replace(path: p.join(baseUrl.path, u.path));
|
return u.replace(path: p.join(baseUrl.path, u.path));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
//@override
|
||||||
Future<http.Response> delete(url, {Map<String, String> headers}) async {
|
//Future<http.Response> delete(url, {Map<String, String> headers}) async {
|
||||||
return sendUnstreamed('DELETE', _join(url), headers);
|
// return sendUnstreamed('DELETE', _join(url), headers);
|
||||||
}
|
//}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<http.Response> get(url, {Map<String, String> headers}) async {
|
Future<http.Response> get(url, {Map<String, String> headers}) async {
|
||||||
|
|
|
@ -3,48 +3,39 @@ version: 3.0.0
|
||||||
description: Support for querying Angel servers in the browser, Flutter, and command-line.
|
description: Support for querying Angel servers in the browser, Flutter, and command-line.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
homepage: https://github.com/angel-dart/angel_client
|
homepage: https://github.com/angel-dart/angel_client
|
||||||
|
publish_to: none
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.10.0 <3.0.0"
|
sdk: ">=2.10.0 <3.0.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
angel_http_exception: ^1.3.0
|
angel_http_exception:
|
||||||
|
git:
|
||||||
|
url: https://github.com/dukefirehawk/angel.git
|
||||||
|
ref: sdk-2.12.x
|
||||||
|
path: packages/http_exception
|
||||||
collection: ^1.0.0
|
collection: ^1.0.0
|
||||||
http: ^0.12.0
|
http: ^0.13.0
|
||||||
json_god: ^2.0.0-beta
|
json_god:
|
||||||
|
git:
|
||||||
|
url: https://github.com/dukefirehawk/angel.git
|
||||||
|
ref: sdk-2.12.x
|
||||||
|
path: packages/json_god
|
||||||
#dart_json_mapper: ^1.7.0
|
#dart_json_mapper: ^1.7.0
|
||||||
meta: ^1.0.0
|
meta: ^1.0.0
|
||||||
path: ^1.0.0
|
path: ^1.0.0
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
angel_framework: ^2.3.0
|
angel_framework:
|
||||||
angel_model: ^1.3.0
|
git:
|
||||||
|
url: https://github.com/dukefirehawk/angel.git
|
||||||
|
ref: sdk-2.12.x
|
||||||
|
path: packages/framework
|
||||||
|
angel_model:
|
||||||
|
git:
|
||||||
|
url: https://github.com/dukefirehawk/angel.git
|
||||||
|
ref: sdk-2.12.x
|
||||||
|
path: packages/model
|
||||||
async: ^2.0.0
|
async: ^2.0.0
|
||||||
build_runner: ^1.0.0
|
build_runner: ^1.0.0
|
||||||
build_web_compilers: ^2.12.2
|
build_web_compilers: ^2.12.2
|
||||||
mock_request: ^1.0.0
|
mock_request: ^1.0.0
|
||||||
pedantic: ^1.0.0
|
pedantic: ^1.0.0
|
||||||
test: ^1.15.7
|
test: ^1.15.7
|
||||||
dependency_overrides:
|
|
||||||
angel_framework:
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x
|
|
||||||
path: packages/framework
|
|
||||||
angel_http_exception:
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x
|
|
||||||
path: packages/http_exception
|
|
||||||
angel_container:
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x
|
|
||||||
path: packages/container/angel_container
|
|
||||||
angel_model:
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x
|
|
||||||
path: packages/model
|
|
||||||
angel_route:
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x
|
|
||||||
path: packages/route
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import 'package:angel_client/angel_client.dart';
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
var app = new MockAngel();
|
var app = MockAngel();
|
||||||
Service todoService = app.service('api/todos');
|
var todoService = app.service('api/todos');
|
||||||
|
|
||||||
test('sets method,body,headers,path', () async {
|
test('sets method,body,headers,path', () async {
|
||||||
await app.post('/post', headers: {'method': 'post'}, body: 'post');
|
await app.post(Uri.parse('/post'),
|
||||||
|
headers: {'method': 'post'}, body: 'post');
|
||||||
expect(app.client.spec.method, 'POST');
|
expect(app.client.spec.method, 'POST');
|
||||||
expect(app.client.spec.path, '/post');
|
expect(app.client.spec.path, '/post');
|
||||||
expect(app.client.spec.headers['method'], 'post');
|
expect(app.client.spec.headers['method'], 'post');
|
||||||
|
|
84
packages/json_god/.gitignore
vendored
Normal file
84
packages/json_god/.gitignore
vendored
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
# See https://www.dartlang.org/tools/private-files.html
|
||||||
|
.idea
|
||||||
|
**/bower_components/
|
||||||
|
|
||||||
|
# Files and directories created by pub
|
||||||
|
.buildlog
|
||||||
|
.packages
|
||||||
|
.project
|
||||||
|
.pub/
|
||||||
|
build/
|
||||||
|
**/packages/
|
||||||
|
|
||||||
|
# Files created by dart2js
|
||||||
|
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||||
|
# rules if you intend to use dart2js directly
|
||||||
|
# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
|
||||||
|
# differentiate from explicit Javascript files)
|
||||||
|
# *.dart.js
|
||||||
|
*.part.js
|
||||||
|
*.js.deps
|
||||||
|
# *.js.map
|
||||||
|
*.info.json
|
||||||
|
|
||||||
|
# Directory created by dartdoc
|
||||||
|
doc/
|
||||||
|
|
||||||
|
# Don't commit pubspec lock file
|
||||||
|
# (Library packages only! Remove pattern if developing an application package)
|
||||||
|
pubspec.lock
|
||||||
|
### Dart template
|
||||||
|
# See https://www.dartlang.org/tools/private-files.html
|
||||||
|
|
||||||
|
# Files and directories created by pub
|
||||||
|
|
||||||
|
# Files created by dart2js
|
||||||
|
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||||
|
# rules if you intend to use dart2js directly
|
||||||
|
# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
|
||||||
|
# differentiate from explicit Javascript files)
|
||||||
|
*.dart.js
|
||||||
|
# Directory created by dartdoc
|
||||||
|
# Don't commit pubspec lock file
|
||||||
|
# (Library packages only! Remove pattern if developing an application package)
|
||||||
|
### JetBrains template
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff:
|
||||||
|
.idea/tasks.xml
|
||||||
|
.idea/dictionaries
|
||||||
|
.idea/jsLibraryMappings.xml
|
||||||
|
|
||||||
|
# Sensitive or high-churn files:
|
||||||
|
.idea/dataSources.ids
|
||||||
|
.idea/dataSources.xml
|
||||||
|
.idea/dataSources.local.xml
|
||||||
|
.idea/sqlDataSources.xml
|
||||||
|
.idea/dynamic.xml
|
||||||
|
.idea/uiDesigner.xml
|
||||||
|
|
||||||
|
# Gradle:
|
||||||
|
.idea/gradle.xml
|
||||||
|
# Mongo Explorer plugin:
|
||||||
|
.idea/mongoSettings.xml
|
||||||
|
|
||||||
|
## File-based project format:
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
## Plugin-specific files:
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
/out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
4
packages/json_god/.travis.yml
Normal file
4
packages/json_god/.travis.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
language: dart
|
||||||
|
dart:
|
||||||
|
- dev
|
||||||
|
- stable
|
Loading…
Reference in a new issue