ScriptCollection 3.5.26__py3-none-any.whl → 3.5.28__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ScriptCollection/ScriptCollectionCore.py +11 -1
- ScriptCollection/TasksForCommonProjectStructure.py +8 -3
- {ScriptCollection-3.5.26.dist-info → ScriptCollection-3.5.28.dist-info}/METADATA +2 -2
- {ScriptCollection-3.5.26.dist-info → ScriptCollection-3.5.28.dist-info}/RECORD +7 -7
- {ScriptCollection-3.5.26.dist-info → ScriptCollection-3.5.28.dist-info}/WHEEL +1 -1
- {ScriptCollection-3.5.26.dist-info → ScriptCollection-3.5.28.dist-info}/entry_points.txt +0 -0
- {ScriptCollection-3.5.26.dist-info → ScriptCollection-3.5.28.dist-info}/top_level.txt +0 -0
|
@@ -31,7 +31,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
31
31
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
32
32
|
from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
|
|
33
33
|
|
|
34
|
-
version = "3.5.
|
|
34
|
+
version = "3.5.28"
|
|
35
35
|
__version__ = version
|
|
36
36
|
|
|
37
37
|
|
|
@@ -44,9 +44,11 @@ class ScriptCollectionCore:
|
|
|
44
44
|
execute_program_really_if_no_mock_call_is_defined: bool = False
|
|
45
45
|
__mocked_program_calls: list = None
|
|
46
46
|
program_runner: ProgramRunnerBase = None
|
|
47
|
+
call_program_runner_directly: bool = None
|
|
47
48
|
|
|
48
49
|
def __init__(self):
|
|
49
50
|
self.program_runner = ProgramRunnerPopen()
|
|
51
|
+
self.call_program_runner_directly = None
|
|
50
52
|
self.__mocked_program_calls = list[ScriptCollectionCore.__MockProgramCall]()
|
|
51
53
|
|
|
52
54
|
@staticmethod
|
|
@@ -1234,6 +1236,8 @@ class ScriptCollectionCore:
|
|
|
1234
1236
|
# verbosity 2: If the exitcode of the executed program is not 0 then the StdErr will be logged. This is supposed to be the default verbosity-level.
|
|
1235
1237
|
# verbosity 3: Logs and prints StdOut and StdErr of the executed program in realtime.
|
|
1236
1238
|
# verbosity 4: Same as loglevel 3 but with some more overhead-information.
|
|
1239
|
+
if self.call_program_runner_directly:
|
|
1240
|
+
return self.program_runner.run_program_argsasarray(program, arguments_as_array, working_directory, custom_argument, interactive)
|
|
1237
1241
|
try:
|
|
1238
1242
|
arguments_as_str = ' '.join(arguments_as_array)
|
|
1239
1243
|
mock_loader_result = self.__try_load_mock(program, arguments_as_str, working_directory)
|
|
@@ -1323,11 +1327,15 @@ class ScriptCollectionCore:
|
|
|
1323
1327
|
# Return-values program_runner: Exitcode, StdOut, StdErr, Pid
|
|
1324
1328
|
@GeneralUtilities.check_arguments
|
|
1325
1329
|
def run_program(self, program: str, arguments: str = "", working_directory: str = None, verbosity: int = 1, print_errors_as_information: bool = False, log_file: str = None, timeoutInSeconds: int = 600, addLogOverhead: bool = False, title: str = None, log_namespace: str = "", arguments_for_log: list[str] = None, throw_exception_if_exitcode_is_not_zero: bool = True, custom_argument: object = None, interactive: bool = False) -> tuple[int, str, str, int]:
|
|
1330
|
+
if self.call_program_runner_directly:
|
|
1331
|
+
return self.program_runner.run_program(program, arguments, working_directory, custom_argument, interactive)
|
|
1326
1332
|
return self.run_program_argsasarray(program, GeneralUtilities.arguments_to_array(arguments), working_directory, verbosity, print_errors_as_information, log_file, timeoutInSeconds, addLogOverhead, title, log_namespace, arguments_for_log, throw_exception_if_exitcode_is_not_zero, custom_argument, interactive)
|
|
1327
1333
|
|
|
1328
1334
|
# Return-values program_runner: Pid
|
|
1329
1335
|
@GeneralUtilities.check_arguments
|
|
1330
1336
|
def run_program_argsasarray_async(self, program: str, arguments_as_array: list[str] = [], working_directory: str = None, verbosity: int = 1, print_errors_as_information: bool = False, log_file: str = None, timeoutInSeconds: int = 600, addLogOverhead: bool = False, title: str = None, log_namespace: str = "", arguments_for_log: list[str] = None, custom_argument: object = None, interactive: bool = False) -> int:
|
|
1337
|
+
if self.call_program_runner_directly:
|
|
1338
|
+
return self.program_runner.run_program_argsasarray_async(program, arguments_as_array, working_directory, custom_argument, interactive)
|
|
1331
1339
|
mock_loader_result = self.__try_load_mock(program, ' '.join(arguments_as_array), working_directory)
|
|
1332
1340
|
if mock_loader_result[0]:
|
|
1333
1341
|
return mock_loader_result[1]
|
|
@@ -1337,6 +1345,8 @@ class ScriptCollectionCore:
|
|
|
1337
1345
|
# Return-values program_runner: Pid
|
|
1338
1346
|
@GeneralUtilities.check_arguments
|
|
1339
1347
|
def run_program_async(self, program: str, arguments: str = "", working_directory: str = None, verbosity: int = 1, print_errors_as_information: bool = False, log_file: str = None, timeoutInSeconds: int = 600, addLogOverhead: bool = False, title: str = None, log_namespace: str = "", arguments_for_log: list[str] = None, custom_argument: object = None, interactive: bool = False) -> int:
|
|
1348
|
+
if self.call_program_runner_directly:
|
|
1349
|
+
return self.program_runner.run_program_argsasarray_async(program, arguments, working_directory, custom_argument, interactive)
|
|
1340
1350
|
return self.run_program_argsasarray_async(program, GeneralUtilities.arguments_to_array(arguments), working_directory, verbosity, print_errors_as_information, log_file, timeoutInSeconds, addLogOverhead, title, log_namespace, arguments_for_log, custom_argument, interactive)
|
|
1341
1351
|
|
|
1342
1352
|
@GeneralUtilities.check_arguments
|
|
@@ -1692,8 +1692,11 @@ class TasksForCommonProjectStructure:
|
|
|
1692
1692
|
GeneralUtilities.write_text_to_file(file, result)
|
|
1693
1693
|
|
|
1694
1694
|
@GeneralUtilities.check_arguments
|
|
1695
|
-
def do_npm_install(self, package_json_folder: str, verbosity: int) -> None:
|
|
1696
|
-
|
|
1695
|
+
def do_npm_install(self, package_json_folder: str,force:bool, verbosity: int) -> None:
|
|
1696
|
+
argument = "clean-install"
|
|
1697
|
+
if force:
|
|
1698
|
+
argument = f"{argument} --force"
|
|
1699
|
+
self.run_with_epew("npm", argument, package_json_folder, verbosity=verbosity)
|
|
1697
1700
|
|
|
1698
1701
|
@GeneralUtilities.check_arguments
|
|
1699
1702
|
def run_with_epew(self, program: str, argument: str = "", working_directory: str = None, verbosity: int = 1, print_errors_as_information: bool = False, log_file: str = None, timeoutInSeconds: int = 600, addLogOverhead: bool = False, title: str = None, log_namespace: str = "", arguments_for_log: list[str] = None, throw_exception_if_exitcode_is_not_zero: bool = True, custom_argument: object = None, interactive: bool = False) -> tuple[int, str, str, int]:
|
|
@@ -2129,10 +2132,12 @@ class TasksForCommonProjectStructure:
|
|
|
2129
2132
|
ce_source_folder = GeneralUtilities.resolve_relative_path("Other/Resources/DevelopmentCertificate", codeunit_folder)
|
|
2130
2133
|
ca_source_folder = GeneralUtilities.resolve_relative_path("Other/Resources/CA", codeunit_folder)
|
|
2131
2134
|
ce_target_folder = GeneralUtilities.resolve_relative_path("Other/Artifacts/DevelopmentCertificate", codeunit_folder)
|
|
2132
|
-
ca_target_folder = GeneralUtilities.resolve_relative_path("Other/Artifacts/
|
|
2135
|
+
ca_target_folder = GeneralUtilities.resolve_relative_path("Other/Artifacts/CA", codeunit_folder)
|
|
2133
2136
|
|
|
2137
|
+
GeneralUtilities.ensure_directory_does_not_exist(ce_target_folder)
|
|
2134
2138
|
GeneralUtilities.ensure_directory_exists(ce_target_folder)
|
|
2135
2139
|
GeneralUtilities.copy_content_of_folder(ce_source_folder, ce_target_folder)
|
|
2140
|
+
GeneralUtilities.ensure_directory_does_not_exist(ca_target_folder)
|
|
2136
2141
|
GeneralUtilities.ensure_directory_exists(ca_target_folder)
|
|
2137
2142
|
GeneralUtilities.copy_content_of_folder(ca_source_folder, ca_target_folder)
|
|
2138
2143
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ScriptCollection
|
|
3
|
-
Version: 3.5.
|
|
3
|
+
Version: 3.5.28
|
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
5
|
Home-page: https://github.com/anionDev/ScriptCollection
|
|
6
6
|
Author: Marius Göcke
|
|
@@ -23,7 +23,7 @@ Classifier: Topic :: Utilities
|
|
|
23
23
|
Requires-Python: >=3.10
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
25
|
Requires-Dist: build >=1.2.2.post1
|
|
26
|
-
Requires-Dist: coverage >=7.6.
|
|
26
|
+
Requires-Dist: coverage >=7.6.4
|
|
27
27
|
Requires-Dist: cyclonedx-bom >=5.0.0
|
|
28
28
|
Requires-Dist: defusedxml >=0.7.1
|
|
29
29
|
Requires-Dist: keyboard >=0.13.5
|
|
@@ -5,12 +5,12 @@ ScriptCollection/ProgramRunnerBase.py,sha256=7QAjoqOz6XPmJH19F2k-Z1fFQB_uZnPFvn-
|
|
|
5
5
|
ScriptCollection/ProgramRunnerEpew.py,sha256=C2Rs3YWOWWWJct7XmKphp5CF1tf0j4Fp-ljV2drLTfs,6349
|
|
6
6
|
ScriptCollection/ProgramRunnerPopen.py,sha256=G3LgQUVCfaq7XjBsGzalElH31Hbr0etttGR2_H87YzA,3512
|
|
7
7
|
ScriptCollection/RPStream.py,sha256=NRRHL3YSP3D9MuAV2jB_--0KUKCsvJGxeKnxgrRZ9kY,1545
|
|
8
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
9
|
-
ScriptCollection/TasksForCommonProjectStructure.py,sha256=
|
|
8
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=e-Yug2hQFohALDE2Ytga4Aw6KJH5yuFcNduTC_u-Cqs,101903
|
|
9
|
+
ScriptCollection/TasksForCommonProjectStructure.py,sha256=iZWDpFSF0VQotKpjGngs1bBy1-7sVEZiUFRUD08d5wo,194090
|
|
10
10
|
ScriptCollection/UpdateCertificates.py,sha256=Eynbgu7k9jLxApP2D_8Il77B6BFjJap6K7oTeEAZYbk,7790
|
|
11
11
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
ScriptCollection-3.5.
|
|
13
|
-
ScriptCollection-3.5.
|
|
14
|
-
ScriptCollection-3.5.
|
|
15
|
-
ScriptCollection-3.5.
|
|
16
|
-
ScriptCollection-3.5.
|
|
12
|
+
ScriptCollection-3.5.28.dist-info/METADATA,sha256=-e83nP7ReNYtSMAer-iMvtflmr4novJrC6sdxoHopkg,7684
|
|
13
|
+
ScriptCollection-3.5.28.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
14
|
+
ScriptCollection-3.5.28.dist-info/entry_points.txt,sha256=yASwR6hWZ_b5d4W49YeX1htD8ngfWbwgjpfQiJdtUAU,2322
|
|
15
|
+
ScriptCollection-3.5.28.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
16
|
+
ScriptCollection-3.5.28.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|