From 07d9b26ef0807cb906d615b61c0961a46c59ee95 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Sat, 9 Mar 2024 16:26:35 -0800 Subject: [PATCH] chore: move more files into src/ for types --- packages/cli/lib/cache/price_snapshot.dart | 1 - packages/cli/lib/nav/route.dart | 2 ++ packages/cli/test/behavior/advance_test.dart | 2 -- packages/db/test/transaction_test.dart | 2 +- packages/types/lib/{ => src}/behavior.dart | 0 packages/types/lib/src/market_price.dart | 1 - packages/types/lib/src/mount.dart | 4 +--- packages/types/lib/{ => src}/price.dart | 0 packages/types/lib/{ => src}/route.dart | 0 packages/types/lib/src/shipyard_price.dart | 1 - packages/types/lib/{ => src}/system.dart | 0 packages/types/lib/{ => src}/transaction.dart | 0 packages/types/lib/types.dart | 9 +++++---- packages/types/test/{ => src}/behavior_test.dart | 0 packages/types/test/{ => src}/system_test.dart | 0 packages/types/test/{ => src}/transaction_test.dart | 0 16 files changed, 9 insertions(+), 13 deletions(-) rename packages/types/lib/{ => src}/behavior.dart (100%) rename packages/types/lib/{ => src}/price.dart (100%) rename packages/types/lib/{ => src}/route.dart (100%) rename packages/types/lib/{ => src}/system.dart (100%) rename packages/types/lib/{ => src}/transaction.dart (100%) rename packages/types/test/{ => src}/behavior_test.dart (100%) rename packages/types/test/{ => src}/system_test.dart (100%) rename packages/types/test/{ => src}/transaction_test.dart (100%) diff --git a/packages/cli/lib/cache/price_snapshot.dart b/packages/cli/lib/cache/price_snapshot.dart index d4bef5af..b469498b 100644 --- a/packages/cli/lib/cache/price_snapshot.dart +++ b/packages/cli/lib/cache/price_snapshot.dart @@ -1,7 +1,6 @@ import 'package:cli/cli.dart'; import 'package:cli/config.dart'; import 'package:collection/collection.dart'; -import 'package:types/price.dart'; import 'package:types/types.dart'; /// A collection of price records. diff --git a/packages/cli/lib/nav/route.dart b/packages/cli/lib/nav/route.dart index 974377d3..f1eb6880 100644 --- a/packages/cli/lib/nav/route.dart +++ b/packages/cli/lib/nav/route.dart @@ -377,6 +377,8 @@ class RoutePlanner { final JumpCache _jumpCache; final bool Function(WaypointSymbol) _sellsFuel; + // TODO(eseidel): This shouldn't be public. + /// The connectivity used for this RoutePlanner. SystemConnectivity get systemConnectivity => _systemConnectivity; /// Clear any cached routing data. Called when jump gate availability changes diff --git a/packages/cli/test/behavior/advance_test.dart b/packages/cli/test/behavior/advance_test.dart index 3553c653..06eff2ed 100644 --- a/packages/cli/test/behavior/advance_test.dart +++ b/packages/cli/test/behavior/advance_test.dart @@ -23,8 +23,6 @@ class _MockShipNav extends Mock implements ShipNav {} class _MockShipNavRoute extends Mock implements ShipNavRoute {} -class _MockSystemConnectivity extends Mock implements SystemConnectivity {} - void main() { test('advanceShipBehavior idle does not spin hot', () async { final api = _MockApi(); diff --git a/packages/db/test/transaction_test.dart b/packages/db/test/transaction_test.dart index 70362284..4b61445d 100644 --- a/packages/db/test/transaction_test.dart +++ b/packages/db/test/transaction_test.dart @@ -1,6 +1,6 @@ import 'package:db/src/transaction.dart'; import 'package:test/test.dart'; -import 'package:types/transaction.dart'; +import 'package:types/types.dart'; void main() { test('Transaction round trip', () { diff --git a/packages/types/lib/behavior.dart b/packages/types/lib/src/behavior.dart similarity index 100% rename from packages/types/lib/behavior.dart rename to packages/types/lib/src/behavior.dart diff --git a/packages/types/lib/src/market_price.dart b/packages/types/lib/src/market_price.dart index c22576f1..d571f879 100644 --- a/packages/types/lib/src/market_price.dart +++ b/packages/types/lib/src/market_price.dart @@ -1,5 +1,4 @@ import 'package:meta/meta.dart'; -import 'package:types/price.dart'; import 'package:types/types.dart'; // {"waypointSymbol": "X1-ZS60-53675E", "symbol": "IRON_ORE", "supply": diff --git a/packages/types/lib/src/mount.dart b/packages/types/lib/src/mount.dart index 1a026b30..00eaa8aa 100644 --- a/packages/types/lib/src/mount.dart +++ b/packages/types/lib/src/mount.dart @@ -1,8 +1,6 @@ import 'package:meta/meta.dart'; import 'package:more/collection.dart'; -import 'package:types/api.dart'; -import 'package:types/behavior.dart'; -import 'package:types/src/symbol.dart'; +import 'package:types/types.dart'; /// Symbols of all cargo modules. final kCargoModules = { diff --git a/packages/types/lib/price.dart b/packages/types/lib/src/price.dart similarity index 100% rename from packages/types/lib/price.dart rename to packages/types/lib/src/price.dart diff --git a/packages/types/lib/route.dart b/packages/types/lib/src/route.dart similarity index 100% rename from packages/types/lib/route.dart rename to packages/types/lib/src/route.dart diff --git a/packages/types/lib/src/shipyard_price.dart b/packages/types/lib/src/shipyard_price.dart index c0a0dbc0..c7ac5c8d 100644 --- a/packages/types/lib/src/shipyard_price.dart +++ b/packages/types/lib/src/shipyard_price.dart @@ -1,5 +1,4 @@ import 'package:meta/meta.dart'; -import 'package:types/price.dart'; import 'package:types/types.dart'; /// Price data for a single ship type in a shipyard. diff --git a/packages/types/lib/system.dart b/packages/types/lib/src/system.dart similarity index 100% rename from packages/types/lib/system.dart rename to packages/types/lib/src/system.dart diff --git a/packages/types/lib/transaction.dart b/packages/types/lib/src/transaction.dart similarity index 100% rename from packages/types/lib/transaction.dart rename to packages/types/lib/src/transaction.dart diff --git a/packages/types/lib/types.dart b/packages/types/lib/types.dart index 0c693644..d83d50a0 100644 --- a/packages/types/lib/types.dart +++ b/packages/types/lib/types.dart @@ -1,8 +1,7 @@ export 'api.dart'; -export 'behavior.dart'; export 'enum.dart'; -export 'route.dart'; export 'src/agent.dart'; +export 'src/behavior.dart'; export 'src/charting_record.dart'; export 'src/construction.dart'; export 'src/contract.dart'; @@ -16,10 +15,12 @@ export 'src/market_listing.dart'; export 'src/market_price.dart'; export 'src/mount.dart'; export 'src/position.dart'; +export 'src/price.dart'; +export 'src/route.dart'; export 'src/shipyard_listing.dart'; export 'src/shipyard_price.dart'; export 'src/survey.dart'; export 'src/symbol.dart'; +export 'src/system.dart'; export 'src/trading.dart'; -export 'system.dart'; -export 'transaction.dart'; +export 'src/transaction.dart'; diff --git a/packages/types/test/behavior_test.dart b/packages/types/test/src/behavior_test.dart similarity index 100% rename from packages/types/test/behavior_test.dart rename to packages/types/test/src/behavior_test.dart diff --git a/packages/types/test/system_test.dart b/packages/types/test/src/system_test.dart similarity index 100% rename from packages/types/test/system_test.dart rename to packages/types/test/src/system_test.dart diff --git a/packages/types/test/transaction_test.dart b/packages/types/test/src/transaction_test.dart similarity index 100% rename from packages/types/test/transaction_test.dart rename to packages/types/test/src/transaction_test.dart