-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #324 from guyluz11/dev
Moving vendors controll to the pacakge cbj_integrations_controller
- Loading branch information
Showing
323 changed files
with
182 additions
and
40,673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,39 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:cbj_hub/application/boot_up/boot_up.dart'; | ||
import 'package:cbj_hub/domain/local_db/i_local_db_repository.dart'; | ||
import 'package:cbj_hub/infrastructure/shared_variables.dart'; | ||
import 'package:cbj_hub/infrastructure/system_commands/device_pin_manager.dart'; | ||
import 'package:cbj_hub/injection.dart'; | ||
import 'package:cbj_hub/utils.dart'; | ||
import 'package:network_tools/network_tools.dart'; | ||
import 'package:cbj_hub/infrastructure/cbj_web_server/cbj_web_server_repository.dart'; | ||
import 'package:cbj_hub/infrastructure/mqtt_server/mqtt_server_repository.dart'; | ||
import 'package:cbj_integrations_controller/infrastructure/bindings/binding_repository.dart'; | ||
import 'package:cbj_integrations_controller/infrastructure/local_db/local_db_hive_repository.dart'; | ||
import 'package:cbj_integrations_controller/infrastructure/node_red/node_red_repository.dart'; | ||
import 'package:cbj_integrations_controller/infrastructure/room/saved_rooms_repo.dart'; | ||
import 'package:cbj_integrations_controller/infrastructure/routines/routine_repository.dart'; | ||
import 'package:cbj_integrations_controller/infrastructure/saved_devices/saved_devices_repo.dart'; | ||
import 'package:cbj_integrations_controller/infrastructure/scenes/scene_repository.dart'; | ||
import 'package:cbj_integrations_controller/infrastructure/shared_variables.dart'; | ||
import 'package:cbj_integrations_controller/infrastructure/system_commands/system_commands_manager_d.dart'; | ||
import 'package:cbj_integrations_controller/initialize_integrations_controller.dart'; | ||
import 'package:cbj_integrations_controller/injection.dart'; | ||
import 'package:network_tools/network_tools.dart' as network; | ||
|
||
Future<void> main(List<String> arguments) async { | ||
setInstancesOfRepos(); | ||
// arguments[0] is the location of the project | ||
configureNetworkTools('network_tools_db'); | ||
configureInjection(Env.prod); | ||
|
||
try { | ||
if (arguments.length > 1) { | ||
await getIt<SharedVariables>().asyncConstractor(arguments[0]); | ||
} else { | ||
await getIt<SharedVariables>().asyncConstractor(Directory.current.path); | ||
} | ||
} catch (error) { | ||
logger.w('Path/argument 1 is not specified\n$error'); | ||
} | ||
|
||
// Setting device model and checking if configuration for this model exist | ||
await DevicePinListManager().setPhysicalDeviceType(); | ||
|
||
await getIt<ILocalDbRepository>().initializeDb(); | ||
|
||
logger.t(''); | ||
network.configureNetworkTools('network_tools_db'); | ||
await initializeIntegrationsController(arguments: arguments, env: Env.devPc); | ||
|
||
await BootUp.setup(); | ||
} | ||
|
||
/// All instances of Repos | ||
void setInstancesOfRepos() { | ||
SystemCommandsManager(); | ||
MqttServerRepository(); | ||
CbjWebServerRepository(); | ||
SavedRoomsRepo(); | ||
SavedDevicesRepo(); | ||
RoutineCbjRepository(); | ||
HiveRepository(); | ||
NodeRedRepository(); | ||
BindingCbjRepository(); | ||
SceneCbjRepository(); | ||
SharedVariables(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
lib/domain/app_communication/i_app_communication_repository.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.