@lingk/sync 2.2.5 → 2.2.7
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/build/credentialSections.js +34 -14
- package/build/credentialSections.js.map +1 -1
- package/build/lightning.js.map +1 -1
- package/build/lightningStyles.js.map +1 -1
- package/build/lingk.js.map +1 -1
- package/build/lingkStyles.js.map +1 -1
- package/build/loadData.js.map +1 -1
- package/build/main.js +34 -14
- package/build/main.js.map +1 -1
- package/build/metadataDropdown.js.map +1 -1
- package/build/metadataFunctions.js.map +1 -1
- package/build/reducer.js.map +1 -1
- package/build/saveData.js.map +1 -1
- package/package.json +1 -1
|
@@ -5404,6 +5404,7 @@ module.exports =
|
|
|
5404
5404
|
var _this = _possibleConstructorReturn(this, (FlatFile.__proto__ || Object.getPrototypeOf(FlatFile)).call(this));
|
|
5405
5405
|
|
|
5406
5406
|
_this.parseJsonFile = function (content, file) {
|
|
5407
|
+
console.log("content", content);
|
|
5407
5408
|
// READ THE JSON
|
|
5408
5409
|
var json = void 0;
|
|
5409
5410
|
try {
|
|
@@ -5413,19 +5414,39 @@ module.exports =
|
|
|
5413
5414
|
}
|
|
5414
5415
|
if (json) {
|
|
5415
5416
|
var fields = [];
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5417
|
+
try {
|
|
5418
|
+
var isArray = Array.isArray(json);
|
|
5419
|
+
if (isArray) {
|
|
5420
|
+
json.forEach(function (row) {
|
|
5421
|
+
Object.keys(row).forEach(function (col) {
|
|
5422
|
+
if (!fields.find(function (f) {
|
|
5423
|
+
return f.label === col;
|
|
5424
|
+
})) {
|
|
5425
|
+
fields.push({
|
|
5426
|
+
label: col,
|
|
5427
|
+
name: col,
|
|
5428
|
+
type: row[col] && _typeof(row[col])
|
|
5429
|
+
});
|
|
5430
|
+
}
|
|
5425
5431
|
});
|
|
5426
|
-
}
|
|
5427
|
-
}
|
|
5428
|
-
|
|
5432
|
+
});
|
|
5433
|
+
} else {
|
|
5434
|
+
Object.keys(json).forEach(function (col) {
|
|
5435
|
+
if (!fields.find(function (f) {
|
|
5436
|
+
return f.label === col;
|
|
5437
|
+
})) {
|
|
5438
|
+
fields.push({
|
|
5439
|
+
label: col,
|
|
5440
|
+
name: col,
|
|
5441
|
+
type: json[col] && _typeof(json[col])
|
|
5442
|
+
});
|
|
5443
|
+
}
|
|
5444
|
+
});
|
|
5445
|
+
}
|
|
5446
|
+
} catch (e) {
|
|
5447
|
+
_this.setState({ dropError: e });
|
|
5448
|
+
}
|
|
5449
|
+
|
|
5429
5450
|
var meta = {
|
|
5430
5451
|
name: file.name,
|
|
5431
5452
|
type: file.name.substr(0, file.name.lastIndexOf(".")).split(" ").join(""),
|
|
@@ -5641,7 +5662,6 @@ module.exports =
|
|
|
5641
5662
|
var Spinner = inputs.Spinner;
|
|
5642
5663
|
var Modal = inputs.Modal;
|
|
5643
5664
|
var hasFile = meta && meta.length > 0;
|
|
5644
|
-
|
|
5645
5665
|
var fileSchema = [];
|
|
5646
5666
|
var fileSchemaNames = [];
|
|
5647
5667
|
this.props.fileSchema && this.props.fileSchema.forEach(function (f) {
|
|
@@ -7159,7 +7179,7 @@ module.exports =
|
|
|
7159
7179
|
var Toggle = inputs.ToggleButtonGroup;
|
|
7160
7180
|
var Spinner = inputs.Spinner;
|
|
7161
7181
|
var credentials = config && config.credentials.filter(function (o) {
|
|
7162
|
-
if (o === "privateKey") {
|
|
7182
|
+
if (o === "privateKey" || o === "passphrase") {
|
|
7163
7183
|
var i = "ssh-key";
|
|
7164
7184
|
var j = "two-Factor Auth";
|
|
7165
7185
|
if (creds["credentialType"] === i || creds["credentialType"] === j) {
|