Compare commits
17 commits
feature/up
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
6dd993cd3b | ||
|
91bd1bf314 | ||
|
ff197d984e | ||
|
383fdfb8f9 | ||
|
78c7076745 | ||
|
0137402f89 | ||
|
3b09470606 | ||
|
4154deface | ||
|
4405b41acd | ||
|
8682da1aef | ||
|
be3e91927d | ||
|
00b0304af1 | ||
|
9619342ab8 | ||
|
1bc6641651 | ||
|
f117469949 | ||
|
883f034140 | ||
|
e0548f997a |
27 changed files with 214 additions and 93 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
## File-based project format:
|
## File-based project format:
|
||||||
*.iws
|
*.iws
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
## Plugin-specific files:
|
## Plugin-specific files:
|
||||||
|
|
||||||
|
@ -58,5 +59,5 @@ sample-project
|
||||||
.dart_tool
|
.dart_tool
|
||||||
.metals
|
.metals
|
||||||
|
|
||||||
.vscode
|
#.vscode
|
||||||
!.vscode/settings.json
|
#!.vscode/settings.json
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"files.watcherExclude": {
|
"files.watcherExclude": {
|
||||||
"**/target": true
|
"**/target": true
|
||||||
}
|
},
|
||||||
|
"cmake.configureOnOpen": false
|
||||||
}
|
}
|
34
CHANGELOG.md
34
CHANGELOG.md
|
@ -1,17 +1,35 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
## 6.1.0
|
## 8.2.0
|
||||||
|
|
||||||
* Updated to `analyzer` 4.x.x
|
* Updated to `analyzer` 6.3.x
|
||||||
* Updated to `lints` 2.x.x
|
* Updated repository link
|
||||||
|
* Updated `lints` to 3.0.0
|
||||||
|
|
||||||
## 6.0.1
|
## 8.1.1
|
||||||
|
|
||||||
* Added `angel3-orm-mysql` template for ORM support for MariaDB and MySQL
|
* Updated README
|
||||||
|
* Updated to logo
|
||||||
|
|
||||||
|
## 8.1.0
|
||||||
|
|
||||||
|
* Updated README
|
||||||
|
* Updated to logo
|
||||||
|
* Updated to `analyzer` 6.2.x
|
||||||
|
* Updated to support Dart SDK 3.1.x
|
||||||
|
|
||||||
|
## 8.0.0
|
||||||
|
|
||||||
|
* Required Dart SDK > 3.0.x
|
||||||
|
* Updated to `analyzer` 5.0.x
|
||||||
|
|
||||||
|
## 7.0.0
|
||||||
|
|
||||||
|
* Skipped release
|
||||||
|
|
||||||
## 6.0.0
|
## 6.0.0
|
||||||
|
|
||||||
* Updated SDK to 2.16.x
|
* Updated Dart SDK to 2.16.x
|
||||||
|
|
||||||
## 5.0.0
|
## 5.0.0
|
||||||
|
|
||||||
|
@ -21,7 +39,7 @@
|
||||||
|
|
||||||
* Changed `pub` to `dart pub`
|
* Changed `pub` to `dart pub`
|
||||||
* Changed `pub build` to `dart build`
|
* Changed `pub build` to `dart build`
|
||||||
* Updated SDK to 2.14.0
|
* Updated Dart SDK to 2.14.0
|
||||||
|
|
||||||
## 3.2.0
|
## 3.2.0
|
||||||
|
|
||||||
|
@ -33,7 +51,7 @@
|
||||||
|
|
||||||
## 3.1.0
|
## 3.1.0
|
||||||
|
|
||||||
* Upgraded to support `analyzer` 2.0.0 major release
|
* Upgraded to support `analyzer` 2.0.0
|
||||||
|
|
||||||
## 3.0.1
|
## 3.0.1
|
||||||
|
|
||||||
|
|
16
README.md
16
README.md
|
@ -1,13 +1,13 @@
|
||||||
# Angel3 CLI
|
# Angel3 CLI
|
||||||
|
|
||||||
[![Screenshot of Terminal](screenshots/angel3-screenshot.png)](https://github.com/dukefirehawk/angel3-cli)
|
[![Angel3 Logo](angel3_logo.png)](https://github.com/dart-backend/angel3-cli)
|
||||||
|
|
||||||
![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_cli?include_prereleases)
|
![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_cli?include_prereleases)
|
||||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
[![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/angel_dart/discussion)](https://gitter.im/angel_dart/discussion)
|
||||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel3-cli)](https://github.com/dukefirehawk/angel3-cli/blob/master/LICENSE)
|
[![License](https://img.shields.io/github/license/dart-backend/angel3-cli)](https://github.com/dart-backend/angel3-cli/blob/master/LICENSE)
|
||||||
|
|
||||||
Command-line tools for the [Angel3 framework](https://pub.dev/packages/angel3_framework) that provides the following functionalities:
|
The command line interface for buidling dart backend in [Angel3 framework](https://pub.dev/packages/angel3_framework) that provides the following functionalities:
|
||||||
|
|
||||||
* Project scaffolding
|
* Project scaffolding
|
||||||
* Generating service models, plugins, tests and more
|
* Generating service models, plugins, tests and more
|
||||||
|
@ -16,18 +16,10 @@ Command-line tools for the [Angel3 framework](https://pub.dev/packages/angel3_fr
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Release version:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dart pub global activate angel3_cli
|
dart pub global activate angel3_cli
|
||||||
```
|
```
|
||||||
|
|
||||||
Development version:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
dart pub global activate --source git https://github.com/dukefirehawk/angel3-cli
|
|
||||||
```
|
|
||||||
|
|
||||||
## Help
|
## Help
|
||||||
|
|
||||||
For information on the available options:
|
For information on the available options:
|
||||||
|
@ -35,3 +27,5 @@ For information on the available options:
|
||||||
```bash
|
```bash
|
||||||
angel3 help
|
angel3 help
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[![Screenshot of Terminal](screenshots/angel3-screenshot.png)](https://github.com/dart-backend/angel3-cli)
|
||||||
|
|
7
TODO.md
7
TODO.md
|
@ -1,7 +0,0 @@
|
||||||
# Todo
|
|
||||||
|
|
||||||
* `service`
|
|
||||||
* Add tests
|
|
||||||
* `migration`
|
|
||||||
* `deploy`
|
|
||||||
* Call these from Grinder script
|
|
BIN
angel3_logo.png
Normal file
BIN
angel3_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
135
archived/logo128.svg
Normal file
135
archived/logo128.svg
Normal file
|
@ -0,0 +1,135 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="128"
|
||||||
|
height="128"
|
||||||
|
viewBox="0 0 128 128"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
inkscape:version="1.3 (0e150ed, 2023-07-21)"
|
||||||
|
sodipodi:docname="logo128.svg"
|
||||||
|
inkscape:export-filename="logo_icon_128.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:zoom="1.5862247"
|
||||||
|
inkscape:cx="58.629776"
|
||||||
|
inkscape:cy="90.466375"
|
||||||
|
inkscape:window-width="1312"
|
||||||
|
inkscape:window-height="738"
|
||||||
|
inkscape:window-x="128"
|
||||||
|
inkscape:window-y="111"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:current-layer="layer1">
|
||||||
|
<inkscape:grid
|
||||||
|
id="grid1"
|
||||||
|
units="px"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
empcolor="#0099e5"
|
||||||
|
empopacity="0.30196078"
|
||||||
|
color="#0099e5"
|
||||||
|
opacity="0.14901961"
|
||||||
|
empspacing="5"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs1">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient15"
|
||||||
|
inkscape:collect="always">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d81c1c;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop15" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d81c1c;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop16" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="swatch13"
|
||||||
|
inkscape:swatch="solid">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d81c1c;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop14" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="swatch7"
|
||||||
|
inkscape:swatch="solid">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d81c1c;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop7" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#swatch13"
|
||||||
|
id="linearGradient14"
|
||||||
|
x1="76.307388"
|
||||||
|
y1="264.40897"
|
||||||
|
x2="425.84061"
|
||||||
|
y2="264.40897"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient15"
|
||||||
|
id="linearGradient16"
|
||||||
|
x1="185.07693"
|
||||||
|
y1="354.51111"
|
||||||
|
x2="296.18161"
|
||||||
|
y2="354.51111"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:137.557px;font-family:'Comic Sans MS';-inkscape-font-specification:'Comic Sans MS, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;opacity:1;fill:#d81c1c;fill-opacity:1;stroke-width:0.716443"
|
||||||
|
x="13.382875"
|
||||||
|
y="114.63321"
|
||||||
|
id="text1"
|
||||||
|
transform="scale(1.0161156,0.98414)"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan1"
|
||||||
|
x="13.382875"
|
||||||
|
y="114.63321"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:137.557px;font-family:'Comic Sans MS';-inkscape-font-specification:'Comic Sans MS, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#d81c1c;fill-opacity:1;stroke-width:0.716443">A</tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:54.9757px;font-family:'Comic Sans MS';-inkscape-font-specification:'Comic Sans MS, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;opacity:1;fill:#d81c1c;fill-opacity:1;stroke:#ffffff;stroke-width:0.725;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
x="44.028919"
|
||||||
|
y="108.3848"
|
||||||
|
id="text2"
|
||||||
|
transform="scale(1.1577238,0.86376387)"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan2"
|
||||||
|
x="44.028919"
|
||||||
|
y="108.3848"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:54.9757px;font-family:'Comic Sans MS';-inkscape-font-specification:'Comic Sans MS, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#d81c1c;fill-opacity:1;stroke:#ffffff;stroke-width:0.725;stroke-dasharray:none;stroke-opacity:1">3</tspan></text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
BIN
archived/logo3.xcf
Normal file
BIN
archived/logo3.xcf
Normal file
Binary file not shown.
|
@ -7,8 +7,6 @@ import 'package:args/command_runner.dart';
|
||||||
import 'package:angel3_cli/angel3_cli.dart';
|
import 'package:angel3_cli/angel3_cli.dart';
|
||||||
import 'package:io/ansi.dart';
|
import 'package:io/ansi.dart';
|
||||||
|
|
||||||
//const String doctor = 'doctor';
|
|
||||||
|
|
||||||
void main(List<String> args) async {
|
void main(List<String> args) async {
|
||||||
var runner = CommandRunner('angel3',
|
var runner = CommandRunner('angel3',
|
||||||
'$asciiArt\n\nCommand-line tools for the Angel3 framework.\n\nhttps://angel3-framework.web.app');
|
'$asciiArt\n\nCommand-line tools for the Angel3 framework.\n\nhttps://angel3-framework.web.app');
|
||||||
|
|
|
@ -243,9 +243,10 @@ class InitCommand extends Command {
|
||||||
var gitDir = Directory.fromUri(projectDir.uri.resolve('.git'));
|
var gitDir = Directory.fromUri(projectDir.uri.resolve('.git'));
|
||||||
if (await gitDir.exists()) await gitDir.delete(recursive: true);
|
if (await gitDir.exists()) await gitDir.delete(recursive: true);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await boilerplateDir.delete(recursive: true).catchError((e) {
|
await boilerplateDir.delete(recursive: true);
|
||||||
print('Got error: ${e.error}');
|
//await boilerplateDir.delete(recursive: true).catchError((e) {
|
||||||
});
|
// print('Got error: ${e.error}');
|
||||||
|
//});
|
||||||
|
|
||||||
if (e is! String) {
|
if (e is! String) {
|
||||||
print(red.wrap('$ballot Could not initialize Angel3 project.'));
|
print(red.wrap('$ballot Could not initialize Angel3 project.'));
|
||||||
|
@ -280,34 +281,34 @@ Future preBuild(Directory projectDir) async {
|
||||||
if (buildCode != 0) throw Exception('Failed to pre-build resources.');
|
if (buildCode != 0) throw Exception('Failed to pre-build resources.');
|
||||||
}
|
}
|
||||||
|
|
||||||
const repoLocation = 'https://github.com/dukefirehawk';
|
const repoLocation = 'https://github.com/dart-backend';
|
||||||
|
|
||||||
const BoilerplateInfo graphQLBoilerplate = BoilerplateInfo(
|
const BoilerplateInfo graphQLBoilerplate = BoilerplateInfo(
|
||||||
'GraphQL',
|
'GraphQL',
|
||||||
'A starter application with GraphQL support.',
|
'A starter application with GraphQL support.',
|
||||||
'$repoLocation/boilerplates.git',
|
'$repoLocation/boilerplates.git',
|
||||||
ref: 'angel3-graphql',
|
ref: 'v7/angel3-graphql',
|
||||||
);
|
);
|
||||||
|
|
||||||
const BoilerplateInfo ormBoilerplate = BoilerplateInfo(
|
const BoilerplateInfo ormBoilerplate = BoilerplateInfo(
|
||||||
'ORM for PostgreSQL',
|
'ORM for PostgreSQL',
|
||||||
'A starter application with ORM support for PostgreSQL.',
|
'A starter application with ORM support for PostgreSQL.',
|
||||||
'$repoLocation/boilerplates.git',
|
'$repoLocation/boilerplates.git',
|
||||||
ref: 'angel3-orm',
|
ref: 'v7/angel3-orm',
|
||||||
);
|
);
|
||||||
|
|
||||||
const BoilerplateInfo ormMySqlBoilerplate = BoilerplateInfo(
|
const BoilerplateInfo ormMySqlBoilerplate = BoilerplateInfo(
|
||||||
'ORM for MariaDB',
|
'ORM for MySQL/MariaDB',
|
||||||
'A starter application with ORM support for MariaDB.',
|
'A starter application with ORM support for MySQL/MariaDB.',
|
||||||
'$repoLocation/boilerplates.git',
|
'$repoLocation/boilerplates.git',
|
||||||
ref: 'angel3-orm-mysql',
|
ref: 'v7/angel3-orm-mysql',
|
||||||
);
|
);
|
||||||
|
|
||||||
const BoilerplateInfo basicBoilerplate = BoilerplateInfo(
|
const BoilerplateInfo basicBoilerplate = BoilerplateInfo(
|
||||||
'Basic',
|
'Basic',
|
||||||
'A basic starter application with minimal packages.',
|
'A basic starter application with minimal packages.',
|
||||||
'$repoLocation/boilerplates.git',
|
'$repoLocation/boilerplates.git',
|
||||||
ref: 'angel3-basic');
|
ref: 'v7/angel3-basic');
|
||||||
|
|
||||||
const BoilerplateInfo sharedBoilerplate = BoilerplateInfo(
|
const BoilerplateInfo sharedBoilerplate = BoilerplateInfo(
|
||||||
'Shared',
|
'Shared',
|
||||||
|
|
|
@ -41,7 +41,7 @@ class ControllerCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
var deps = <MakerDependency>[
|
var deps = <MakerDependency>[
|
||||||
const MakerDependency('angel3_framework', '^4.1.0')
|
const MakerDependency('angel3_framework', '^7.0.0')
|
||||||
];
|
];
|
||||||
|
|
||||||
//${pubspec.name}.src.models.${rc.snakeCase}
|
//${pubspec.name}.src.models.${rc.snakeCase}
|
||||||
|
@ -49,7 +49,7 @@ class ControllerCommand extends Command {
|
||||||
var rc = ReCase(name!);
|
var rc = ReCase(name!);
|
||||||
var controllerLib = Library((controllerLib) {
|
var controllerLib = Library((controllerLib) {
|
||||||
if (argResults?['websocket'] as bool) {
|
if (argResults?['websocket'] as bool) {
|
||||||
deps.add(const MakerDependency('angel3_websocket', '^4.0.0'));
|
deps.add(const MakerDependency('angel3_websocket', '^7.0.0'));
|
||||||
controllerLib.directives
|
controllerLib.directives
|
||||||
.add(Directive.import('package:angel3_websocket/server.dart'));
|
.add(Directive.import('package:angel3_websocket/server.dart'));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -37,7 +37,7 @@ class MigrationCommand extends Command {
|
||||||
name = prompts.get('Name of model class');
|
name = prompts.get('Name of model class');
|
||||||
}
|
}
|
||||||
|
|
||||||
var deps = [const MakerDependency('angel3_migration', '^4.0.0')];
|
var deps = [const MakerDependency('angel3_migration', '^7.0.0')];
|
||||||
var rc = ReCase(name!);
|
var rc = ReCase(name!);
|
||||||
|
|
||||||
var migrationLib = Library((migrationLib) {
|
var migrationLib = Library((migrationLib) {
|
||||||
|
|
|
@ -62,9 +62,9 @@ class ModelCommand extends Command {
|
||||||
if (needsSerialize) {
|
if (needsSerialize) {
|
||||||
modelLib.directives.add(
|
modelLib.directives.add(
|
||||||
Directive.import('package:angel3_serialize/angel3_serialize.dart'));
|
Directive.import('package:angel3_serialize/angel3_serialize.dart'));
|
||||||
deps.add(const MakerDependency('angel3_serialize', '^4.0.0'));
|
deps.add(const MakerDependency('angel3_serialize', '^7.0.0'));
|
||||||
deps.add(const MakerDependency('angel3_serialize_generator', '^4.0.0'));
|
deps.add(const MakerDependency('angel3_serialize_generator', '^7.0.0'));
|
||||||
deps.add(const MakerDependency('build_runner', '^2.0.0'));
|
deps.add(const MakerDependency('build_runner', '^2.2.0'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// else {
|
// else {
|
||||||
|
@ -77,7 +77,7 @@ class ModelCommand extends Command {
|
||||||
modelLib.directives.addAll([
|
modelLib.directives.addAll([
|
||||||
Directive.import('package:angel3_orm/angel3_orm.dart'),
|
Directive.import('package:angel3_orm/angel3_orm.dart'),
|
||||||
]);
|
]);
|
||||||
deps.add(const MakerDependency('angel3_orm', '^4.0.0'));
|
deps.add(const MakerDependency('angel3_orm', '^7.0.0'));
|
||||||
}
|
}
|
||||||
|
|
||||||
modelLib.body.addAll([
|
modelLib.body.addAll([
|
||||||
|
|
|
@ -37,7 +37,7 @@ class PluginCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
var deps = <MakerDependency>[
|
var deps = <MakerDependency>[
|
||||||
const MakerDependency('angel3_framework', '^4.1.0')
|
const MakerDependency('angel3_framework', '^7.0.0')
|
||||||
];
|
];
|
||||||
|
|
||||||
var rc = ReCase(name!);
|
var rc = ReCase(name!);
|
||||||
|
|
|
@ -43,7 +43,7 @@ class ServiceCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
var deps = <MakerDependency>[
|
var deps = <MakerDependency>[
|
||||||
const MakerDependency('angel3_framework', '^4.1.0')
|
const MakerDependency('angel3_framework', '^7.0.0')
|
||||||
];
|
];
|
||||||
|
|
||||||
// '${pubspec.name}.src.services.${rc.snakeCase}'
|
// '${pubspec.name}.src.services.${rc.snakeCase}'
|
||||||
|
|
|
@ -40,9 +40,9 @@ class TestCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
var deps = <MakerDependency>[
|
var deps = <MakerDependency>[
|
||||||
const MakerDependency('angel3_framework', '^4.2.0'),
|
const MakerDependency('angel3_framework', '^7.0.0'),
|
||||||
const MakerDependency('angel3_test', '^4.1.0', dev: true),
|
const MakerDependency('angel3_test', '^7.0.0', dev: true),
|
||||||
const MakerDependency('test', '^1.17.0', dev: true),
|
const MakerDependency('test', '^1.21.0', dev: true),
|
||||||
];
|
];
|
||||||
|
|
||||||
var rc = ReCase(name!);
|
var rc = ReCase(name!);
|
||||||
|
|
|
@ -225,7 +225,7 @@ class RenamingVisitor extends RecursiveAstVisitor {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void visitLibraryDirective(LibraryDirective node) {
|
void visitLibraryDirective(LibraryDirective node) {
|
||||||
var name = node.name.name;
|
var name = node.name2?.name ?? '';
|
||||||
|
|
||||||
if (name.startsWith(oldName)) {
|
if (name.startsWith(oldName)) {
|
||||||
replace[[node.offset, node.end]] =
|
replace[[node.offset, node.end]] =
|
||||||
|
|
|
@ -2,10 +2,8 @@ import 'package:code_builder/code_builder.dart';
|
||||||
import 'generator.dart';
|
import 'generator.dart';
|
||||||
|
|
||||||
class CustomServiceGenerator extends ServiceGenerator {
|
class CustomServiceGenerator extends ServiceGenerator {
|
||||||
@override
|
|
||||||
bool get createsModel => false;
|
bool get createsModel => false;
|
||||||
|
|
||||||
@override
|
|
||||||
bool get createsValidator => false;
|
bool get createsValidator => false;
|
||||||
|
|
||||||
const CustomServiceGenerator() : super('Custom');
|
const CustomServiceGenerator() : super('Custom');
|
||||||
|
|
|
@ -8,7 +8,7 @@ class FileServiceGenerator extends ServiceGenerator {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<MakerDependency> get dependencies =>
|
List<MakerDependency> get dependencies =>
|
||||||
const [MakerDependency('angel3_file_service', '^4.0.0')];
|
const [MakerDependency('angel3_file_service', '^7.0.0')];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get goesFirst => true;
|
bool get goesFirst => true;
|
||||||
|
@ -41,7 +41,7 @@ class FileServiceGenerator extends ServiceGenerator {
|
||||||
return refer('JsonFileService').newInstance([
|
return refer('JsonFileService').newInstance([
|
||||||
refer('dbDirectory')
|
refer('dbDirectory')
|
||||||
.property('childFile')
|
.property('childFile')
|
||||||
.call([literal(pluralize(lower) + '_db.json')])
|
.call([literal('${pluralize(lower)}_db.json')])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,21 +8,6 @@ class ServiceGenerator {
|
||||||
|
|
||||||
List<MakerDependency> get dependencies => [];
|
List<MakerDependency> get dependencies => [];
|
||||||
|
|
||||||
@deprecated
|
|
||||||
bool get createsModel => true;
|
|
||||||
|
|
||||||
@deprecated
|
|
||||||
bool get createsValidator => true;
|
|
||||||
|
|
||||||
@deprecated
|
|
||||||
bool get exportedInServiceLibrary => true;
|
|
||||||
|
|
||||||
@deprecated
|
|
||||||
bool get injectsSingleton => false;
|
|
||||||
|
|
||||||
@deprecated
|
|
||||||
bool get shouldRunBuild => false;
|
|
||||||
|
|
||||||
bool get goesFirst => false;
|
bool get goesFirst => false;
|
||||||
|
|
||||||
void applyToLibrary(LibraryBuilder library, String name, String lower) {}
|
void applyToLibrary(LibraryBuilder library, String name, String lower) {}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import 'package:code_builder/code_builder.dart';
|
||||||
class MapServiceGenerator extends ServiceGenerator {
|
class MapServiceGenerator extends ServiceGenerator {
|
||||||
const MapServiceGenerator() : super('In-Memory');
|
const MapServiceGenerator() : super('In-Memory');
|
||||||
|
|
||||||
@override
|
|
||||||
bool get createsModel => false;
|
bool get createsModel => false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -10,7 +10,6 @@ class MongoServiceGenerator extends ServiceGenerator {
|
||||||
List<MakerDependency> get dependencies =>
|
List<MakerDependency> get dependencies =>
|
||||||
const [MakerDependency('angel3_mongo', '^4.0.0')];
|
const [MakerDependency('angel3_mongo', '^4.0.0')];
|
||||||
|
|
||||||
@override
|
|
||||||
bool get createsModel => false;
|
bool get createsModel => false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -10,7 +10,6 @@ class RethinkServiceGenerator extends ServiceGenerator {
|
||||||
List<MakerDependency> get dependencies =>
|
List<MakerDependency> get dependencies =>
|
||||||
const [MakerDependency('angel3_rethink', '^4.0.0')];
|
const [MakerDependency('angel3_rethink', '^4.0.0')];
|
||||||
|
|
||||||
@override
|
|
||||||
bool get createsModel => false;
|
bool get createsModel => false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
32
pubspec.yaml
32
pubspec.yaml
|
@ -1,29 +1,29 @@
|
||||||
name: angel3_cli
|
name: angel3_cli
|
||||||
version: 6.1.0
|
version: 8.2.0
|
||||||
description: Command line tools for the Angel3 framework, including scaffolding.
|
description: The command line interface for building dart backend in Angel3 framework.
|
||||||
homepage: https://angel3-framework.web.app/
|
homepage: https://angel3-framework.web.app/
|
||||||
repository: https://github.com/dukefirehawk/angel3-cli
|
repository: https://github.com/dart-backend/angel3-cli
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.16.0 <3.0.0'
|
sdk: '>=3.0.0 <4.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
analyzer: ^4.0.0
|
analyzer: ^6.3.0
|
||||||
args: ^2.1.1
|
args: ^2.4.0
|
||||||
code_builder: ^4.0.0
|
code_builder: ^4.5.0
|
||||||
dart_style: ^2.0.1
|
dart_style: ^2.3.0
|
||||||
glob: ^2.0.1
|
glob: ^2.1.0
|
||||||
http: ^0.13.3
|
http: ^1.0.0
|
||||||
io: ^1.0.0
|
io: ^1.0.0
|
||||||
inflection3: ^0.5.3+2
|
inflection3: ^0.5.3+2
|
||||||
mustache_template: ^2.0.0
|
mustache_template: ^2.0.0
|
||||||
path: ^1.8.0
|
path: ^1.9.0
|
||||||
prompts: ^2.0.0
|
prompts: ^2.0.0
|
||||||
pubspec_parse: ^1.0.0
|
pubspec_parse: ^1.2.0
|
||||||
quiver: ^3.0.1
|
quiver: ^3.2.0
|
||||||
recase: ^4.0.0
|
recase: ^4.1.0
|
||||||
shutdown: ^0.4.3
|
shutdown: ^0.4.3
|
||||||
watcher: ^1.0.0
|
watcher: ^1.1.0
|
||||||
yaml: ^3.1.0
|
yaml: ^3.1.0
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
lints: ^2.0.0
|
lints: ^3.0.0
|
||||||
executables:
|
executables:
|
||||||
angel3: angel3
|
angel3: angel3
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 83 KiB |
|
@ -42,7 +42,7 @@ void main() async {
|
||||||
var contents = lineList.fold<String>('', (prev, cur) {
|
var contents = lineList.fold<String>('', (prev, cur) {
|
||||||
var updatedCur = updateImport(cur, oldName, newName);
|
var updatedCur = updateImport(cur, oldName, newName);
|
||||||
updatedCur = updateMustacheBinding(updatedCur, oldName, newName);
|
updatedCur = updateMustacheBinding(updatedCur, oldName, newName);
|
||||||
return prev + '\n' + updatedCur;
|
return '$prev\n$updatedCur';
|
||||||
});
|
});
|
||||||
await file.writeAsString(fmt.format(contents));
|
await file.writeAsString(fmt.format(contents));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue