meadow-integration 1.0.36 → 1.0.38
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": "meadow-integration",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"description": "Meadow Data Integration",
|
|
5
5
|
"retoldBeacon": {
|
|
6
6
|
"displayName": "Meadow Integration",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"author": "steven velozo <steven@velozo.com>",
|
|
49
49
|
"license": "MIT",
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"meadow-connection-sqlite": "^1.0.
|
|
51
|
+
"meadow-connection-sqlite": "^1.0.19",
|
|
52
52
|
"pict-docuserve": "^0.1.5",
|
|
53
53
|
"quackage": "^1.1.2"
|
|
54
54
|
},
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"fable-serviceproviderbase": "^3.0.19",
|
|
76
76
|
"fast-xml-parser": "^4.4.1",
|
|
77
77
|
"meadow": "^2.0.37",
|
|
78
|
-
"meadow-connection-mssql": "^1.0.
|
|
79
|
-
"meadow-connection-mysql": "^1.0.
|
|
80
|
-
"orator": "^6.0
|
|
78
|
+
"meadow-connection-mssql": "^1.0.22",
|
|
79
|
+
"meadow-connection-mysql": "^1.0.18",
|
|
80
|
+
"orator": "^6.1.0",
|
|
81
81
|
"orator-serviceserver-restify": "^2.0.10",
|
|
82
82
|
"pict-section-flow": "^0.0.17",
|
|
83
83
|
"pict-service-commandlineutility": "^1.0.19",
|
|
@@ -100,9 +100,25 @@ class MeadowIntegrationBeaconProvider
|
|
|
100
100
|
let tmpSettings = pWorkItem.Settings || {};
|
|
101
101
|
let tmpBeaconURL = tmpSettings.BeaconURL;
|
|
102
102
|
let tmpEntity = tmpSettings.EntityName;
|
|
103
|
-
let tmpRecords = tmpSettings.Records
|
|
103
|
+
let tmpRecords = tmpSettings.Records;
|
|
104
104
|
if (!tmpBeaconURL) { return fCallback(new Error('BeaconURL is required.')); }
|
|
105
105
|
if (!tmpEntity) { return fCallback(new Error('EntityName is required.')); }
|
|
106
|
+
// Defensive: catch the "engine left an unresolved {~D:~} string
|
|
107
|
+
// in Records" failure mode loudly instead of iterating over
|
|
108
|
+
// the string's characters and POSTing garbage. The execution
|
|
109
|
+
// engine's template resolver SHOULD substitute Array-typed
|
|
110
|
+
// settings whose value is a single whole-string reference,
|
|
111
|
+
// but if it doesn't (older engine, mis-wired graph) this
|
|
112
|
+
// catches it at the boundary with a useful message.
|
|
113
|
+
if (tmpRecords === undefined || tmpRecords === null) { tmpRecords = []; }
|
|
114
|
+
if (!Array.isArray(tmpRecords))
|
|
115
|
+
{
|
|
116
|
+
return fCallback(new Error(
|
|
117
|
+
`BulkInsertViaBeacon: Records must be an array, got ${typeof(tmpRecords)}` +
|
|
118
|
+
(typeof(tmpRecords) === 'string'
|
|
119
|
+
? ` (looks like an unresolved template: "${tmpRecords.slice(0, 80)}")`
|
|
120
|
+
: '')));
|
|
121
|
+
}
|
|
106
122
|
|
|
107
123
|
let tmpURL = new URL(tmpBeaconURL);
|
|
108
124
|
let tmpHttp = tmpURL.protocol === 'https:' ? require('https') : require('http');
|