retold-data-service 2.0.39 → 2.0.43

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "retold-data-service",
3
- "version": "2.0.39",
3
+ "version": "2.0.43",
4
4
  "description": "Serve up a whole model!",
5
5
  "main": "source/Retold-Data-Service.js",
6
6
  "bin": {
@@ -62,7 +62,7 @@
62
62
  "meadow-connection-sqlite": "^1.0.18",
63
63
  "pict-docuserve": "^0.1.5",
64
64
  "puppeteer": "^24.40.0",
65
- "quackage": "^1.1.0",
65
+ "quackage": "^1.1.1",
66
66
  "stricture": "^4.0.2",
67
67
  "supertest": "^7.2.2"
68
68
  },
@@ -70,11 +70,11 @@
70
70
  "bibliograph": "^0.1.4",
71
71
  "fable": "^3.1.70",
72
72
  "fable-serviceproviderbase": "^3.0.19",
73
- "meadow": "^2.0.33",
74
- "meadow-connection-mysql": "^1.0.14",
73
+ "meadow": "^2.0.35",
74
+ "meadow-connection-mysql": "^1.0.17",
75
75
  "meadow-endpoints": "^4.0.15",
76
- "meadow-integration": "^1.0.32",
77
- "meadow-migrationmanager": "^0.0.10",
76
+ "meadow-integration": "^1.0.35",
77
+ "meadow-migrationmanager": "^0.0.13",
78
78
  "orator": "^6.0.4",
79
79
  "orator-http-proxy": "^1.0.5",
80
80
  "orator-serviceserver-restify": "^2.0.10",
@@ -70,6 +70,9 @@ class DataClonerApplication extends libPictApplication
70
70
  'connProvider', 'sqliteFilePath',
71
71
  'mysqlServer', 'mysqlPort', 'mysqlUser', 'mysqlPassword', 'mysqlDatabase', 'mysqlConnectionLimit',
72
72
  'mssqlServer', 'mssqlPort', 'mssqlUser', 'mssqlPassword', 'mssqlDatabase', 'mssqlConnectionLimit',
73
+ 'mssqlRequestTimeoutSec', 'mssqlConnectionTimeoutSec',
74
+ 'mssqlConnectMaxAttempts', 'mssqlDDLMaxAttempts',
75
+ 'mssqlRetryInitialDelaySec', 'mssqlRetryMaxDelaySec',
73
76
  'postgresqlHost', 'postgresqlPort', 'postgresqlUser', 'postgresqlPassword', 'postgresqlDatabase', 'postgresqlConnectionLimit',
74
77
  'solrHost', 'solrPort', 'solrCore', 'solrPath',
75
78
  'mongodbHost', 'mongodbPort', 'mongodbUser', 'mongodbPassword', 'mongodbDatabase', 'mongodbConnectionLimit',
@@ -53,6 +53,34 @@ class DataClonerConnectionView extends libPictView
53
53
  // level is < 110 (the parser rejects OFFSET/FETCH syntax
54
54
  // otherwise).
55
55
  tmpConfig.LegacyPagination = document.getElementById('mssqlLegacyPagination').checked;
56
+
57
+ // Reliability tuning — pull from the advanced settings block.
58
+ // All are optional; the connection provider falls back to
59
+ // sensible defaults when a value is missing or zero.
60
+ let tmpReqSec = parseInt(document.getElementById('mssqlRequestTimeoutSec').value, 10);
61
+ if (tmpReqSec > 0) tmpConfig.RequestTimeoutMs = tmpReqSec * 1000;
62
+ let tmpConnSec = parseInt(document.getElementById('mssqlConnectionTimeoutSec').value, 10);
63
+ if (tmpConnSec > 0) tmpConfig.ConnectionTimeoutMs = tmpConnSec * 1000;
64
+
65
+ let tmpConnectAttempts = parseInt(document.getElementById('mssqlConnectMaxAttempts').value, 10);
66
+ let tmpDDLAttempts = parseInt(document.getElementById('mssqlDDLMaxAttempts').value, 10);
67
+ let tmpInitialDelaySec = parseInt(document.getElementById('mssqlRetryInitialDelaySec').value, 10);
68
+ let tmpMaxDelaySec = parseInt(document.getElementById('mssqlRetryMaxDelaySec').value, 10);
69
+
70
+ if (tmpConnectAttempts > 0 || tmpInitialDelaySec > 0 || tmpMaxDelaySec > 0)
71
+ {
72
+ tmpConfig.ConnectRetryOptions = {};
73
+ if (tmpConnectAttempts > 0) tmpConfig.ConnectRetryOptions.MaxAttempts = tmpConnectAttempts;
74
+ if (tmpInitialDelaySec > 0) tmpConfig.ConnectRetryOptions.InitialDelayMs = tmpInitialDelaySec * 1000;
75
+ if (tmpMaxDelaySec > 0) tmpConfig.ConnectRetryOptions.MaxDelayMs = tmpMaxDelaySec * 1000;
76
+ }
77
+ if (tmpDDLAttempts > 0 || tmpInitialDelaySec > 0 || tmpMaxDelaySec > 0)
78
+ {
79
+ tmpConfig.DDLRetryOptions = {};
80
+ if (tmpDDLAttempts > 0) tmpConfig.DDLRetryOptions.MaxAttempts = tmpDDLAttempts;
81
+ if (tmpInitialDelaySec > 0) tmpConfig.DDLRetryOptions.InitialDelayMs = tmpInitialDelaySec * 1000;
82
+ if (tmpMaxDelaySec > 0) tmpConfig.DDLRetryOptions.MaxDelayMs = tmpMaxDelaySec * 1000;
83
+ }
56
84
  }
57
85
  else if (tmpProvider === 'PostgreSQL')
58
86
  {
@@ -300,6 +328,41 @@ module.exports.default_configuration =
300
328
  <input type="checkbox" id="mssqlLegacyPagination">
301
329
  <label for="mssqlLegacyPagination" title="Enable for SQL Server 2008 R2 / 2012 or databases at compatibility_level &lt; 110. Uses ROW_NUMBER() pagination instead of OFFSET/FETCH.">Legacy pagination (SQL Server &lt; 2012 / compat level &lt; 110)</label>
302
330
  </div>
331
+
332
+ <details style="margin-top:8px">
333
+ <summary style="cursor:pointer; font-weight:600">Reliability &amp; timeouts (advanced)</summary>
334
+ <p style="margin:8px 0; font-size:0.9em; color:#555">Tune these for slow / flaky customer networks. Connection and DDL operations will retry with exponential backoff, classifying each failure (NetworkError / RequestTimeout / PoolDegraded / ServerError) in the logs so the failure mode is obvious.</p>
335
+ <div class="inline-group">
336
+ <div>
337
+ <label for="mssqlRequestTimeoutSec">Request timeout (sec)</label>
338
+ <input type="number" id="mssqlRequestTimeoutSec" placeholder="120" value="120">
339
+ </div>
340
+ <div>
341
+ <label for="mssqlConnectionTimeoutSec">Connection timeout (sec)</label>
342
+ <input type="number" id="mssqlConnectionTimeoutSec" placeholder="60" value="60">
343
+ </div>
344
+ </div>
345
+ <div class="inline-group">
346
+ <div>
347
+ <label for="mssqlConnectMaxAttempts">Connect retries (max attempts)</label>
348
+ <input type="number" id="mssqlConnectMaxAttempts" placeholder="5" value="5" min="1" max="20">
349
+ </div>
350
+ <div>
351
+ <label for="mssqlDDLMaxAttempts">DDL retries (max attempts)</label>
352
+ <input type="number" id="mssqlDDLMaxAttempts" placeholder="5" value="5" min="1" max="20">
353
+ </div>
354
+ </div>
355
+ <div class="inline-group">
356
+ <div>
357
+ <label for="mssqlRetryInitialDelaySec">Retry initial delay (sec)</label>
358
+ <input type="number" id="mssqlRetryInitialDelaySec" placeholder="3" value="3" min="1" max="60">
359
+ </div>
360
+ <div>
361
+ <label for="mssqlRetryMaxDelaySec">Retry max delay (sec)</label>
362
+ <input type="number" id="mssqlRetryMaxDelaySec" placeholder="30" value="30" min="1" max="600">
363
+ </div>
364
+ </div>
365
+ </details>
303
366
  </div>
304
367
 
305
368
  <!-- PostgreSQL Config -->
@@ -4803,7 +4803,7 @@
4803
4803
  StatusDetailTimer: null,
4804
4804
  StatusDetailData: null,
4805
4805
  LastLiveStatus: null,
4806
- PersistFields: ['serverURL', 'authMethod', 'authURI', 'checkURI', 'cookieName', 'cookieValueAddr', 'cookieValueTemplate', 'loginMarker', 'userName', 'password', 'schemaURL', 'pageSize', 'dateTimePrecisionMS', 'connProvider', 'sqliteFilePath', 'mysqlServer', 'mysqlPort', 'mysqlUser', 'mysqlPassword', 'mysqlDatabase', 'mysqlConnectionLimit', 'mssqlServer', 'mssqlPort', 'mssqlUser', 'mssqlPassword', 'mssqlDatabase', 'mssqlConnectionLimit', 'postgresqlHost', 'postgresqlPort', 'postgresqlUser', 'postgresqlPassword', 'postgresqlDatabase', 'postgresqlConnectionLimit', 'solrHost', 'solrPort', 'solrCore', 'solrPath', 'mongodbHost', 'mongodbPort', 'mongodbUser', 'mongodbPassword', 'mongodbDatabase', 'mongodbConnectionLimit', 'rocksdbFolder', 'bibliographFolder', 'syncMaxRecords']
4806
+ PersistFields: ['serverURL', 'authMethod', 'authURI', 'checkURI', 'cookieName', 'cookieValueAddr', 'cookieValueTemplate', 'loginMarker', 'userName', 'password', 'schemaURL', 'pageSize', 'dateTimePrecisionMS', 'connProvider', 'sqliteFilePath', 'mysqlServer', 'mysqlPort', 'mysqlUser', 'mysqlPassword', 'mysqlDatabase', 'mysqlConnectionLimit', 'mssqlServer', 'mssqlPort', 'mssqlUser', 'mssqlPassword', 'mssqlDatabase', 'mssqlConnectionLimit', 'mssqlRequestTimeoutSec', 'mssqlConnectionTimeoutSec', 'mssqlConnectMaxAttempts', 'mssqlDDLMaxAttempts', 'mssqlRetryInitialDelaySec', 'mssqlRetryMaxDelaySec', 'postgresqlHost', 'postgresqlPort', 'postgresqlUser', 'postgresqlPassword', 'postgresqlDatabase', 'postgresqlConnectionLimit', 'solrHost', 'solrPort', 'solrCore', 'solrPath', 'mongodbHost', 'mongodbPort', 'mongodbUser', 'mongodbPassword', 'mongodbDatabase', 'mongodbConnectionLimit', 'rocksdbFolder', 'bibliographFolder', 'syncMaxRecords']
4807
4807
  };
4808
4808
 
4809
4809
  // Make pict available for inline onclick handlers
@@ -5869,6 +5869,30 @@
5869
5869
  // level is < 110 (the parser rejects OFFSET/FETCH syntax
5870
5870
  // otherwise).
5871
5871
  tmpConfig.LegacyPagination = document.getElementById('mssqlLegacyPagination').checked;
5872
+
5873
+ // Reliability tuning — pull from the advanced settings block.
5874
+ // All are optional; the connection provider falls back to
5875
+ // sensible defaults when a value is missing or zero.
5876
+ let tmpReqSec = parseInt(document.getElementById('mssqlRequestTimeoutSec').value, 10);
5877
+ if (tmpReqSec > 0) tmpConfig.RequestTimeoutMs = tmpReqSec * 1000;
5878
+ let tmpConnSec = parseInt(document.getElementById('mssqlConnectionTimeoutSec').value, 10);
5879
+ if (tmpConnSec > 0) tmpConfig.ConnectionTimeoutMs = tmpConnSec * 1000;
5880
+ let tmpConnectAttempts = parseInt(document.getElementById('mssqlConnectMaxAttempts').value, 10);
5881
+ let tmpDDLAttempts = parseInt(document.getElementById('mssqlDDLMaxAttempts').value, 10);
5882
+ let tmpInitialDelaySec = parseInt(document.getElementById('mssqlRetryInitialDelaySec').value, 10);
5883
+ let tmpMaxDelaySec = parseInt(document.getElementById('mssqlRetryMaxDelaySec').value, 10);
5884
+ if (tmpConnectAttempts > 0 || tmpInitialDelaySec > 0 || tmpMaxDelaySec > 0) {
5885
+ tmpConfig.ConnectRetryOptions = {};
5886
+ if (tmpConnectAttempts > 0) tmpConfig.ConnectRetryOptions.MaxAttempts = tmpConnectAttempts;
5887
+ if (tmpInitialDelaySec > 0) tmpConfig.ConnectRetryOptions.InitialDelayMs = tmpInitialDelaySec * 1000;
5888
+ if (tmpMaxDelaySec > 0) tmpConfig.ConnectRetryOptions.MaxDelayMs = tmpMaxDelaySec * 1000;
5889
+ }
5890
+ if (tmpDDLAttempts > 0 || tmpInitialDelaySec > 0 || tmpMaxDelaySec > 0) {
5891
+ tmpConfig.DDLRetryOptions = {};
5892
+ if (tmpDDLAttempts > 0) tmpConfig.DDLRetryOptions.MaxAttempts = tmpDDLAttempts;
5893
+ if (tmpInitialDelaySec > 0) tmpConfig.DDLRetryOptions.InitialDelayMs = tmpInitialDelaySec * 1000;
5894
+ if (tmpMaxDelaySec > 0) tmpConfig.DDLRetryOptions.MaxDelayMs = tmpMaxDelaySec * 1000;
5895
+ }
5872
5896
  } else if (tmpProvider === 'PostgreSQL') {
5873
5897
  tmpConfig.host = document.getElementById('postgresqlHost').value.trim() || '127.0.0.1';
5874
5898
  tmpConfig.port = parseInt(document.getElementById('postgresqlPort').value, 10) || 5432;
@@ -6066,6 +6090,41 @@
6066
6090
  <input type="checkbox" id="mssqlLegacyPagination">
6067
6091
  <label for="mssqlLegacyPagination" title="Enable for SQL Server 2008 R2 / 2012 or databases at compatibility_level &lt; 110. Uses ROW_NUMBER() pagination instead of OFFSET/FETCH.">Legacy pagination (SQL Server &lt; 2012 / compat level &lt; 110)</label>
6068
6092
  </div>
6093
+
6094
+ <details style="margin-top:8px">
6095
+ <summary style="cursor:pointer; font-weight:600">Reliability &amp; timeouts (advanced)</summary>
6096
+ <p style="margin:8px 0; font-size:0.9em; color:#555">Tune these for slow / flaky customer networks. Connection and DDL operations will retry with exponential backoff, classifying each failure (NetworkError / RequestTimeout / PoolDegraded / ServerError) in the logs so the failure mode is obvious.</p>
6097
+ <div class="inline-group">
6098
+ <div>
6099
+ <label for="mssqlRequestTimeoutSec">Request timeout (sec)</label>
6100
+ <input type="number" id="mssqlRequestTimeoutSec" placeholder="120" value="120">
6101
+ </div>
6102
+ <div>
6103
+ <label for="mssqlConnectionTimeoutSec">Connection timeout (sec)</label>
6104
+ <input type="number" id="mssqlConnectionTimeoutSec" placeholder="60" value="60">
6105
+ </div>
6106
+ </div>
6107
+ <div class="inline-group">
6108
+ <div>
6109
+ <label for="mssqlConnectMaxAttempts">Connect retries (max attempts)</label>
6110
+ <input type="number" id="mssqlConnectMaxAttempts" placeholder="5" value="5" min="1" max="20">
6111
+ </div>
6112
+ <div>
6113
+ <label for="mssqlDDLMaxAttempts">DDL retries (max attempts)</label>
6114
+ <input type="number" id="mssqlDDLMaxAttempts" placeholder="5" value="5" min="1" max="20">
6115
+ </div>
6116
+ </div>
6117
+ <div class="inline-group">
6118
+ <div>
6119
+ <label for="mssqlRetryInitialDelaySec">Retry initial delay (sec)</label>
6120
+ <input type="number" id="mssqlRetryInitialDelaySec" placeholder="3" value="3" min="1" max="60">
6121
+ </div>
6122
+ <div>
6123
+ <label for="mssqlRetryMaxDelaySec">Retry max delay (sec)</label>
6124
+ <input type="number" id="mssqlRetryMaxDelaySec" placeholder="30" value="30" min="1" max="600">
6125
+ </div>
6126
+ </div>
6127
+ </details>
6069
6128
  </div>
6070
6129
 
6071
6130
  <!-- PostgreSQL Config -->