Fixed linter warnings
This commit is contained in:
parent
529d2d20ad
commit
bfc94d94eb
16 changed files with 70 additions and 35 deletions
|
@ -1,5 +1,9 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 7.0.1
|
||||||
|
|
||||||
|
* Fixed linter warnings
|
||||||
|
|
||||||
## 7.0.0
|
## 7.0.0
|
||||||
|
|
||||||
* Require Dart >= 2.17
|
* Require Dart >= 2.17
|
||||||
|
|
|
@ -25,7 +25,7 @@ RequestHandler forceBasicAuth<User>({String? realm}) {
|
||||||
RequestHandler requireAuthentication<User>() {
|
RequestHandler requireAuthentication<User>() {
|
||||||
return (RequestContext req, ResponseContext res,
|
return (RequestContext req, ResponseContext res,
|
||||||
{bool throwError = true}) async {
|
{bool throwError = true}) async {
|
||||||
bool _reject(ResponseContext res) {
|
bool reject(ResponseContext res) {
|
||||||
if (throwError) {
|
if (throwError) {
|
||||||
res.statusCode = 403;
|
res.statusCode = 403;
|
||||||
throw AngelHttpException.forbidden();
|
throw AngelHttpException.forbidden();
|
||||||
|
@ -42,10 +42,10 @@ RequestHandler requireAuthentication<User>() {
|
||||||
await reqContainer.makeAsync<User>();
|
await reqContainer.makeAsync<User>();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return _reject(res);
|
return reject(res);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return _reject(res);
|
return reject(res);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: angel3_auth
|
name: angel3_auth
|
||||||
description: A complete authentication plugin for Angel3. Includes support for stateless JWT tokens, Basic Auth, and more.
|
description: A complete authentication plugin for Angel3. Includes support for stateless JWT tokens, Basic Auth, and more.
|
||||||
version: 7.0.0
|
version: 7.0.1
|
||||||
homepage: https://angel3-framework.web.app/
|
homepage: https://angel3-framework.web.app/
|
||||||
repository: https://github.com/dukefirehawk/angel/tree/master/packages/auth
|
repository: https://github.com/dukefirehawk/angel/tree/master/packages/auth
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 7.0.1
|
||||||
|
|
||||||
|
* Updated example
|
||||||
|
|
||||||
## 7.0.0
|
## 7.0.0
|
||||||
|
|
||||||
* Require Dart >= 2.17
|
* Require Dart >= 2.17
|
||||||
|
|
|
@ -113,12 +113,9 @@ void main() async {
|
||||||
}
|
}
|
||||||
|
|
||||||
class User extends Model {
|
class User extends Model {
|
||||||
@override
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
int? githubId;
|
int? githubId;
|
||||||
|
|
||||||
User({this.id, this.githubId});
|
User({super.id, this.githubId});
|
||||||
|
|
||||||
static User parse(Map<String, dynamic> map) =>
|
static User parse(Map<String, dynamic> map) =>
|
||||||
User(id: map['id'] as String?, githubId: map['github_id'] as int?);
|
User(id: map['id'] as String?, githubId: map['github_id'] as int?);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel3_auth_oauth2
|
name: angel3_auth_oauth2
|
||||||
version: 7.0.0
|
version: 7.0.1
|
||||||
description: Angel3 library for authenticating users with external identity providers via OAuth2.
|
description: Angel3 library for authenticating users with external identity providers via OAuth2.
|
||||||
homepage: https://angel3-framework.web.app/
|
homepage: https://angel3-framework.web.app/
|
||||||
repository: https://github.com/dukefirehawk/angel/tree/master/packages/auth_oauth2
|
repository: https://github.com/dukefirehawk/angel/tree/master/packages/auth_oauth2
|
||||||
|
|
38
packages/jael/jael_web/CHANGELOG.md
Normal file
38
packages/jael/jael_web/CHANGELOG.md
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Change Log
|
||||||
|
|
||||||
|
## 7.0.1
|
||||||
|
|
||||||
|
* Upgraded dependencies
|
||||||
|
* Fixed deprecation
|
||||||
|
|
||||||
|
## 7.0.0
|
||||||
|
|
||||||
|
* Require Dart >= 2.17
|
||||||
|
|
||||||
|
## 6.0.1
|
||||||
|
|
||||||
|
* Skipped release
|
||||||
|
|
||||||
|
## 6.0.0
|
||||||
|
|
||||||
|
* Skipped release
|
||||||
|
|
||||||
|
## 5.0.0
|
||||||
|
|
||||||
|
* Skipped release
|
||||||
|
|
||||||
|
## 4.0.0
|
||||||
|
|
||||||
|
* Skipped release
|
||||||
|
|
||||||
|
## 3.0.0
|
||||||
|
|
||||||
|
* Skipped release
|
||||||
|
|
||||||
|
## 2.0.0
|
||||||
|
|
||||||
|
* Skipped release
|
||||||
|
|
||||||
|
## 1.0.0
|
||||||
|
|
||||||
|
* Skipped release
|
|
@ -7,7 +7,7 @@ import 'package:analyzer/dart/element/type.dart';
|
||||||
import 'package:build/build.dart';
|
import 'package:build/build.dart';
|
||||||
import 'package:code_builder/code_builder.dart';
|
import 'package:code_builder/code_builder.dart';
|
||||||
import 'package:file/file.dart';
|
import 'package:file/file.dart';
|
||||||
import 'package:path/src/context.dart';
|
import 'package:path/path.dart';
|
||||||
|
|
||||||
/// Converts a [DartType] to a [TypeReference].
|
/// Converts a [DartType] to a [TypeReference].
|
||||||
TypeReference convertTypeReference(DartType? t) {
|
TypeReference convertTypeReference(DartType? t) {
|
||||||
|
@ -21,7 +21,7 @@ TypeReference convertTypeReference(DartType? t) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isRequiredParameter(ParameterElement e) {
|
bool isRequiredParameter(ParameterElement e) {
|
||||||
return e.isNotOptional;
|
return e.isRequired;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isOptionalParameter(ParameterElement e) {
|
bool isOptionalParameter(ParameterElement e) {
|
||||||
|
@ -233,19 +233,6 @@ class BuildSystemFile extends File {
|
||||||
throw UnimplementedError();
|
throw UnimplementedError();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
@override
|
|
||||||
Future<List<int>> readAsBytes() {
|
|
||||||
var assetId = AssetId(package, path);
|
|
||||||
return reader.readAsBytes(assetId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<int> readAsBytesSync() => throw _unsupported();
|
|
||||||
@override
|
|
||||||
Future<List<String>> readAsLines({Encoding encoding = utf8}) =>
|
|
||||||
throw _unsupported();
|
|
||||||
*/
|
|
||||||
@override
|
@override
|
||||||
List<String> readAsLinesSync({Encoding encoding = utf8}) =>
|
List<String> readAsLinesSync({Encoding encoding = utf8}) =>
|
||||||
throw _unsupported();
|
throw _unsupported();
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
name: jael3_web
|
name: jael3_web
|
||||||
version: 7.0.0
|
version: 7.0.1
|
||||||
description: Experimental virtual DOM/SPA engine built on Jael3. Supports SSR.
|
description: Experimental virtual DOM/SPA engine built on Jael3. Supports SSR.
|
||||||
publish_to: none
|
publish_to: none
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.17.0 <3.0.0'
|
sdk: '>=2.17.0 <3.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
|
analyzer: ^5.2.0
|
||||||
build: ^2.0.2
|
build: ^2.0.2
|
||||||
build_config: ^1.0.0
|
build_config: ^1.0.0
|
||||||
code_builder: ^4.0.0
|
code_builder: ^4.0.0
|
||||||
|
file: ^6.1.4
|
||||||
|
path: ^1.8.2
|
||||||
jael3: ^7.0.0
|
jael3: ^7.0.0
|
||||||
jael3_preprocessor: ^7.0.0
|
jael3_preprocessor: ^7.0.0
|
||||||
source_gen: ^1.0.2
|
source_gen: ^1.0.2
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
## 7.0.1
|
## 7.0.1
|
||||||
|
|
||||||
* Fixed issue #82: Fixed issue #82: Removed casting for numeric fields
|
* Fixed issue #82: Removed casting for numeric fields
|
||||||
|
|
||||||
## 7.0.0
|
## 7.0.0
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,6 @@ class VirtualDirectory {
|
||||||
type = '[Link]';
|
type = '[Link]';
|
||||||
stub = p.basename(entity.path);
|
stub = p.basename(entity.path);
|
||||||
} else {
|
} else {
|
||||||
//TODO: Handle unknown type
|
|
||||||
_log.severe('Unknown file entity. Not a file, directory or link.');
|
_log.severe('Unknown file entity. Not a file, directory or link.');
|
||||||
type = '[]';
|
type = '[]';
|
||||||
stub = '';
|
stub = '';
|
||||||
|
|
|
@ -34,7 +34,6 @@ void main() {
|
||||||
// propagate to app2.
|
// propagate to app2.
|
||||||
var ws = req.container!.make<AngelWebSocket>();
|
var ws = req.container!.make<AngelWebSocket>();
|
||||||
|
|
||||||
// TODO: body retuns void
|
|
||||||
//var body = await req.parseBody();
|
//var body = await req.parseBody();
|
||||||
var body = {};
|
var body = {};
|
||||||
await ws.batchEvent(WebSocketEvent(
|
await ws.batchEvent(WebSocketEvent(
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import 'dart:io';
|
//import 'dart:io';
|
||||||
import 'package:angel3_framework/angel3_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel3_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'package:angel3_user_agent/angel3_user_agent.dart';
|
//import 'package:angel3_user_agent/angel3_user_agent.dart';
|
||||||
import 'package:user_agent_analyzer/user_agent_analyzer.dart';
|
//import 'package:user_agent_analyzer/user_agent_analyzer.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
var app = Angel();
|
var app = Angel();
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 7.0.1
|
||||||
|
|
||||||
|
* Fixed linter warnings
|
||||||
|
|
||||||
## 7.0.0
|
## 7.0.0
|
||||||
|
|
||||||
* Require Dart >= 2.17
|
* Require Dart >= 2.17
|
||||||
|
|
|
@ -83,15 +83,15 @@ class Validator extends Matcher {
|
||||||
schema[keys] is Iterable ? schema[keys] : [schema[keys]];
|
schema[keys] is Iterable ? schema[keys] : [schema[keys]];
|
||||||
var iterable = [];
|
var iterable = [];
|
||||||
|
|
||||||
void _addTo(x) {
|
void addTo(x) {
|
||||||
if (x is Iterable) {
|
if (x is Iterable) {
|
||||||
x.forEach(_addTo);
|
x.forEach(addTo);
|
||||||
} else {
|
} else {
|
||||||
iterable.add(x);
|
iterable.add(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpIterable.forEach(_addTo);
|
tmpIterable.forEach(addTo);
|
||||||
|
|
||||||
for (var rule in iterable) {
|
for (var rule in iterable) {
|
||||||
if (rule is Matcher) {
|
if (rule is Matcher) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: angel3_validate
|
name: angel3_validate
|
||||||
description: Cross-platform request body validation library based on `matcher`.
|
description: Cross-platform request body validation library based on `matcher`.
|
||||||
version: 7.0.0
|
version: 7.0.1
|
||||||
homepage: https://angel3-framework.web.app/
|
homepage: https://angel3-framework.web.app/
|
||||||
repository: https://github.com/dukefirehawk/angel/tree/master/packages/validate
|
repository: https://github.com/dukefirehawk/angel/tree/master/packages/validate
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in a new issue