db-sync-tool-kmi 2.11.8__tar.gz → 2.11.10__tar.gz
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.
Potentially problematic release.
This version of db-sync-tool-kmi might be problematic. Click here for more details.
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/PKG-INFO +15 -2
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/README.md +2 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/info.py +1 -1
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/typo3.py +11 -19
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/helper.py +25 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/PKG-INFO +16 -3
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/LICENSE +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/__init__.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/__main__.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/database/__init__.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/database/process.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/database/utility.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/__init__.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/drupal.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/laravel.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/symfony.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/wordpress.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/__init__.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/client.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/rsync.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/system.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/transfer.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/utility.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/sync.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/__init__.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/info.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/log.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/mode.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/output.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/parser.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/system.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/validation.py +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/SOURCES.txt +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/dependency_links.txt +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/entry_points.txt +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/requires.txt +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/top_level.txt +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/setup.cfg +0 -0
- {db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: db_sync_tool-kmi
|
|
3
|
-
Version: 2.11.
|
|
3
|
+
Version: 2.11.10
|
|
4
4
|
Summary: Synchronize a database from and to host systems.
|
|
5
5
|
Home-page: https://github.com/jackd248/db-sync-tool
|
|
6
6
|
Author: Konrad Michalik
|
|
@@ -28,11 +28,24 @@ Requires-Dist: jsonschema>=4.2.1
|
|
|
28
28
|
Requires-Dist: requests>=2.26.0
|
|
29
29
|
Requires-Dist: semantic_version>=2.8.5
|
|
30
30
|
Requires-Dist: yaspin>=2.1
|
|
31
|
+
Dynamic: author
|
|
32
|
+
Dynamic: author-email
|
|
33
|
+
Dynamic: classifier
|
|
34
|
+
Dynamic: description
|
|
35
|
+
Dynamic: description-content-type
|
|
36
|
+
Dynamic: home-page
|
|
37
|
+
Dynamic: license
|
|
38
|
+
Dynamic: license-file
|
|
39
|
+
Dynamic: requires-dist
|
|
40
|
+
Dynamic: requires-python
|
|
41
|
+
Dynamic: summary
|
|
31
42
|
|
|
32
43
|
# db sync tool
|
|
33
44
|
|
|
34
45
|

|
|
35
46
|

|
|
47
|
+

|
|
48
|
+

|
|
36
49
|
[](https://scrutinizer-ci.com/g/jackd248/db-sync-tool/?branch=master)
|
|
37
50
|
[](https://scrutinizer-ci.com/g/jackd248/db-sync-tool/build-status/master)
|
|
38
51
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
5
|
+

|
|
6
|
+

|
|
5
7
|
[](https://scrutinizer-ci.com/g/jackd248/db-sync-tool/?branch=master)
|
|
6
8
|
[](https://scrutinizer-ci.com/g/jackd248/db-sync-tool/build-status/master)
|
|
7
9
|
|
|
@@ -30,14 +30,16 @@ def check_configuration(client):
|
|
|
30
30
|
_db_config = parse_database_credentials(json.loads(stdout)['DB'])
|
|
31
31
|
elif '.env' in _path:
|
|
32
32
|
# Try to parse settings from .env file
|
|
33
|
+
if 'db' not in system.config[client]:
|
|
34
|
+
system.config[client]['db'] = {}
|
|
35
|
+
|
|
33
36
|
_db_config = {
|
|
34
|
-
'name': get_database_setting_from_env(client, 'TYPO3_CONF_VARS__DB__Connections__Default__dbname', system.config[client]['path']),
|
|
35
|
-
'host': get_database_setting_from_env(client, 'TYPO3_CONF_VARS__DB__Connections__Default__host', system.config[client]['path']),
|
|
36
|
-
'password': get_database_setting_from_env(client, 'TYPO3_CONF_VARS__DB__Connections__Default__password', system.config[client]['path']),
|
|
37
|
-
'port': get_database_setting_from_env(client, 'TYPO3_CONF_VARS__DB__Connections__Default__port', system.config[client]['path'])
|
|
38
|
-
if get_database_setting_from_env(client, 'TYPO3_CONF_VARS__DB__Connections__Default__port',
|
|
39
|
-
|
|
40
|
-
'user': get_database_setting_from_env(client, 'TYPO3_CONF_VARS__DB__Connections__Default__user', system.config[client]['path']),
|
|
37
|
+
'name': get_database_setting_from_env(client, system.config[client]['db'].get('name', 'TYPO3_CONF_VARS__DB__Connections__Default__dbname'), system.config[client]['path']),
|
|
38
|
+
'host': get_database_setting_from_env(client, system.config[client]['db'].get('host', 'TYPO3_CONF_VARS__DB__Connections__Default__host'), system.config[client]['path']),
|
|
39
|
+
'password': get_database_setting_from_env(client, system.config[client]['db'].get('password', 'TYPO3_CONF_VARS__DB__Connections__Default__password'), system.config[client]['path']),
|
|
40
|
+
'port': get_database_setting_from_env(client, system.config[client]['db'].get('port', 'TYPO3_CONF_VARS__DB__Connections__Default__port'), system.config[client]['path'])
|
|
41
|
+
if get_database_setting_from_env(client, system.config[client]['db'].get('port', 'TYPO3_CONF_VARS__DB__Connections__Default__port'), system.config[client]['path']) != '' else 3306,
|
|
42
|
+
'user': get_database_setting_from_env(client, system.config[client]['db'].get('user', 'TYPO3_CONF_VARS__DB__Connections__Default__user'), system.config[client]['path']),
|
|
41
43
|
}
|
|
42
44
|
elif 'AdditionalConfiguration.php' in _path:
|
|
43
45
|
# Try to parse settings from AdditionalConfiguration.php file
|
|
@@ -94,12 +96,7 @@ def get_database_setting_from_additional_configuration(client, name, file):
|
|
|
94
96
|
:param file: String
|
|
95
97
|
:return:
|
|
96
98
|
"""
|
|
97
|
-
return
|
|
98
|
-
helper.get_command(client, 'sed') +
|
|
99
|
-
f' -nE "s/\'{name}\'.*=>.*\'(.*)\'.*$/\\1/p" {file}',
|
|
100
|
-
client,
|
|
101
|
-
True
|
|
102
|
-
).replace('\n', '').strip()
|
|
99
|
+
return helper.run_sed_command(client, f'"s/\'{name}\'.*=>.*\'(.*)\'.*$/\\1/p" {file}')
|
|
103
100
|
|
|
104
101
|
def get_database_setting_from_env(client, name, file):
|
|
105
102
|
"""
|
|
@@ -110,9 +107,4 @@ def get_database_setting_from_env(client, name, file):
|
|
|
110
107
|
:param file: String
|
|
111
108
|
:return:
|
|
112
109
|
"""
|
|
113
|
-
return
|
|
114
|
-
helper.get_command(client, 'sed') +
|
|
115
|
-
f' -nE "s/{name}=(.*).*$/\\1/p" {file}',
|
|
116
|
-
client,
|
|
117
|
-
True
|
|
118
|
-
).replace('\n', '').strip()
|
|
110
|
+
return helper.run_sed_command(client, f'"s/{name}=(.*).*$/\\1/p" {file}')
|
|
@@ -351,3 +351,28 @@ def remove_surrounding_quotes(s):
|
|
|
351
351
|
elif s.startswith("'") and s.endswith("'"):
|
|
352
352
|
return s[1:-1]
|
|
353
353
|
return s
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
def run_sed_command(client, command):
|
|
357
|
+
"""
|
|
358
|
+
Executes a sed command on the specified client, trying -E first and falling back to -r if -E fails.
|
|
359
|
+
|
|
360
|
+
:param client: The client on which the sed command should be executed.
|
|
361
|
+
:param command: The sed command to execute (excluding the sed options).
|
|
362
|
+
:return: The result of the sed command as a cleaned string (with newlines removed).
|
|
363
|
+
"""
|
|
364
|
+
# Check if the client supports -E or -r option for sed
|
|
365
|
+
option = mode.run_command(
|
|
366
|
+
f"echo | {get_command(client, 'sed')} -E '' >/dev/null 2>&1 && echo -E || (echo | {get_command(client, 'sed')} -r '' >/dev/null 2>&1 && echo -r)",
|
|
367
|
+
client,
|
|
368
|
+
True
|
|
369
|
+
)
|
|
370
|
+
# If neither option is supported, default to -E
|
|
371
|
+
if option == '':
|
|
372
|
+
option = '-E'
|
|
373
|
+
|
|
374
|
+
return mode.run_command(
|
|
375
|
+
f"{get_command(client, 'sed')} -n {option} {command}",
|
|
376
|
+
client,
|
|
377
|
+
True
|
|
378
|
+
).strip().replace('\n', '')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version: 2.11.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: db_sync_tool-kmi
|
|
3
|
+
Version: 2.11.10
|
|
4
4
|
Summary: Synchronize a database from and to host systems.
|
|
5
5
|
Home-page: https://github.com/jackd248/db-sync-tool
|
|
6
6
|
Author: Konrad Michalik
|
|
@@ -28,11 +28,24 @@ Requires-Dist: jsonschema>=4.2.1
|
|
|
28
28
|
Requires-Dist: requests>=2.26.0
|
|
29
29
|
Requires-Dist: semantic_version>=2.8.5
|
|
30
30
|
Requires-Dist: yaspin>=2.1
|
|
31
|
+
Dynamic: author
|
|
32
|
+
Dynamic: author-email
|
|
33
|
+
Dynamic: classifier
|
|
34
|
+
Dynamic: description
|
|
35
|
+
Dynamic: description-content-type
|
|
36
|
+
Dynamic: home-page
|
|
37
|
+
Dynamic: license
|
|
38
|
+
Dynamic: license-file
|
|
39
|
+
Dynamic: requires-dist
|
|
40
|
+
Dynamic: requires-python
|
|
41
|
+
Dynamic: summary
|
|
31
42
|
|
|
32
43
|
# db sync tool
|
|
33
44
|
|
|
34
45
|

|
|
35
46
|

|
|
47
|
+

|
|
48
|
+

|
|
36
49
|
[](https://scrutinizer-ci.com/g/jackd248/db-sync-tool/?branch=master)
|
|
37
50
|
[](https://scrutinizer-ci.com/g/jackd248/db-sync-tool/build-status/master)
|
|
38
51
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{db_sync_tool-kmi-2.11.8 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|