Bugfixes with live development server
This commit is contained in:
parent
bdb0548bc8
commit
3e59f01add
3
cpl.json
3
cpl.json
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "2021",
|
"Major": "2021",
|
||||||
"Minor": "04",
|
"Minor": "04",
|
||||||
"Micro": "01-1"
|
"Micro": "01-3"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
@ -18,6 +18,7 @@
|
|||||||
"Dependencies": [
|
"Dependencies": [
|
||||||
"mysql-connector==2.2.9",
|
"mysql-connector==2.2.9",
|
||||||
"psutil==5.8.0",
|
"psutil==5.8.0",
|
||||||
|
"packaging==20.9",
|
||||||
"pyfiglet==0.8.post1",
|
"pyfiglet==0.8.post1",
|
||||||
"pynput==1.7.3",
|
"pynput==1.7.3",
|
||||||
"SQLAlchemy==1.3.23",
|
"SQLAlchemy==1.3.23",
|
||||||
|
@ -15,11 +15,11 @@ __title__ = 'sh_cpl.cpl'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.application'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -28,4 +28,4 @@ from .application_runtime_abc import ApplicationRuntimeABC
|
|||||||
from .startup_abc import StartupABC
|
from .startup_abc import StartupABC
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.configuration'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -27,4 +27,4 @@ from .configuration_variable_name_enum import ConfigurationVariableNameEnum
|
|||||||
from .console_argument import ConsoleArgument
|
from .console_argument import ConsoleArgument
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.console'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -27,4 +27,4 @@ from .foreground_color_enum import ForegroundColorEnum
|
|||||||
from .spinner_thread import SpinnerThread
|
from .spinner_thread import SpinnerThread
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -241,7 +241,7 @@ class Console:
|
|||||||
|
|
||||||
Console.color_reset()
|
Console.color_reset()
|
||||||
Console.write('\n\n\nPress any key to continue...')
|
Console.write('\n\n\nPress any key to continue...')
|
||||||
Console.read_line()
|
Console.read()
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -292,7 +292,7 @@ class Console:
|
|||||||
if output is not None and not cls._hold_back:
|
if output is not None and not cls._hold_back:
|
||||||
cls.write_line(output)
|
cls.write_line(output)
|
||||||
|
|
||||||
return input()[0]
|
return input()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def read_line(cls, output: str = None) -> str:
|
def read_line(cls, output: str = None) -> str:
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.database'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -25,4 +25,4 @@ from .database_settings import DatabaseSettings
|
|||||||
from .database_settings_name_enum import DatabaseSettingsNameEnum
|
from .database_settings_name_enum import DatabaseSettingsNameEnum
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.database.connection'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,4 +24,4 @@ from .database_connection import DatabaseConnection
|
|||||||
from .database_connection_abc import DatabaseConnectionABC
|
from .database_connection_abc import DatabaseConnectionABC
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.database.context'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,4 +24,4 @@ from .database_context import DatabaseContext
|
|||||||
from .database_context_abc import DatabaseContextABC
|
from .database_context_abc import DatabaseContextABC
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.dependency_injection'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -25,4 +25,4 @@ from .service_provider import ServiceProvider
|
|||||||
from .service_provider_abc import ServiceProviderABC
|
from .service_provider_abc import ServiceProviderABC
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.environment'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -25,4 +25,4 @@ from .environment_name_enum import EnvironmentNameEnum
|
|||||||
from .application_environment import ApplicationEnvironment
|
from .application_environment import ApplicationEnvironment
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.logging'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -27,4 +27,4 @@ from .logging_settings import LoggingSettings
|
|||||||
from .logging_settings_name_enum import LoggingSettingsNameEnum
|
from .logging_settings_name_enum import LoggingSettingsNameEnum
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.mailing'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -27,4 +27,4 @@ from .email_client_settings import EMailClientSettings
|
|||||||
from .email_client_settings_name_enum import EMailClientSettingsNameEnum
|
from .email_client_settings_name_enum import EMailClientSettingsNameEnum
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.time'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,4 +24,4 @@ from .time_format_settings import TimeFormatSettings
|
|||||||
from .time_format_settings_names_enum import TimeFormatSettingsNamesEnum
|
from .time_format_settings_names_enum import TimeFormatSettingsNamesEnum
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl.utils'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -25,4 +25,4 @@ from .string import String
|
|||||||
from .pip import Pip
|
from .pip import Pip
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'sh_cpl.cpl_cli'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -29,4 +29,4 @@ from .main import main
|
|||||||
from .startup import Startup
|
from .startup import Startup
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
import threading
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from cpl.application.application_abc import ApplicationABC
|
from cpl.application.application_abc import ApplicationABC
|
||||||
|
from cpl.console.console import Console
|
||||||
from cpl_cli.command.build_service import BuildService
|
from cpl_cli.command.build_service import BuildService
|
||||||
from cpl_cli.command.generate_service import GenerateService
|
from cpl_cli.command.generate_service import GenerateService
|
||||||
from cpl_cli.command.install_service import InstallService
|
from cpl_cli.command.install_service import InstallService
|
||||||
@ -45,21 +47,24 @@ class CLI(ApplicationABC):
|
|||||||
Entry point of the CPL CLI
|
Entry point of the CPL CLI
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
command = None
|
try:
|
||||||
args = []
|
command = None
|
||||||
if len(self._configuration.additional_arguments) > 0:
|
args = []
|
||||||
command = self._configuration.additional_arguments[0]
|
if len(self._configuration.additional_arguments) > 0:
|
||||||
if len(self._configuration.additional_arguments) > 1:
|
command = self._configuration.additional_arguments[0]
|
||||||
args = self._configuration.additional_arguments[1:]
|
if len(self._configuration.additional_arguments) > 1:
|
||||||
else:
|
args = self._configuration.additional_arguments[1:]
|
||||||
for cmd in self._command_handler.commands:
|
else:
|
||||||
result = self._configuration.get_configuration(cmd.name)
|
for cmd in self._command_handler.commands:
|
||||||
if result is not None:
|
result = self._configuration.get_configuration(cmd.name)
|
||||||
command = cmd.name
|
if result is not None:
|
||||||
args.append(result)
|
command = cmd.name
|
||||||
|
args.append(result)
|
||||||
|
|
||||||
if command is None:
|
if command is None:
|
||||||
Error.error(f'Expected command')
|
Error.error(f'Expected command')
|
||||||
return
|
return
|
||||||
|
|
||||||
self._command_handler.handle(command, args)
|
self._command_handler.handle(command, args)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
exit()
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.command'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -28,4 +28,4 @@ from .publish_service import PublishService
|
|||||||
from .version_service import VersionService
|
from .version_service import VersionService
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.configuration'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -28,4 +28,4 @@ from .version_settings import VersionSettings
|
|||||||
from .version_settings_name_enum import VersionSettingsNameEnum
|
from .version_settings_name_enum import VersionSettingsNameEnum
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.live_server'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -28,7 +28,7 @@ class LiveServerService(ServiceABC, FileSystemEventHandler):
|
|||||||
self._build_settings = build_settings
|
self._build_settings = build_settings
|
||||||
|
|
||||||
self._src_dir = os.path.join(self._runtime.working_directory, self._build_settings.source_path)
|
self._src_dir = os.path.join(self._runtime.working_directory, self._build_settings.source_path)
|
||||||
self._ls_thread = LiveServerThread(self._src_dir)
|
self._ls_thread = None
|
||||||
self._observer = None
|
self._observer = None
|
||||||
|
|
||||||
def _start_observer(self):
|
def _start_observer(self):
|
||||||
@ -54,10 +54,7 @@ class LiveServerService(ServiceABC, FileSystemEventHandler):
|
|||||||
while self._ls_thread.is_alive():
|
while self._ls_thread.is_alive():
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
self._ls_thread = LiveServerThread(self._src_dir)
|
self._start()
|
||||||
self._ls_thread.start()
|
|
||||||
|
|
||||||
self._start_observer()
|
|
||||||
|
|
||||||
def on_modified(self, event):
|
def on_modified(self, event):
|
||||||
"""
|
"""
|
||||||
@ -73,14 +70,17 @@ class LiveServerService(ServiceABC, FileSystemEventHandler):
|
|||||||
self._observer.stop()
|
self._observer.stop()
|
||||||
self._restart()
|
self._restart()
|
||||||
|
|
||||||
|
def _start(self):
|
||||||
|
self._start_observer()
|
||||||
|
self._ls_thread = LiveServerThread(self._src_dir)
|
||||||
|
self._ls_thread.start()
|
||||||
|
self._ls_thread.join()
|
||||||
|
Console.close()
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
"""
|
"""
|
||||||
Starts the CPL live development server
|
Starts the CPL live development server
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
Console.write_line('** CPL live development server is running **')
|
Console.write_line('** CPL live development server is running **')
|
||||||
self._start_observer()
|
self._start()
|
||||||
self._ls_thread.start()
|
|
||||||
|
|
||||||
Console.close()
|
|
||||||
Console.write('\n')
|
|
||||||
|
@ -4,7 +4,8 @@ import sys
|
|||||||
import threading
|
import threading
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from cpl.console import Console
|
from cpl.console.console import Console
|
||||||
|
from cpl.console.foreground_color_enum import ForegroundColorEnum
|
||||||
|
|
||||||
|
|
||||||
class LiveServerThread(threading.Thread):
|
class LiveServerThread(threading.Thread):
|
||||||
@ -38,9 +39,12 @@ class LiveServerThread(threading.Thread):
|
|||||||
Console.error('Entry point main.py not found')
|
Console.error('Entry point main.py not found')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Console.set_foreground_color(ForegroundColorEnum.green)
|
||||||
Console.write_line('Read successfully')
|
Console.write_line('Read successfully')
|
||||||
|
Console.set_foreground_color(ForegroundColorEnum.cyan)
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
Console.write_line(f'Started at {now.strftime("%Y-%m-%d %H:%M:%S")}\n\n')
|
Console.write_line(f'Started at {now.strftime("%Y-%m-%d %H:%M:%S")}\n\n')
|
||||||
|
Console.set_foreground_color(ForegroundColorEnum.default)
|
||||||
|
|
||||||
self._command = [sys.executable, self._main, ''.join(sys.argv[2:])]
|
self._command = [sys.executable, self._main, ''.join(sys.argv[2:])]
|
||||||
subprocess.run(self._command)
|
subprocess.run(self._command)
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.publish'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,4 +24,4 @@ from .publisher_abc import PublisherABC
|
|||||||
from .publisher_service import PublisherService
|
from .publisher_service import PublisherService
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.build'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.generate'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.console'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.console.src'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.console.src.tests'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.publish'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||||
__version__ = '2021.4.1.post1'
|
__version__ = '2021.4.1.post3'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2021', minor='04', micro='01-1')
|
version_info = VersionInfo(major='2021', minor='04', micro='01-3')
|
||||||
|
0
src/tests/custom/cpl-test/LICENSE
Normal file
0
src/tests/custom/cpl-test/LICENSE
Normal file
0
src/tests/custom/cpl-test/README.md
Normal file
0
src/tests/custom/cpl-test/README.md
Normal file
38
src/tests/custom/cpl-test/cpl.json
Normal file
38
src/tests/custom/cpl-test/cpl.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"ProjectSettings": {
|
||||||
|
"Name": "cpl-test",
|
||||||
|
"Version": {
|
||||||
|
"Major": "0",
|
||||||
|
"Minor": "0",
|
||||||
|
"Micro": "0"
|
||||||
|
},
|
||||||
|
"Author": "",
|
||||||
|
"AuthorEmail": "",
|
||||||
|
"Description": "",
|
||||||
|
"LongDescription": "",
|
||||||
|
"URL": "",
|
||||||
|
"CopyrightDate": "",
|
||||||
|
"CopyrightName": "",
|
||||||
|
"LicenseName": "",
|
||||||
|
"LicenseDescription": "",
|
||||||
|
"Dependencies": [
|
||||||
|
"sh_cpl==2021.4.1.post2"
|
||||||
|
],
|
||||||
|
"PythonVersion": ">=3.9.2",
|
||||||
|
"Classifiers": []
|
||||||
|
},
|
||||||
|
"BuildSettings": {
|
||||||
|
"SourcePath": "src",
|
||||||
|
"OutputPath": "dist",
|
||||||
|
"Main": "main",
|
||||||
|
"EntryPoint": "cpl-test",
|
||||||
|
"IncludePackageData": "False",
|
||||||
|
"Included": [],
|
||||||
|
"Excluded": [
|
||||||
|
"*/__pycache__",
|
||||||
|
"*/logs",
|
||||||
|
"*/tests"
|
||||||
|
],
|
||||||
|
"PackageData": {}
|
||||||
|
}
|
||||||
|
}
|
10
src/tests/custom/cpl-test/src/main.py
Normal file
10
src/tests/custom/cpl-test/src/main.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from cpl.console.console import Console
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
Console.write_line('Hello World')
|
||||||
|
Console.write_line('Dies ist ein test')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
1
src/tests/custom/cpl-test/src/tests/__init__.py
Normal file
1
src/tests/custom/cpl-test/src/tests/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
# imports:
|
Loading…
Reference in New Issue
Block a user