Updated angel3_orm

This commit is contained in:
thomashii 2021-06-11 12:00:10 +08:00
parent bf9bf67fa8
commit 636f33de37
21 changed files with 94 additions and 140 deletions

12
AUTHORS.md Normal file
View file

@ -0,0 +1,12 @@
Primary Authors
===============
* __[Thomas Hii](dukefirehawk.apps@gmail.com)__
Thomas is the current maintainer of the code base. He has refactored and migrated the
code base to support NNBD.
* __[Tobe O](thosakwe@gmail.com)__
Tobe has written much of the original code prior to NNBD migration. He has moved on and
is no longer involved with the project.

2
CHANGELOG.md Normal file
View file

@ -0,0 +1,2 @@
# 1.0.0
* Application template to build web application with `Angel3` framework

3
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,3 @@
# Contributing Angel3
Any contributions from the community are welcome.

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2016 angel-dart
Copyright (c) 2016 dukefirehawk.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -1,9 +1,9 @@
[![The Angel Framework](https://angel-dart.github.io/assets/images/logo.png)](https://angel-dart.dev)
[![version](https://img.shields.io/badge/pub-v1.0.0-brightgreen)](https://github.com/dukefirehawk/boilerplates/blob/angel3-orm)
[![Angel3 Framework](https://img.shields.io/badge/pub-v4.0.0-brightgreen)](https://pub.dartlang.org/packages/angel3_framework)
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
[![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion)
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/angel_dart/discussion)
[![Pub](https://img.shields.io/pub/v/angel_framework.svg)](https://pub.dartlang.org/packages/angel_framework)
[![Build status](https://travis-ci.org/angel-dart/framework.svg?branch=master)](https://travis-ci.org/angel-dart/framework)
![License](https://img.shields.io/github/license/angel-dart/framework.svg)
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/boilerplates/blob/angel3-orm/LICENSE)
**A polished, production-ready backend framework in Dart.**
@ -16,16 +16,16 @@ streamline development by providing many common features
out-of-the-box in a consistent manner.
With features like the following, Angel is the all-in-one framework you should choose to build your next project:
* [GraphQL Support](https://github.com/angel-dart/graphql)
* [PostgreSQL ORM](https://github.com/angel-dart/orm)
* [Dependency Injection](https://docs.angel-dart.dev/guides/dependency-injection)
* And [much more](https://github.com/angel-dart)...
* [GraphQL Support](https://github.com/dukefirehawk/angel/tree/master/packages/graphql)
* [PostgreSQL ORM](https://github.com/dukefirehawk/angel/tree/master/packages/orm)
* [Dependency Injection](https://angel3-docs.dukefirehawk.com/guides/dependency-injection)
* And [much more](https://github.com/dukefirehawk/angel)...
## Installation & Setup
Once you have [Dart](https://www.dartlang.org/) installed, bootstrapping a project is as simple as running a few shell commands:
Once you have [Dart](https://dart.dev/get-dart) installed, bootstrapping a project is as simple as running a few shell commands:
Install the [Angel CLI](https://github.com/angel-dart/cli):
Install the [Angel3 CLI](https://github.com/dukefirehawk/angel3-cli):
```bash
pub global activate angel_cli
@ -43,18 +43,18 @@ You can even have your server run and be *hot-reloaded* on file changes:
dart --observe bin/dev.dart
```
Next, check out the [detailed documentation](https://docs.angel-dart.dev/v/2.x) to learn to flesh out your project.
Next, check out the [detailed documentation](https://angel3-docs.dukefirehawk.com/guides) to learn to flesh out your project.
## Examples and Documentation
Visit the [documentation](https://docs.angel-dart.dev/v/2.x)
Visit the [documentation](https://angel3-docs.dukefirehawk.com/guides)
for dozens of guides and resources, including video tutorials,
to get up and running as quickly as possible with Angel.
Examples and complete projects can be found
[here](https://github.com/angel-dart/examples-v2).
[here](https://github.com/dukefirehawk/angel3-examples/tree/master/docs_examples/getting_started).
You can also view the [API Documentation](http://www.dartdocs.org/documentation/angel_framework/latest).
You can also view the [API Documentation](https://pub.dev/documentation/angel3_framework/latest/).
There is also an [Awesome Angel :fire:](https://github.com/angel-dart/awesome-angel) list.
There is also an [Awesome Angel :fire:](https://github.com/dukefirehawk/angel3-awesome) list.

View file

@ -1,9 +1,9 @@
import 'dart:io';
import 'package:angel/src/pretty_logging.dart';
import 'package:angel/angel.dart';
import 'package:angel_container/mirrors.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_hot/angel_hot.dart';
import 'package:angel3_app/src/pretty_logging.dart';
import 'package:angel3_app/angel.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_hot/angel3_hot.dart';
import 'package:logging/logging.dart';
void main() async {

View file

@ -1,8 +1,8 @@
import 'package:angel/src/config/plugins/orm.dart';
import 'package:angel/models.dart';
import 'package:angel_configuration/angel_configuration.dart';
import 'package:angel_migration_runner/angel_migration_runner.dart';
import 'package:angel_migration_runner/postgres.dart';
import 'package:angel3_app/src/config/plugins/orm.dart';
import 'package:angel3_app/models.dart';
import 'package:angel3_configuration/angel3_configuration.dart';
import 'package:angel3_migration_runner/angel3_migration_runner.dart';
import 'package:angel3_migration_runner/postgres.dart';
import 'package:file/local.dart';
void main(List<String> args) async {

View file

@ -1,6 +1,6 @@
import 'package:angel/angel.dart';
import 'package:angel_container/mirrors.dart';
import 'package:angel_production/angel_production.dart';
import 'package:angel3_app/angel.dart';
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_production/angel3_production.dart';
// NOTE: By default, the Runner class does not use the `MirrorsReflector`, or any
// reflector, by default.

View file

@ -2,7 +2,7 @@
library angel;
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:file/local.dart';
import 'src/config/config.dart' as configuration;
import 'src/routes/routes.dart' as routes;

View file

@ -1,9 +1,9 @@
/// Configuration for this Angel instance.
library angel.src.config;
import 'package:angel_configuration/angel_configuration.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_jael/angel_jael.dart';
import 'package:angel3_configuration/angel3_configuration.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_jael/angel3_jael.dart';
import 'package:file/file.dart';
import 'plugins/plugins.dart' as plugins;

View file

@ -1,8 +1,8 @@
import 'dart:async';
import 'dart:io';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_orm/angel_orm.dart';
import 'package:angel_orm_postgres/angel_orm_postgres.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_orm/angel3_orm.dart';
import 'package:angel3_orm_postgres/angel3_orm_postgres.dart';
import 'package:postgres/postgres.dart';
Future<void> configureServer(Angel app) async {

View file

@ -2,7 +2,7 @@
library angel.src.config.plugins;
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'orm.dart' as orm;
Future configureServer(Angel app) async {

View file

@ -1,7 +1,7 @@
import 'package:angel_migration/angel_migration.dart';
import 'package:angel_model/angel_model.dart';
import 'package:angel_serialize/angel_serialize.dart';
import 'package:angel_orm/angel_orm.dart';
import 'package:angel3_migration/angel3_migration.dart';
import 'package:angel3_model/angel3_model.dart';
import 'package:angel3_serialize/angel3_serialize.dart';
import 'package:angel3_orm/angel3_orm.dart';
import 'package:optional/optional.dart';
part 'greeting.g.dart';

View file

@ -29,7 +29,7 @@ class GreetingMigration extends Migration {
class GreetingQuery extends Query<Greeting, GreetingQueryWhere> {
GreetingQuery({Set<String>? trampoline}) {
trampoline ??= Set();
trampoline ??= <String>{};
trampoline.add(tableName);
_where = GreetingQueryWhere(this);
}

View file

@ -1,4 +1,4 @@
import 'package:angel_http_exception/angel_http_exception.dart';
import 'package:angel3_http_exception/angel3_http_exception.dart';
import 'package:logging/logging.dart';
import 'package:io/ansi.dart';

View file

@ -1,7 +1,7 @@
library angel.src.routes.controllers;
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
Future configureServer(Angel app) async {
/// Controllers will not function unless wired to the application!

View file

@ -1,9 +1,9 @@
/// This app's route configuration.
library angel.src.routes;
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_orm/angel_orm.dart';
import 'package:angel_static/angel_static.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_orm/angel3_orm.dart';
import 'package:angel3_static/angel3_static.dart';
import 'package:file/file.dart';
import 'controllers/controllers.dart' as controllers;
import '../models/greeting.dart';

View file

@ -2,7 +2,7 @@
library angel.services;
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel3_framework/angel3_framework.dart';
/// Configure our application to use *services*.
/// Services must be wired to the app via `app.use`.

BIN
logo3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -1,96 +1,33 @@
name: angel
description: An app that's going to be amazing pretty soon.
publish_to: none # Ensure we don't accidentally publish our private code! ;)
name: angel3_app
version: 1.0.0
description: A boilerplate template for building Angel3 application with ORM enabled
publish_to: none
environment:
sdk: '>=2.12.0 <3.0.0'
homepage: https://github.com/dukefirehawk/angel
homepage: https://github.com/dukefirehawk/boilerplates
dependencies:
angel_auth:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/auth
angel_configuration:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/configuration
angel_framework:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/framework
angel_jael:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/jael/angel_jael
angel_migration:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/orm/angel_migration
angel_orm:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/orm/angel_orm
angel_orm_postgres:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/orm/angel_orm_postgres
angel_serialize:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/serialize/angel_serialize
angel_production:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/production
angel_static:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/static
angel_validate:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/validate
angel3_auth: ^4.0.0
angel3_configuration: ^4.0.0
angel3_framework: ^4.0.0
angel3_jael: ^4.0.0
angel3_migration: ^4.0.0-beta.1
angel3_orm: ^4.0.0-beta.1
angel3_orm_postgres: ^3.0.0-beta.1
angel3_serialize: ^4.0.0
angel3_production: ^3.0.0
angel3_static: ^4.0.0
angel3_validate: ^4.0.0
optional: ^6.0.0-nullsafety.2
dev_dependencies:
angel_hot:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/hot
angel_migration_runner:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/orm/angel_migration_runner
angel_orm_generator:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/orm/angel_orm_generator
angel_serialize_generator:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/serialize/angel_serialize_generator
angel_test:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/test
build_runner: ^2.0.3 # Runs builds
io: ^1.0.0 # For pretty printing.
pedantic: ^1.11.0 # Enforces Dart style conventions.
test: ^1.17.4 # For unit testing.
angel3_hot: ^4.0.0
angel3_migration_runner: ^4.0.0-beta.1
angel3_orm_generator: ^4.0.0-beta.1
angel3_serialize_generator: ^4.0.0
angel3_test: ^4.0.0
build_runner: ^2.0.3
io: ^1.0.0
pedantic: ^1.11.0
test: ^1.17.7

View file

@ -1,6 +1,6 @@
import 'package:angel/angel.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_test/angel_test.dart';
import 'package:angel3_app/angel.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_test/angel3_test.dart';
import 'package:test/test.dart';
// Angel also includes facilities to make testing easier.