From ccfc4753885cb42fb20f134ae75874c316597af6 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Wed, 7 Jun 2023 19:09:56 +0200 Subject: [PATCH] dynamite: move TypeResult into it's own lib --- packages/dynamite/dynamite/lib/dynamite.dart | 8 +------- packages/dynamite/dynamite/lib/src/type_result/base.dart | 2 +- packages/dynamite/dynamite/lib/src/type_result/enum.dart | 2 +- packages/dynamite/dynamite/lib/src/type_result/list.dart | 2 +- packages/dynamite/dynamite/lib/src/type_result/map.dart | 2 +- .../dynamite/dynamite/lib/src/type_result/object.dart | 2 +- .../dynamite/lib/src/type_result/type_result.dart | 9 ++++++++- packages/dynamite/dynamite/test/type_result_test.dart | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/packages/dynamite/dynamite/lib/dynamite.dart b/packages/dynamite/dynamite/lib/dynamite.dart index c5397acb..ae668694 100644 --- a/packages/dynamite/dynamite/lib/dynamite.dart +++ b/packages/dynamite/dynamite/lib/dynamite.dart @@ -9,13 +9,7 @@ import 'package:dynamite/src/models/open_api.dart'; import 'package:dynamite/src/models/parameter.dart' as spec_parameter; import 'package:dynamite/src/models/path_item.dart'; import 'package:dynamite/src/models/schema.dart'; -import 'package:intersperse/intersperse.dart'; +import 'package:dynamite/src/type_result/type_result.dart'; import 'package:path/path.dart' as p; part 'src/openapi_builder.dart'; -part 'src/type_result/base.dart'; -part 'src/type_result/enum.dart'; -part 'src/type_result/list.dart'; -part 'src/type_result/map.dart'; -part 'src/type_result/object.dart'; -part 'src/type_result/type_result.dart'; diff --git a/packages/dynamite/dynamite/lib/src/type_result/base.dart b/packages/dynamite/dynamite/lib/src/type_result/base.dart index a9e93996..c8b5db5f 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/base.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/base.dart @@ -1,4 +1,4 @@ -part of '../../dynamite.dart'; +part of 'type_result.dart'; class TypeResultBase extends TypeResult { TypeResultBase( diff --git a/packages/dynamite/dynamite/lib/src/type_result/enum.dart b/packages/dynamite/dynamite/lib/src/type_result/enum.dart index 54e59a70..34901958 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/enum.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/enum.dart @@ -1,4 +1,4 @@ -part of '../../dynamite.dart'; +part of 'type_result.dart'; class TypeResultEnum extends TypeResult { TypeResultEnum( diff --git a/packages/dynamite/dynamite/lib/src/type_result/list.dart b/packages/dynamite/dynamite/lib/src/type_result/list.dart index db00cff9..472ccc83 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/list.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/list.dart @@ -1,4 +1,4 @@ -part of '../../dynamite.dart'; +part of 'type_result.dart'; class TypeResultList extends TypeResult { TypeResultList( diff --git a/packages/dynamite/dynamite/lib/src/type_result/map.dart b/packages/dynamite/dynamite/lib/src/type_result/map.dart index 6e0efdcc..c4d576cb 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/map.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/map.dart @@ -1,4 +1,4 @@ -part of '../../dynamite.dart'; +part of 'type_result.dart'; class TypeResultMap extends TypeResult { TypeResultMap( diff --git a/packages/dynamite/dynamite/lib/src/type_result/object.dart b/packages/dynamite/dynamite/lib/src/type_result/object.dart index c93c049c..47841de5 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/object.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/object.dart @@ -1,4 +1,4 @@ -part of '../../dynamite.dart'; +part of 'type_result.dart'; const _contentString = 'ContentString'; diff --git a/packages/dynamite/dynamite/lib/src/type_result/type_result.dart b/packages/dynamite/dynamite/lib/src/type_result/type_result.dart index 950fb70e..ed0d1d2e 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/type_result.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/type_result.dart @@ -1,4 +1,11 @@ -part of '../../dynamite.dart'; +import 'package:intersperse/intersperse.dart'; +import 'package:meta/meta.dart'; + +part 'base.dart'; +part 'enum.dart'; +part 'list.dart'; +part 'map.dart'; +part 'object.dart'; abstract class TypeResult { TypeResult( diff --git a/packages/dynamite/dynamite/test/type_result_test.dart b/packages/dynamite/dynamite/test/type_result_test.dart index 34ec95f4..903475f3 100644 --- a/packages/dynamite/dynamite/test/type_result_test.dart +++ b/packages/dynamite/dynamite/test/type_result_test.dart @@ -1,4 +1,4 @@ -import 'package:dynamite/dynamite.dart'; +import 'package:dynamite/src/type_result/type_result.dart'; import 'package:test/test.dart'; void main() {