-
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 #326 from CyBear-Jinni/dev
Dev
- Loading branch information
Showing
350 changed files
with
198 additions
and
43,222 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,45 @@ | ||
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: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'; | ||
|
||
Future<void> main(List<String> arguments) async { | ||
// arguments[0] is the location of the project | ||
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(); | ||
configureNetworkTools('network_tools_db'); | ||
|
||
logger.v(''); | ||
setInstancesOfRepos(arguments.firstOrNull ?? Directory.current.path); | ||
// arguments[0] is the location of the project | ||
await initializeIntegrationsController( | ||
projectRootDirectoryPath: arguments.firstOrNull ?? Directory.current.path, | ||
env: Env.devPc, | ||
); | ||
|
||
await BootUp.setup(); | ||
} | ||
|
||
/// All instances of Repos | ||
void setInstancesOfRepos(String projectRootDirectoryPath) { | ||
SystemCommandsManager(); | ||
MqttServerRepository(); | ||
CbjWebServerRepository(); | ||
SavedRoomsRepo(); | ||
SavedDevicesRepo(); | ||
RoutineCbjRepository(); | ||
HiveRepository(); | ||
NodeRedRepository(); | ||
BindingCbjRepository(); | ||
SceneCbjRepository(); | ||
SharedVariables(projectRootDirectoryPath); | ||
} |
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.