From 1a3741832e4f2e15e32d7c149b0e95a3a2533529 Mon Sep 17 00:00:00 2001 From: Anthony Date: Thu, 19 Oct 2023 14:24:09 +0700 Subject: [PATCH] v5.6.0 --- CHANGELOG.md | 5 +++++ example/pubspec.lock | 11 ++++++----- lib/metro/menu.dart | 2 ++ lib/metro/metro.dart | 3 +++ lib/metro/stubs/api_service_stub.dart | 1 + lib/metro/stubs/config_stub.dart | 1 + lib/metro/stubs/controller_stub.dart | 1 + lib/metro/stubs/event_stub.dart | 1 + lib/metro/stubs/model_stub.dart | 1 + lib/metro/stubs/page_stub.dart | 1 + lib/metro/stubs/page_w_controller_stub.dart | 1 + lib/metro/stubs/postman_api_service_stub.dart | 1 + lib/metro/stubs/provider_stub.dart | 1 + lib/metro/stubs/route_guard_stub.dart | 1 + lib/metro/stubs/theme_colors_stub.dart | 1 + lib/metro/stubs/theme_stub.dart | 1 + lib/metro/stubs/widget_stateful_stub.dart | 1 + lib/metro/stubs/widget_stateless_stub.dart | 1 + lib/nylo_framework.dart | 2 +- pubspec.lock | 9 +++++---- pubspec.yaml | 4 ++-- 21 files changed, 38 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ae46f8..85898ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [5.6.0] - 2023-10-19 + +* Add docblock to more APIs +* Update pubspec.yaml + ## [5.5.0] - 2023-10-17 * Update page stub to use `NyPage` diff --git a/example/pubspec.lock b/example/pubspec.lock index a00ce81..fd2a660 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -235,14 +235,15 @@ packages: path: ".." relative: true source: path - version: "5.4.1" + version: "5.6.0" nylo_support: dependency: transitive description: - path: "/Users/anthony/StudioProjects/support" - relative: false - source: path - version: "5.10.1" + name: nylo_support + sha256: efc8458b50dde332fb98a6bb6aec7e06bbfeb3f279f868b570669732e5ef1b54 + url: "https://pub.dev" + source: hosted + version: "5.12.0" page_transition: dependency: transitive description: diff --git a/lib/metro/menu.dart b/lib/metro/menu.dart index 9947554..f9bb9b9 100644 --- a/lib/metro/menu.dart +++ b/lib/metro/menu.dart @@ -1,3 +1,5 @@ +/// The [metroMenu] is displayed when running `dart run nylo_framework:main` +/// To run a command you can call `dart run nylo_framework:main make:model MyModel` const String metroMenu = """ Metro - Nylo\'s Companion to Build Flutter apps by Anthony Gordon diff --git a/lib/metro/metro.dart b/lib/metro/metro.dart index f383b1e..9a2ee12 100644 --- a/lib/metro/metro.dart +++ b/lib/metro/metro.dart @@ -697,6 +697,7 @@ _makeController(List arguments) async { forceCreate: hasForceFlag ?? false); } +/// Creates a new Model _makeModel(List arguments) async { parser.addFlag(helpFlag, abbr: 'h', @@ -725,12 +726,14 @@ _makeModel(List arguments) async { stubModel: stubModel, hasForceFlag: hasForceFlag); } +/// Creates a new Model _createNyloModel(ReCase classReCase, {required String stubModel, bool? hasForceFlag}) async { await MetroService.makeModel(classReCase.snakeCase, stubModel, forceCreate: hasForceFlag ?? false, addToConfig: true); } +/// Creates a new Page _makePage(List arguments) async { parser.addFlag( helpFlag, diff --git a/lib/metro/stubs/api_service_stub.dart b/lib/metro/stubs/api_service_stub.dart index de6ca88..11aa9d0 100644 --- a/lib/metro/stubs/api_service_stub.dart +++ b/lib/metro/stubs/api_service_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a new API Service. String apiServiceStub(ReCase rc, {required ReCase model, required String baseUrl}) => ''' diff --git a/lib/metro/stubs/config_stub.dart b/lib/metro/stubs/config_stub.dart index 0eb73ea..180f67a 100644 --- a/lib/metro/stubs/config_stub.dart +++ b/lib/metro/stubs/config_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a new Config. String configStub(ReCase configName) => ''' /* |-------------------------------------------------------------------------- diff --git a/lib/metro/stubs/controller_stub.dart b/lib/metro/stubs/controller_stub.dart index 0de9803..81d1353 100644 --- a/lib/metro/stubs/controller_stub.dart +++ b/lib/metro/stubs/controller_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a new Controller. String controllerStub({required ReCase controllerName}) => ''' import 'controller.dart'; import 'package:flutter/widgets.dart'; diff --git a/lib/metro/stubs/event_stub.dart b/lib/metro/stubs/event_stub.dart index 2ef2046..ee80de8 100644 --- a/lib/metro/stubs/event_stub.dart +++ b/lib/metro/stubs/event_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a new Event. String eventStub({required ReCase eventName}) => ''' import 'package:nylo_framework/nylo_framework.dart'; diff --git a/lib/metro/stubs/model_stub.dart b/lib/metro/stubs/model_stub.dart index 3d3fdf3..5b688cc 100644 --- a/lib/metro/stubs/model_stub.dart +++ b/lib/metro/stubs/model_stub.dart @@ -1,3 +1,4 @@ +/// This stub is used to create a new Model. String modelStub({String? modelName}) => ''' import 'package:nylo_framework/nylo_framework.dart'; diff --git a/lib/metro/stubs/page_stub.dart b/lib/metro/stubs/page_stub.dart index 7340820..d919457 100644 --- a/lib/metro/stubs/page_stub.dart +++ b/lib/metro/stubs/page_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a new Page. String pageStub({required ReCase pageName}) => ''' import 'package:flutter/material.dart'; import 'package:nylo_framework/nylo_framework.dart'; diff --git a/lib/metro/stubs/page_w_controller_stub.dart b/lib/metro/stubs/page_w_controller_stub.dart index fc393e4..e516440 100644 --- a/lib/metro/stubs/page_w_controller_stub.dart +++ b/lib/metro/stubs/page_w_controller_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a new Page + Controller. String pageWithControllerStub({required ReCase className}) => ''' import 'package:flutter/material.dart'; import 'package:nylo_framework/nylo_framework.dart'; diff --git a/lib/metro/stubs/postman_api_service_stub.dart b/lib/metro/stubs/postman_api_service_stub.dart index 638d803..1f9ad3b 100644 --- a/lib/metro/stubs/postman_api_service_stub.dart +++ b/lib/metro/stubs/postman_api_service_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create an API Service class in the /app/networking/ directory. String postmanApiServiceStub(ReCase rc, {required String networkMethods, required, diff --git a/lib/metro/stubs/provider_stub.dart b/lib/metro/stubs/provider_stub.dart index 6ede85c..d6fa899 100644 --- a/lib/metro/stubs/provider_stub.dart +++ b/lib/metro/stubs/provider_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a Provider class in the /app/providers/ directory. String providerStub(ReCase rc) => ''' import 'package:nylo_framework/nylo_framework.dart'; diff --git a/lib/metro/stubs/route_guard_stub.dart b/lib/metro/stubs/route_guard_stub.dart index 363fa39..4d53114 100644 --- a/lib/metro/stubs/route_guard_stub.dart +++ b/lib/metro/stubs/route_guard_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a Route Guard class in the /routes/guards/ directory. String routeGuardStub(ReCase rc) => ''' import 'package:flutter/material.dart'; import 'package:nylo_framework/nylo_framework.dart'; diff --git a/lib/metro/stubs/theme_colors_stub.dart b/lib/metro/stubs/theme_colors_stub.dart index f763423..98e42bc 100644 --- a/lib/metro/stubs/theme_colors_stub.dart +++ b/lib/metro/stubs/theme_colors_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create ColorStyles in the /resources/themes/styles/ directory. String themeColorsStub(ReCase rc) => ''' import 'package:flutter/material.dart'; import '/resources/themes/styles/color_styles.dart'; diff --git a/lib/metro/stubs/theme_stub.dart b/lib/metro/stubs/theme_stub.dart index a6913db..13430e4 100644 --- a/lib/metro/stubs/theme_stub.dart +++ b/lib/metro/stubs/theme_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a new Theme in the /resources/themes/ directory. String themeStub(ReCase rc, {bool isDark = false}) => ''' import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/lib/metro/stubs/widget_stateful_stub.dart b/lib/metro/stubs/widget_stateful_stub.dart index 29a98af..d0e65ad 100644 --- a/lib/metro/stubs/widget_stateful_stub.dart +++ b/lib/metro/stubs/widget_stateful_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a Stateful Widget in the /resources/widgets/ directory. String widgetStatefulStub(ReCase rc) => ''' import 'package:flutter/material.dart'; import 'package:nylo_framework/nylo_framework.dart'; diff --git a/lib/metro/stubs/widget_stateless_stub.dart b/lib/metro/stubs/widget_stateless_stub.dart index 74f6efa..4dc9648 100644 --- a/lib/metro/stubs/widget_stateless_stub.dart +++ b/lib/metro/stubs/widget_stateless_stub.dart @@ -1,5 +1,6 @@ import 'package:recase/recase.dart'; +/// This stub is used to create a Stateless Widget in the /resources/widgets/ directory. String widgetStatelessStub(ReCase rc) => ''' import 'package:flutter/material.dart'; diff --git a/lib/nylo_framework.dart b/lib/nylo_framework.dart index 52c2709..7ce0ed4 100644 --- a/lib/nylo_framework.dart +++ b/lib/nylo_framework.dart @@ -38,4 +38,4 @@ export 'package:nylo_support/widgets/ny_page.dart'; export 'package:dio/dio.dart'; /// Nylo version -const String nyloVersion = 'v5.5.0'; +const String nyloVersion = 'v5.6.0'; diff --git a/pubspec.lock b/pubspec.lock index 9c24421..5fd883b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -232,10 +232,11 @@ packages: nylo_support: dependency: "direct main" description: - path: "/Users/anthony/StudioProjects/support" - relative: false - source: path - version: "5.10.1" + name: nylo_support + sha256: efc8458b50dde332fb98a6bb6aec7e06bbfeb3f279f868b570669732e5ef1b54 + url: "https://pub.dev" + source: hosted + version: "5.12.0" page_transition: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 229d776..62f90b0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: nylo_framework description: Micro-framework for Flutter that's built to simplify app development for Flutter projects. -version: 5.5.0 +version: 5.6.0 homepage: https://nylo.dev repository: https://github.com/nylo-core/framework/tree/5.x issue_tracker: https://github.com/nylo-core/framework/issues @@ -17,7 +17,7 @@ environment: dependencies: dio: ^5.3.3 flutter_dotenv: ^5.1.0 - nylo_support: ^5.11.0 + nylo_support: ^5.12.0 theme_provider: ^0.6.0 page_transition: ^2.1.0 collection: ^1.17.1