fiftyone.devicedetection.onpremise 4.4.130 → 4.4.131
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/FiftyOneDeviceDetectionHashV4-darwin-18.node +0 -0
- package/build/FiftyOneDeviceDetectionHashV4-darwin-20.node +0 -0
- package/build/FiftyOneDeviceDetectionHashV4-win32-18.node +0 -0
- package/build/FiftyOneDeviceDetectionHashV4-win32-20.node +0 -0
- package/build/FiftyOneDeviceDetectionHashV4-win32-22.node +0 -0
- package/deviceDetectionOnPremise.js +20 -32
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -430,43 +430,35 @@ class DeviceDetectionOnPremise extends Engine {
|
|
|
430
430
|
* that an engine can be initialised once the datafile is
|
|
431
431
|
* retrieved if updateOnStart is set to true
|
|
432
432
|
*
|
|
433
|
-
* @returns {
|
|
433
|
+
* @returns {void}
|
|
434
434
|
*/
|
|
435
435
|
this.initEngine = function () {
|
|
436
|
-
|
|
437
|
-
const engine = new swigWrapper['Engine' + swigWrapperType + 'Swig'](dataFilePath, config, requiredProperties);
|
|
436
|
+
const engine = new swigWrapper['Engine' + swigWrapperType + 'Swig'](dataFilePath, config, requiredProperties);
|
|
438
437
|
|
|
439
|
-
|
|
438
|
+
// Get keys and add to evidenceKey filter
|
|
440
439
|
|
|
441
|
-
|
|
440
|
+
const evidenceKeys = engine.getKeys();
|
|
442
441
|
|
|
443
|
-
|
|
442
|
+
const evidenceKeyArray = [];
|
|
444
443
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
444
|
+
for (let i = 0; i < evidenceKeys.size(); i += 1) {
|
|
445
|
+
evidenceKeyArray.push(evidenceKeys.get(i).toLowerCase());
|
|
446
|
+
}
|
|
448
447
|
|
|
449
|
-
|
|
448
|
+
current.evidenceKeyFilter = new EvidenceKeyFilter(evidenceKeyArray);
|
|
450
449
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
450
|
+
current.engine = engine;
|
|
451
|
+
current.swigWrapper = swigWrapper;
|
|
452
|
+
current.swigWrapperType = swigWrapperType;
|
|
454
453
|
|
|
455
|
-
|
|
454
|
+
// Get properties list
|
|
456
455
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
});
|
|
456
|
+
const metadata = engine.getMetaData();
|
|
457
|
+
initProperties.call(current, metadata);
|
|
458
|
+
initComponents.call(current, metadata);
|
|
459
|
+
initMatchMetrics.call(current);
|
|
462
460
|
};
|
|
463
461
|
|
|
464
|
-
if (!updateOnStart) {
|
|
465
|
-
// Not updating on start. Initialise the engine straight away
|
|
466
|
-
|
|
467
|
-
this.initEngine();
|
|
468
|
-
}
|
|
469
|
-
|
|
470
462
|
// Disable features that require a license key if one was
|
|
471
463
|
// not supplied.
|
|
472
464
|
if (dataUpdateUrl === constants.dataUpdateUrl) {
|
|
@@ -512,13 +504,7 @@ class DeviceDetectionOnPremise extends Engine {
|
|
|
512
504
|
};
|
|
513
505
|
|
|
514
506
|
dataFileSettings.refresh = function () {
|
|
515
|
-
|
|
516
|
-
return current.engine.refreshData();
|
|
517
|
-
} else {
|
|
518
|
-
current.initEngine().then(function () {
|
|
519
|
-
current.engine.refreshData();
|
|
520
|
-
});
|
|
521
|
-
}
|
|
507
|
+
current.engine.refreshData();
|
|
522
508
|
};
|
|
523
509
|
|
|
524
510
|
const params = {
|
|
@@ -538,6 +524,8 @@ class DeviceDetectionOnPremise extends Engine {
|
|
|
538
524
|
|
|
539
525
|
const ddDatafile = new DataFile(dataFileSettings);
|
|
540
526
|
|
|
527
|
+
this.initEngine();
|
|
528
|
+
|
|
541
529
|
this.registerDataFile(ddDatafile);
|
|
542
530
|
}
|
|
543
531
|
|