retold-data-service 2.0.42 → 2.1.0
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.
- package/package.json +15 -13
- package/source/services/data-cloner/DataCloner-Command-Connection.js +41 -1
- package/source/services/data-cloner/pict-app/Pict-Application-DataCloner.js +50 -16
- package/source/services/data-cloner/pict-app/providers/Pict-Provider-DataCloner.js +185 -96
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Connection.js +181 -383
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Export.js +34 -57
- package/source/services/data-cloner/web/data-cloner.js +1116 -530
- package/source/services/data-cloner/web/data-cloner.js.map +1 -1
- package/source/services/data-cloner/web/data-cloner.min.js +1 -1
- package/source/services/data-cloner/web/data-cloner.min.js.map +1 -1
|
@@ -9,48 +9,14 @@ class DataClonerExportView extends libPictView
|
|
|
9
9
|
|
|
10
10
|
buildConfigObject()
|
|
11
11
|
{
|
|
12
|
-
|
|
12
|
+
// LocalDatabase block — schema-driven via the Connection view's
|
|
13
|
+
// getProviderConfig(). The wire format produced there matches
|
|
14
|
+
// what each meadow-connection provider expects (lowercase field
|
|
15
|
+
// names for SQL drivers, PascalCase for SQLite path, etc.).
|
|
16
|
+
let tmpConnInfo = this.pict.views['DataCloner-Connection'].getProviderConfig();
|
|
17
|
+
let tmpProvider = tmpConnInfo.Provider;
|
|
13
18
|
let tmpConfig = {};
|
|
14
|
-
|
|
15
|
-
// ---- Local Database ----
|
|
16
|
-
tmpConfig.LocalDatabase = { Provider: tmpProvider, Config: {} };
|
|
17
|
-
let tmpDbConfig = tmpConfig.LocalDatabase.Config;
|
|
18
|
-
|
|
19
|
-
if (tmpProvider === 'SQLite')
|
|
20
|
-
{
|
|
21
|
-
tmpDbConfig.SQLiteFilePath = document.getElementById('sqliteFilePath').value.trim() || '~/headlight-liveconnect-local/cloned.sqlite';
|
|
22
|
-
}
|
|
23
|
-
else if (tmpProvider === 'MySQL')
|
|
24
|
-
{
|
|
25
|
-
tmpDbConfig.host = document.getElementById('mysqlServer').value.trim() || '127.0.0.1';
|
|
26
|
-
tmpDbConfig.port = parseInt(document.getElementById('mysqlPort').value, 10) || 3306;
|
|
27
|
-
tmpDbConfig.user = document.getElementById('mysqlUser').value.trim() || 'root';
|
|
28
|
-
tmpDbConfig.password = document.getElementById('mysqlPassword').value;
|
|
29
|
-
tmpDbConfig.database = document.getElementById('mysqlDatabase').value.trim();
|
|
30
|
-
tmpDbConfig.connectionLimit = parseInt(document.getElementById('mysqlConnectionLimit').value, 10) || 20;
|
|
31
|
-
}
|
|
32
|
-
else if (tmpProvider === 'MSSQL')
|
|
33
|
-
{
|
|
34
|
-
tmpDbConfig.server = document.getElementById('mssqlServer').value.trim() || '127.0.0.1';
|
|
35
|
-
tmpDbConfig.port = parseInt(document.getElementById('mssqlPort').value, 10) || 1433;
|
|
36
|
-
tmpDbConfig.user = document.getElementById('mssqlUser').value.trim() || 'sa';
|
|
37
|
-
tmpDbConfig.password = document.getElementById('mssqlPassword').value;
|
|
38
|
-
tmpDbConfig.database = document.getElementById('mssqlDatabase').value.trim();
|
|
39
|
-
tmpDbConfig.connectionLimit = parseInt(document.getElementById('mssqlConnectionLimit').value, 10) || 20;
|
|
40
|
-
if (document.getElementById('mssqlLegacyPagination').checked)
|
|
41
|
-
{
|
|
42
|
-
tmpDbConfig.LegacyPagination = true;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
else if (tmpProvider === 'PostgreSQL')
|
|
46
|
-
{
|
|
47
|
-
tmpDbConfig.host = document.getElementById('postgresqlHost').value.trim() || '127.0.0.1';
|
|
48
|
-
tmpDbConfig.port = parseInt(document.getElementById('postgresqlPort').value, 10) || 5432;
|
|
49
|
-
tmpDbConfig.user = document.getElementById('postgresqlUser').value.trim() || 'postgres';
|
|
50
|
-
tmpDbConfig.password = document.getElementById('postgresqlPassword').value;
|
|
51
|
-
tmpDbConfig.database = document.getElementById('postgresqlDatabase').value.trim();
|
|
52
|
-
tmpDbConfig.max = parseInt(document.getElementById('postgresqlConnectionLimit').value, 10) || 10;
|
|
53
|
-
}
|
|
19
|
+
tmpConfig.LocalDatabase = { Provider: tmpProvider, Config: tmpConnInfo.Config || {} };
|
|
54
20
|
|
|
55
21
|
// ---- Remote Session ----
|
|
56
22
|
tmpConfig.RemoteSession = {};
|
|
@@ -126,7 +92,14 @@ class DataClonerExportView extends libPictView
|
|
|
126
92
|
|
|
127
93
|
buildMeadowIntegrationConfig()
|
|
128
94
|
{
|
|
129
|
-
|
|
95
|
+
// Pull current connection values via the schema-driven Connection
|
|
96
|
+
// view. buildConfigObject() above can use the result directly,
|
|
97
|
+
// but meadow-integration's clone CLI expects a slightly different
|
|
98
|
+
// destination shape — `server` instead of `host`, `ConnectionPoolLimit`
|
|
99
|
+
// instead of `connectionLimit` for MSSQL — so we adapt here.
|
|
100
|
+
let tmpConnInfo = this.pict.views['DataCloner-Connection'].getProviderConfig();
|
|
101
|
+
let tmpProvider = tmpConnInfo.Provider;
|
|
102
|
+
let tmpConfigConn = tmpConnInfo.Config || {};
|
|
130
103
|
let tmpConfig = {};
|
|
131
104
|
|
|
132
105
|
// ---- Source ----
|
|
@@ -142,25 +115,29 @@ class DataClonerExportView extends libPictView
|
|
|
142
115
|
if (tmpProvider === 'MySQL')
|
|
143
116
|
{
|
|
144
117
|
tmpConfig.Destination.Provider = 'MySQL';
|
|
145
|
-
tmpConfig.Destination.MySQL =
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
118
|
+
tmpConfig.Destination.MySQL =
|
|
119
|
+
{
|
|
120
|
+
server: tmpConfigConn.host || '127.0.0.1',
|
|
121
|
+
port: tmpConfigConn.port || 3306,
|
|
122
|
+
user: tmpConfigConn.user || 'root',
|
|
123
|
+
password: tmpConfigConn.password || '',
|
|
124
|
+
database: tmpConfigConn.database || 'meadow',
|
|
125
|
+
connectionLimit: tmpConfigConn.connectionLimit || 20
|
|
126
|
+
};
|
|
152
127
|
}
|
|
153
128
|
else if (tmpProvider === 'MSSQL')
|
|
154
129
|
{
|
|
155
130
|
tmpConfig.Destination.Provider = 'MSSQL';
|
|
156
|
-
tmpConfig.Destination.MSSQL =
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
131
|
+
tmpConfig.Destination.MSSQL =
|
|
132
|
+
{
|
|
133
|
+
server: tmpConfigConn.server || '127.0.0.1',
|
|
134
|
+
port: tmpConfigConn.port || 1433,
|
|
135
|
+
user: tmpConfigConn.user || 'sa',
|
|
136
|
+
password: tmpConfigConn.password || '',
|
|
137
|
+
database: tmpConfigConn.database || 'meadow',
|
|
138
|
+
ConnectionPoolLimit: tmpConfigConn.connectionLimit || 20
|
|
139
|
+
};
|
|
140
|
+
if (tmpConfigConn.LegacyPagination)
|
|
164
141
|
{
|
|
165
142
|
tmpConfig.Destination.MSSQL.LegacyPagination = true;
|
|
166
143
|
}
|