Updated package client

This commit is contained in:
thomashii 2021-03-08 00:02:53 +08:00
parent 0752498a16
commit e1302d6a6a
7 changed files with 128 additions and 46 deletions

View file

@ -8,13 +8,16 @@
* Upgrade angel_framework to 3.0.0
* Upgrade angel_auth to 3.0.0
* Upgrade angel_configuration to 3.0.0
* Upgrade angel_jael to 3.0.0
* Upgrade jael to 3.0.0 (todo)
* Upgrade jael_preprocessor to 3.0.0 (todo)
* Upgrade test to 3.0.0 (todo)
* Upgrade jael to 3.0.0
* Upgrade jael_preprocessor to 3.0.0
* Upgrade validate to 3.0.0
* Upgrade json_god to 3.0.0
* Upgrade angel_client 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
* Changed Dart SDK requirements for all packages to ">=2.10.0 <2.12.0"

View file

@ -87,8 +87,8 @@ abstract class Angel extends http.BaseClient {
Service<Id, Data> service<Id, Data>(String path,
{@deprecated Type type, AngelDeserializer<Data> deserializer});
@override
Future<http.Response> delete(url, {Map<String, String> headers});
//@override
//Future<http.Response> delete(url, {Map<String, String> headers});
@override
Future<http.Response> get(url, {Map<String, String> headers});

View file

@ -174,10 +174,10 @@ abstract class BaseAngelClient extends Angel {
return u.replace(path: p.join(baseUrl.path, u.path));
}
@override
Future<http.Response> delete(url, {Map<String, String> headers}) async {
return sendUnstreamed('DELETE', _join(url), headers);
}
//@override
//Future<http.Response> delete(url, {Map<String, String> headers}) async {
// return sendUnstreamed('DELETE', _join(url), headers);
//}
@override
Future<http.Response> get(url, {Map<String, String> headers}) async {

View file

@ -3,48 +3,39 @@ version: 3.0.0
description: Support for querying Angel servers in the browser, Flutter, and command-line.
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_client
publish_to: none
environment:
sdk: ">=2.10.0 <3.0.0"
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
http: ^0.12.0
json_god: ^2.0.0-beta
http: ^0.13.0
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
meta: ^1.0.0
path: ^1.0.0
dev_dependencies:
angel_framework: ^2.3.0
angel_model: ^1.3.0
angel_framework:
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
build_runner: ^1.0.0
build_web_compilers: ^2.12.2
mock_request: ^1.0.0
pedantic: ^1.0.0
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

View file

@ -1,14 +1,14 @@
import 'package:angel_client/angel_client.dart';
import 'dart:convert';
import 'package:test/test.dart';
import 'common.dart';
main() {
var app = new MockAngel();
Service todoService = app.service('api/todos');
void main() {
var app = MockAngel();
var todoService = app.service('api/todos');
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.path, '/post');
expect(app.client.spec.headers['method'], 'post');

84
packages/json_god/.gitignore vendored Normal file
View 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

View file

@ -0,0 +1,4 @@
language: dart
dart:
- dev
- stable