Fixed async handling for new command
This commit is contained in:
parent
b3b04f03ce
commit
9ab4013b4b
@ -15,7 +15,7 @@ __title__ = 'cpl_cli'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
@ -29,4 +29,4 @@ from .main import main
|
||||
from .startup import Startup
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.build'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.generate'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console.source'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console.source.name'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console.source.tests'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library.source'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library.source.name'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library.source.tests'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.publish'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.command'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
@ -28,4 +28,4 @@ from .publish_service import PublishService
|
||||
from .version_service import VersionService
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.configuration'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
@ -30,4 +30,4 @@ from .workspace_settings import WorkspaceSettings
|
||||
from .workspace_settings_name_enum import WorkspaceSettingsNameEnum
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Version": {
|
||||
"Major": "2021",
|
||||
"Minor": "10",
|
||||
"Micro": "3"
|
||||
"Micro": "3.post1"
|
||||
},
|
||||
"Author": "Sven Heidemann",
|
||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.live_server'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.publish'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
@ -24,4 +24,4 @@ from .publisher_abc import PublisherABC
|
||||
from .publisher_service import PublisherService
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -15,11 +15,11 @@ __title__ = 'cpl_cli.source_creator'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.10.3'
|
||||
__version__ = '2021.10.3.post1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3')
|
||||
version_info = VersionInfo(major='2021', minor='10', micro='3.post1')
|
||||
|
@ -72,6 +72,13 @@ class ConsoleBuilder:
|
||||
:param workspace:
|
||||
:return:
|
||||
"""
|
||||
src_rel_path = ''
|
||||
if '/' in project_name:
|
||||
old_pj_name = project_name
|
||||
parts = project_name.split('/')
|
||||
project_name = parts[len(parts) - 1]
|
||||
src_rel_path = old_pj_name.split(project_name)[0]
|
||||
|
||||
project_name_snake = String.convert_to_snake_case(project_name)
|
||||
|
||||
if workspace is None:
|
||||
|
@ -73,6 +73,13 @@ class LibraryBuilder:
|
||||
:param workspace:
|
||||
:return:
|
||||
"""
|
||||
src_rel_path = ''
|
||||
if '/' in project_name:
|
||||
old_pj_name = project_name
|
||||
parts = project_name.split('/')
|
||||
project_name = parts[len(parts) - 1]
|
||||
src_rel_path = old_pj_name.split(project_name)[0]
|
||||
|
||||
project_name_snake = String.convert_to_snake_case(project_name)
|
||||
|
||||
if workspace is None:
|
||||
@ -100,28 +107,29 @@ class LibraryBuilder:
|
||||
if not os.path.isdir(project_path):
|
||||
os.makedirs(project_path)
|
||||
|
||||
src_rel_path = ''
|
||||
src_name = project_name_snake
|
||||
if workspace is None:
|
||||
src_rel_path = os.path.join('src/', src_name)
|
||||
|
||||
if use_application_api:
|
||||
templates.append(ApplicationTemplate(src_name, src_rel_path))
|
||||
templates.append(ApplicationTemplate(
|
||||
src_name, src_rel_path, use_async))
|
||||
|
||||
if use_startup:
|
||||
templates.append(StartupTemplate(src_name, src_rel_path))
|
||||
templates.append(StartupTemplate(
|
||||
src_name, src_rel_path, use_async))
|
||||
templates.append(MainWithApplicationHostAndStartupTemplate(
|
||||
src_name, src_rel_path))
|
||||
src_name, src_rel_path, use_async))
|
||||
else:
|
||||
templates.append(MainWithApplicationBaseTemplate(
|
||||
src_name, src_rel_path))
|
||||
src_name, src_rel_path, use_async))
|
||||
else:
|
||||
if use_service_providing:
|
||||
templates.append(MainWithDependencyInjection(
|
||||
src_name, src_rel_path))
|
||||
src_name, src_rel_path, use_async))
|
||||
else:
|
||||
templates.append(MainWithoutApplicationBaseTemplate(
|
||||
src_name, src_rel_path))
|
||||
src_name, src_rel_path, use_async))
|
||||
|
||||
proj_name = project_name
|
||||
if workspace is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user