fiftyone.devicedetection.onpremise 4.4.135 → 4.4.137

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.
@@ -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 MissingPropertyService = require('fiftyone.pipeline.engines').MissingPropertyService;
@@ -42,7 +42,7 @@ class DeviceDetectionMissingPropertyService extends MissingPropertyService {
42
42
  *
43
43
  * @param {string} key missing property key
44
44
  * @param {FlowElement} flowElement the FlowElement the key was missing from
45
- * @returns {void}
45
+ * @returns {never} throws an error
46
46
  */
47
47
  check (key, flowElement) {
48
48
  if (flowElement.properties[key]) {
@@ -40,7 +40,7 @@ class DeviceDetectionOnPremisePipelineBuilder extends PipelineBuilder {
40
40
  * simple paramater changes
41
41
  *
42
42
  * @param {object} options the options for the pipeline builder
43
- * @param {string} options.licenceKeys license key(s) used by the
43
+ * @param {string} [options.licenceKeys] license key(s) used by the
44
44
  * data file update service. A key can be obtained from the
45
45
  * 51Degrees website: https://51degrees.com/pricing.
46
46
  * This parameter MUST be set when using a data file.
@@ -48,57 +48,57 @@ class DeviceDetectionOnPremisePipelineBuilder extends PipelineBuilder {
48
48
  * an empty string, but this will cause automatic updates
49
49
  * to be disabled.
50
50
  * @param {string} options.dataFile dataFile path for the on premise engine
51
- * @param {boolean} options.dataUpdateVerifyMd5 whether to check MD5 of datafile
52
- * @param {boolean} options.dataUpdateUseUrlFormatter whether to append default URL params for Data File download
53
- * @param {boolean} options.autoUpdate whether to autoUpdate the dataFile
54
- * @param {string} options.dataUpdateUrl base url for the datafile
55
- * @param {number} options.pollingInterval How often to poll for
51
+ * @param {boolean} [options.dataUpdateVerifyMd5] whether to check MD5 of datafile
52
+ * @param {boolean} [options.dataUpdateUseUrlFormatter] whether to append default URL params for Data File download
53
+ * @param {boolean} [options.autoUpdate] whether to autoUpdate the dataFile
54
+ * @param {string} [options.dataUpdateUrl] base url for the datafile
55
+ * @param {number} [options.pollingInterval] How often to poll for
56
56
  * updates to the datafile (minutes)
57
- * @param {number} options.updateTimeMaximumRandomisation
57
+ * @param {number} [options.updateTimeMaximumRandomisation]
58
58
  * Maximum randomisation offset in seconds to polling time interval
59
- * @param {boolean} options.shareUsage whether to include the share
59
+ * @param {boolean} [options.shareUsage] whether to include the share
60
60
  * usage element
61
- * @param {boolean} options.fileSystemWatcher whether to monitor the datafile
61
+ * @param {boolean} [options.fileSystemWatcher] whether to monitor the datafile
62
62
  * path for changes
63
- * @param {boolean} options.updateOnStart whether to download / update a
63
+ * @param {boolean} [options.updateOnStart] whether to download / update a
64
64
  * dataFile to the path specified in options.dataFile on start
65
- * @param {number} options.cacheSize size of the default cache
65
+ * @param {number} [options.cacheSize] size of the default cache
66
66
  * (includes cache if set). NOTE: This is not supported for on-premise
67
67
  * engine.
68
- * @param {Array<string>} options.restrictedProperties list of properties the engine
68
+ * @param {Array<string>} [options.restrictedProperties] list of properties the engine
69
69
  * will be restricted to
70
- * @param {string} options.performanceProfile used to control the tradeoff
70
+ * @param {string} [options.performanceProfile] used to control the tradeoff
71
71
  * between performance and system memory usage (Only applies to on-premise,
72
72
  * not cloud) options are: LowMemory, MaxPerformance, Balanced,
73
73
  * BalancedTemp, HighPerformance
74
- * @param {number} options.concurrency defaults to the number of cpus
74
+ * @param {number} [options.concurrency] defaults to the number of cpus
75
75
  * in the machine
76
- * @param {boolean} options.updateMatchedUserAgent True if the detection
76
+ * @param {boolean} [options.updateMatchedUserAgent] True if the detection
77
77
  * should record the matched characters from the target User-Agent
78
- * @param {number} options.maxMatchedUserAgentLength Number of characters to
78
+ * @param {number} [options.maxMatchedUserAgentLength] Number of characters to
79
79
  * consider in the matched User-Agent. Ignored if updateMatchedUserAgent is
80
80
  * false
81
- * @param {number} options.drift Set maximum drift in hash position to allow
81
+ * @param {number} [options.drift] Set maximum drift in hash position to allow
82
82
  * when processing HTTP headers.
83
- * @param {number} options.difference Set the maximum difference to allow
83
+ * @param {number} [options.difference] Set the maximum difference to allow
84
84
  * when processing HTTP headers. The difference is the difference in hash
85
85
  * value between the hash that was found, and the hash that is being searched
86
86
  * for. By default this is 0.
87
- * @param {string} options.allowUnmatched If set to false, a non-matching
87
+ * @param {string} [options.allowUnmatched] If set to false, a non-matching
88
88
  * User-Agent will result in properties without set values.
89
89
  * If set to true, a non-matching User-Agent will cause the 'default profiles'
90
90
  * to be returned.
91
91
  * This means that properties will always have values
92
92
  * (i.e. no need to check .HasValue) but some may be inaccurate.
93
93
  * By default, this is false.
94
- * @param {boolean} options.createTempDataCopy If true, the engine will
94
+ * @param {boolean} [options.createTempDataCopy] If true, the engine will
95
95
  * create a copy of the data file in a temporary location
96
96
  * rather than using the file provided directly. If not
97
97
  * loading all data into memory, this is required for
98
98
  * automatic data updates to occur.
99
- * @param {string} options.tempDataDir The directory to use for the
99
+ * @param {string} [options.tempDataDir] The directory to use for the
100
100
  * temporary data copy if 'createTempDataCopy' is set to true.
101
- * @param {DataFileUpdateService} options.dataFileUpdateService Set
101
+ * @param {DataFileUpdateService} [options.dataFileUpdateService] Set
102
102
  * DataFileUpdateService so the datafiles can receive
103
103
  * automatic updates
104
104
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fiftyone.devicedetection.onpremise",
3
- "version": "4.4.135",
3
+ "version": "4.4.137",
4
4
  "description": "Device detection on-premise services for the 51Degrees Pipeline API",
5
5
  "keywords": [
6
6
  "51degrees",
@@ -21,6 +21,7 @@
21
21
  "DeviceAtlas"
22
22
  ],
23
23
  "main": "index.js",
24
+ "types": "types/index.d.ts",
24
25
  "directories": {
25
26
  "test": "tests"
26
27
  },
@@ -31,14 +32,7 @@
31
32
  "type": "git",
32
33
  "url": "https://github.com/51Degrees/device-detection-node"
33
34
  },
34
- "author": "51Degrees",
35
- "contributors": [
36
- "Filip Hnízdo <filip@octophin.com> (https://octophindigital.com/)",
37
- "Steve Ballantine <stephen@51degrees.com> (https://51degrees.com)",
38
- "Ben Shilito <ben@51degrees.com> (https://51degrees.com)",
39
- "Joseph Dix <joseph@51degrees.com> (https://51degrees.com)",
40
- "Tung Pham <tung@51degrees.com> (https://51degrees.com)"
41
- ],
35
+ "author": "51Degrees Engineering <engineering@51degrees.com>",
42
36
  "dependencies": {
43
37
  "fiftyone.devicedetection.shared": "4.4.x",
44
38
  "fiftyone.pipeline.core": "4.4.x",
@@ -48,7 +42,8 @@
48
42
  "n-readlines": "^1.0.1"
49
43
  },
50
44
  "devDependencies": {
51
- "@types/node": "^15.14.9",
45
+ "@types/jest": "^28.1.8",
46
+ "@types/node": "^20.14.10",
52
47
  "jest": "^28.1.3",
53
48
  "jest-junit": "^13.2.0"
54
49
  },
@@ -58,6 +53,7 @@
58
53
  },
59
54
  "files": [
60
55
  "build",
61
- "*.js"
56
+ "*.js",
57
+ "*.ts"
62
58
  ]
63
59
  }