fiftyone.devicedetection.cloud 4.4.128 → 4.4.129
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/deviceDetectionCloud.js +21 -18
- package/deviceDetectionCloudPipelineBuilder.js +26 -23
- package/hardwareProfileCloudEngine.js +37 -20
- package/index.js +8 -9
- package/package.json +1 -1
package/deviceDetectionCloud.js
CHANGED
|
@@ -18,21 +18,24 @@
|
|
|
18
18
|
* including the attribution notice(s) required under Article 5 of the EUPL
|
|
19
19
|
* in the end user terms of the application under an appropriate heading,
|
|
20
20
|
* such notice(s) shall fulfill the requirements of that article.
|
|
21
|
-
* ********************************************************************* */
|
|
22
|
-
|
|
23
|
-
const CloudEngine = require('fiftyone.pipeline.cloudrequestengine').CloudEngine;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* The deviceDetction cloud engine requires the 51Degrees
|
|
27
|
-
* cloudRequestEngine to be placed in a pipeline before it.
|
|
28
|
-
* It takes that raw JSON response and parses it to extract the
|
|
29
|
-
* device part. It also uses this data to generate a list of properties
|
|
30
|
-
**/
|
|
31
|
-
class DeviceDetectionCloud extends CloudEngine {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
* ********************************************************************* */
|
|
22
|
+
|
|
23
|
+
const CloudEngine = require('fiftyone.pipeline.cloudrequestengine').CloudEngine;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The deviceDetction cloud engine requires the 51Degrees
|
|
27
|
+
* cloudRequestEngine to be placed in a pipeline before it.
|
|
28
|
+
* It takes that raw JSON response and parses it to extract the
|
|
29
|
+
* device part. It also uses this data to generate a list of properties
|
|
30
|
+
**/
|
|
31
|
+
class DeviceDetectionCloud extends CloudEngine {
|
|
32
|
+
/**
|
|
33
|
+
* Constructor for DeviceDetectionCloud
|
|
34
|
+
*/
|
|
35
|
+
constructor () {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.dataKey = 'device';
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = DeviceDetectionCloud;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/* *********************************************************************
|
|
2
|
-
* This Original Work is copyright of 51 Degrees Mobile Experts Limited.
|
|
3
|
-
* Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
|
|
4
|
-
* Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
|
|
5
|
-
*
|
|
6
|
-
* This Original Work is licensed under the European Union Public Licence
|
|
7
|
-
* (EUPL) v.1.2 and is subject to its terms as set out below.
|
|
8
|
-
*
|
|
9
|
-
* If a copy of the EUPL was not distributed with this file, You can obtain
|
|
10
|
-
* one at https://opensource.org/licenses/EUPL-1.2.
|
|
11
|
-
*
|
|
12
|
-
* The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
|
|
13
|
-
* amended by the European Commission) shall be deemed incompatible for
|
|
14
|
-
* the purposes of the Work and the provisions of the compatibility
|
|
15
|
-
* clause in Article 5 of the EUPL shall not apply.
|
|
16
|
-
*
|
|
17
|
-
* If using the Work as, or as part of, a network application, by
|
|
18
|
-
* including the attribution notice(s) required under Article 5 of the EUPL
|
|
19
|
-
* in the end user terms of the application under an appropriate heading,
|
|
20
|
-
* such notice(s) shall fulfill the requirements of that article.
|
|
1
|
+
/* *********************************************************************
|
|
2
|
+
* This Original Work is copyright of 51 Degrees Mobile Experts Limited.
|
|
3
|
+
* Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
|
|
4
|
+
* Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
|
|
5
|
+
*
|
|
6
|
+
* This Original Work is licensed under the European Union Public Licence
|
|
7
|
+
* (EUPL) v.1.2 and is subject to its terms as set out below.
|
|
8
|
+
*
|
|
9
|
+
* If a copy of the EUPL was not distributed with this file, You can obtain
|
|
10
|
+
* one at https://opensource.org/licenses/EUPL-1.2.
|
|
11
|
+
*
|
|
12
|
+
* The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
|
|
13
|
+
* amended by the European Commission) shall be deemed incompatible for
|
|
14
|
+
* the purposes of the Work and the provisions of the compatibility
|
|
15
|
+
* clause in Article 5 of the EUPL shall not apply.
|
|
16
|
+
*
|
|
17
|
+
* If using the Work as, or as part of, a network application, by
|
|
18
|
+
* including the attribution notice(s) required under Article 5 of the EUPL
|
|
19
|
+
* in the end user terms of the application under an appropriate heading,
|
|
20
|
+
* such notice(s) shall fulfill the requirements of that article.
|
|
21
21
|
* ********************************************************************* */
|
|
22
22
|
|
|
23
23
|
const core = require('fiftyone.pipeline.core');
|
|
@@ -26,11 +26,14 @@ const CloudRequestEngine = require('fiftyone.pipeline.cloudrequestengine').Cloud
|
|
|
26
26
|
const PipelineBuilder = core.PipelineBuilder;
|
|
27
27
|
const LruCache = require('fiftyone.pipeline.engines').LruCache;
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Extension of pipelineBuilder class that allows for the quick
|
|
31
|
+
* generation of a device detection cloud pipeline. Adds share usage,
|
|
32
|
+
* caching.
|
|
33
|
+
*/
|
|
29
34
|
class DeviceDetectionCloudPipelineBuilder extends PipelineBuilder {
|
|
30
35
|
/**
|
|
31
|
-
*
|
|
32
|
-
* generation of a device detection cloud pipeline. Adds share usage,
|
|
33
|
-
* caching.
|
|
36
|
+
* Constructor for DeviceDetectionCloudPipelineBuilder
|
|
34
37
|
*
|
|
35
38
|
* @param {object} options the options for the pipeline builder
|
|
36
39
|
* @param {string} options.licenceKeys license key(s) used by the
|
|
@@ -1,36 +1,53 @@
|
|
|
1
|
-
/* *********************************************************************
|
|
2
|
-
* This Original Work is copyright of 51 Degrees Mobile Experts Limited.
|
|
3
|
-
* Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
|
|
4
|
-
* Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
|
|
5
|
-
*
|
|
6
|
-
* This Original Work is licensed under the European Union Public Licence
|
|
7
|
-
* (EUPL) v.1.2 and is subject to its terms as set out below.
|
|
8
|
-
*
|
|
9
|
-
* If a copy of the EUPL was not distributed with this file, You can obtain
|
|
10
|
-
* one at https://opensource.org/licenses/EUPL-1.2.
|
|
11
|
-
*
|
|
12
|
-
* The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
|
|
13
|
-
* amended by the European Commission) shall be deemed incompatible for
|
|
14
|
-
* the purposes of the Work and the provisions of the compatibility
|
|
15
|
-
* clause in Article 5 of the EUPL shall not apply.
|
|
16
|
-
*
|
|
17
|
-
* If using the Work as, or as part of, a network application, by
|
|
18
|
-
* including the attribution notice(s) required under Article 5 of the EUPL
|
|
19
|
-
* in the end user terms of the application under an appropriate heading,
|
|
20
|
-
* such notice(s) shall fulfill the requirements of that article.
|
|
1
|
+
/* *********************************************************************
|
|
2
|
+
* This Original Work is copyright of 51 Degrees Mobile Experts Limited.
|
|
3
|
+
* Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
|
|
4
|
+
* Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
|
|
5
|
+
*
|
|
6
|
+
* This Original Work is licensed under the European Union Public Licence
|
|
7
|
+
* (EUPL) v.1.2 and is subject to its terms as set out below.
|
|
8
|
+
*
|
|
9
|
+
* If a copy of the EUPL was not distributed with this file, You can obtain
|
|
10
|
+
* one at https://opensource.org/licenses/EUPL-1.2.
|
|
11
|
+
*
|
|
12
|
+
* The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
|
|
13
|
+
* amended by the European Commission) shall be deemed incompatible for
|
|
14
|
+
* the purposes of the Work and the provisions of the compatibility
|
|
15
|
+
* clause in Article 5 of the EUPL shall not apply.
|
|
16
|
+
*
|
|
17
|
+
* If using the Work as, or as part of, a network application, by
|
|
18
|
+
* including the attribution notice(s) required under Article 5 of the EUPL
|
|
19
|
+
* in the end user terms of the application under an appropriate heading,
|
|
20
|
+
* such notice(s) shall fulfill the requirements of that article.
|
|
21
21
|
* ********************************************************************* */
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* @typedef {import('fiftyone.pipeline.core').FlowData} FlowData
|
|
25
|
+
*/
|
|
26
|
+
|
|
23
27
|
const CloudEngine = require('fiftyone.pipeline.cloudrequestengine').CloudEngine;
|
|
24
28
|
|
|
25
29
|
const AspectPropertyValue = require('fiftyone.pipeline.core').AspectPropertyValue;
|
|
26
30
|
const AspectDataDictionary = require('fiftyone.pipeline.engines').AspectDataDictionary;
|
|
27
31
|
|
|
32
|
+
/**
|
|
33
|
+
* This Cloud Aspect Engine enables the parsing of 'hardware profile'
|
|
34
|
+
* responses from the 51Degrees cloud service.
|
|
35
|
+
*/
|
|
28
36
|
class HardwareProfileCloudEngine extends CloudEngine {
|
|
37
|
+
/**
|
|
38
|
+
* Constructor for HardwareProfileCloudEngine
|
|
39
|
+
*/
|
|
29
40
|
constructor () {
|
|
30
41
|
super(...arguments);
|
|
31
42
|
this.dataKey = 'hardware';
|
|
32
43
|
}
|
|
33
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Process internal FlowData cloud data for devices,
|
|
47
|
+
* set them as FlowData elements
|
|
48
|
+
*
|
|
49
|
+
* @param {FlowData} flowData The FlowData object
|
|
50
|
+
*/
|
|
34
51
|
processInternal (flowData) {
|
|
35
52
|
const engine = this;
|
|
36
53
|
|
package/index.js
CHANGED
|
@@ -18,12 +18,11 @@
|
|
|
18
18
|
* including the attribution notice(s) required under Article 5 of the EUPL
|
|
19
19
|
* in the end user terms of the application under an appropriate heading,
|
|
20
20
|
* such notice(s) shall fulfill the requirements of that article.
|
|
21
|
-
* ********************************************************************* */
|
|
22
|
-
|
|
23
|
-
module.exports = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
21
|
+
* ********************************************************************* */
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
DeviceDetectionCloud: require('./deviceDetectionCloud'),
|
|
25
|
+
DeviceDetectionCloudPipelineBuilder: require('./deviceDetectionCloudPipelineBuilder'),
|
|
26
|
+
HardwareProfileCloudEngine: require('../fiftyone.devicedetection.cloud/hardwareProfileCloudEngine')
|
|
27
|
+
|
|
28
|
+
};
|