Fixed angel3_orm_generator

This commit is contained in:
thomashii@dukefirehawk.com 2022-12-17 17:59:00 +08:00
parent fecead4a90
commit 4a3b354c92
10 changed files with 24 additions and 20 deletions

View file

@ -1,5 +1,10 @@
# Change Log # Change Log
## 7.1.0
* Require Dart >= 2.18
* Upgraded `relectable` to 4.x.x
## 7.0.0 ## 7.0.0
* Require Dart >= 2.17 * Require Dart >= 2.17

View file

@ -1,13 +1,13 @@
name: angel3_container_generator name: angel3_container_generator
version: 7.0.0 version: 7.1.0
description: Codegen support for using pkg:reflectable with pkg:angel3_container. description: Codegen support for using pkg:reflectable with pkg:angel3_container.
homepage: https://angel3-framework.web.app/ homepage: https://angel3-framework.web.app/
repository: https://github.com/dukefirehawk/angel/tree/master/packages/container/angel_container_generator repository: https://github.com/dukefirehawk/angel/tree/master/packages/container/angel_container_generator
environment: environment:
sdk: '>=2.17.0 <3.0.0' sdk: '>=2.18.0 <3.0.0'
dependencies: dependencies:
angel3_container: ^7.0.0 angel3_container: ^7.0.0
reflectable: ^3.0.4 reflectable: ^4.0.2
dev_dependencies: dev_dependencies:
build_runner: ^2.1.2 build_runner: ^2.1.2
build_test: ^2.1.3 build_test: ^2.1.3

View file

@ -2,7 +2,6 @@ import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_html/angel3_html.dart'; import 'package:angel3_html/angel3_html.dart';
import 'package:angel3_test/angel3_test.dart'; import 'package:angel3_test/angel3_test.dart';
import 'package:belatuk_html_builder/elements.dart'; import 'package:belatuk_html_builder/elements.dart';
import 'package:belatuk_html_builder/belatuk_html_builder.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
void main() { void main() {

View file

@ -108,7 +108,7 @@ Future<Document?> _loadViewTemplate(Directory viewsDirectory, String name,
sourceUrl: file.uri, asDSX: asDSX, onError: errors.add); sourceUrl: file.uri, asDSX: asDSX, onError: errors.add);
if (doc == null) { if (doc == null) {
throw ArgumentError(file.basename + " does not exists"); throw ArgumentError("${file.basename} does not exists");
} }
try { try {
@ -118,7 +118,7 @@ Future<Document?> _loadViewTemplate(Directory viewsDirectory, String name,
// Ignore these errors, so that we can show syntax errors. // Ignore these errors, so that we can show syntax errors.
} }
if (processed == null) { if (processed == null) {
throw ArgumentError(file.basename + " does not exists"); throw ArgumentError("${file.basename} does not exists");
} }
return processed; return processed;
} }

View file

@ -10,8 +10,7 @@ class JaelError extends Error {
@override @override
String toString() { String toString() {
var label = severity == JaelErrorSeverity.warning ? 'warning' : 'error'; var label = severity == JaelErrorSeverity.warning ? 'warning' : 'error';
return '$label: ${span.start.toolString}: $message\n' + return '$label: ${span.start.toolString}: $message\n${span.highlight(color: true)}';
span.highlight(color: true);
} }
} }

View file

@ -64,11 +64,7 @@ class Renderer {
'<b>$type:</b> ${error.span.start.toolString}: ${error.message}') '<b>$type:</b> ${error.span.start.toolString}: ${error.message}')
..writeln('<br>') ..writeln('<br>')
..writeln( ..writeln(
'<span style="color: red;">' + '<span style="color: red;">${htmlEscape.convert(error.span.highlight(color: false)).replaceAll('\n', '<br>')}</span>',
htmlEscape
.convert(error.span.highlight(color: false))
.replaceAll('\n', '<br>') +
'</span>',
) )
..outdent() ..outdent()
..writeln('</li>'); ..writeln('</li>');

View file

@ -8,7 +8,9 @@ part of 'stateful.dart';
abstract class _StatefulAppJaelTemplate implements Component<_AppState> { abstract class _StatefulAppJaelTemplate implements Component<_AppState> {
//Timer? get _timer; //Timer? get _timer;
@override
void beforeDestroy(); void beforeDestroy();
@override @override
DomNode render() { DomNode render() {
return h('div', {}, [text('Tick count: '), text(state.ticks.toString())]); return h('div', {}, [text('Tick count: '), text(state.ticks.toString())]);

View file

@ -25,11 +25,10 @@ abstract class _LabeledInputJaelTemplate implements Component<dynamic> {
h('b', {}, [text(name.toString()), text(':')]) h('b', {}, [text(name.toString()), text(':')])
]), ]),
h('br', {}, []), h('br', {}, []),
h('input', { h(
'name': name, 'input',
'placeholder': "Enter " + name! + "...", {'name': name, 'placeholder': "Enter ${name!}...", 'type': "text"},
'type': "text" [])
}, [])
]); ]);
} }
} }

View file

@ -1,5 +1,9 @@
# Change Log # Change Log
## 7.1.1
* Temporily fixed `analyzer` to 5.2.0 to resolve undocumented breaking changes in 5.3.1.
## 7.1.0 ## 7.1.0
* [Breaking] Require Dart >= 2.18 * [Breaking] Require Dart >= 2.18

View file

@ -1,5 +1,5 @@
name: angel3_orm_generator name: angel3_orm_generator
version: 7.1.0 version: 7.1.1
description: Code generators for Angel3 ORM. Generates query builder classes. description: Code generators for Angel3 ORM. Generates query builder classes.
homepage: https://angel3-framework.web.app/ homepage: https://angel3-framework.web.app/
repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_generator repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_generator
@ -10,7 +10,7 @@ dependencies:
angel3_serialize: ^7.0.0 angel3_serialize: ^7.0.0
angel3_orm: ^7.0.0 angel3_orm: ^7.0.0
angel3_serialize_generator: ^7.1.0 angel3_serialize_generator: ^7.1.0
analyzer: ^5.0.0 analyzer: 5.2.0
inflection3: ^0.5.3+1 inflection3: ^0.5.3+1
build: ^2.0.1 build: ^2.0.1
build_config: ^1.0.0 build_config: ^1.0.0