fiftyone.devicedetection.onpremise 4.4.132 → 4.4.134
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/package.json +1 -1
- package/readme.md +70 -45
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -13,13 +13,15 @@ This package provides a On-Premise implementation of Device Detection engine whi
|
|
|
13
13
|
|
|
14
14
|
This package requires the following additional packages:
|
|
15
15
|
|
|
16
|
-
- **fiftyone.devicedetection.shared** - A Node.js module which contains shared functionality to build cloud and on-premise engines.
|
|
16
|
+
- [**fiftyone.devicedetection.shared**](/fiftyone.devicedetection.shared#readme) - A Node.js module which contains shared functionality to build cloud and on-premise engines.
|
|
17
17
|
|
|
18
18
|
### Installation
|
|
19
19
|
|
|
20
20
|
Using NPM call:
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
```
|
|
23
|
+
npm install fiftyone.devicedetection.onpremise
|
|
24
|
+
```
|
|
23
25
|
|
|
24
26
|
### On-Premise
|
|
25
27
|
When running on-premise, a local Hash V4.1 data file is required.
|
|
@@ -29,65 +31,87 @@ When running on-premise, a local Hash V4.1 data file is required.
|
|
|
29
31
|
51Degrees provides [multiple options](https://51degrees.com/Licencing-Pricing/On-Premise), some of which support automatic updates through the Pipeline API.
|
|
30
32
|
|
|
31
33
|
If the module is installed directly from Git then the binaries are also required. These binaries are native module which contains the core engine of device detection. Below are the steps to build these binaries:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
34
|
+
#### Pre-requisites
|
|
35
|
+
|
|
36
|
+
- Install Node.js.
|
|
37
|
+
- Install node-gyp by running.
|
|
38
|
+
- `npm install node-gyp --global`
|
|
39
|
+
- Install C build tools:
|
|
40
|
+
- Windows:
|
|
41
|
+
- You will need either Visual Studio 2019 or the [C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) installed.
|
|
42
|
+
- Minimum platform toolset version is `v142`
|
|
43
|
+
- Minimum Windows SDK version is `10.0.18362.0`
|
|
44
|
+
- Linux/MacOS:
|
|
45
|
+
- `sudo apt-get install g++ make libatomic1`
|
|
46
|
+
- Pull git submodules:
|
|
47
|
+
- `git submodule update --init --recursive`
|
|
48
|
+
|
|
49
|
+
#### Build Steps
|
|
50
|
+
|
|
51
|
+
- Navigate to fiftyone.devicedetection.onpremise
|
|
52
|
+
- Rename the `binding.51d` to `binding.gyp`
|
|
53
|
+
- Run `npm install`
|
|
54
|
+
- Alternatively this step can be replaced by the followings:
|
|
55
|
+
- Create a folder named `build`.
|
|
56
|
+
- Run `node-gyp configure`
|
|
57
|
+
- Run `node-gyp build`
|
|
58
|
+
- Platform specific:
|
|
59
|
+
- Windows
|
|
60
|
+
- By default this will look for Visual Studio 2019 and a minimum Windows SDK version `10.0.18362.0`.
|
|
61
|
+
- This can be overwritten by include `--msvs_version=[VS version]` and `--msvs_target_platform_version=[Windows SDK Version]` as part of the `npm install` command.
|
|
62
|
+
- **NOTE**: This is not recommended. Also, some time the latest SDK version is selected instead, as observed in environment with multiple SDK versions installed. Thus, only install the correct Visual Studio version and the minimum required Windows SDK version as recommended.
|
|
63
|
+
- This will build the `FiftyOneDeviceDetectionHashV4.node` under `build/Release` folder.
|
|
64
|
+
- Copy the `FiftyOneDeviceDetectionHashV4.node` to `build` directory (which is one level up) and rename it using the following convention.
|
|
65
|
+
- Windows:
|
|
66
|
+
- FiftyOneDeviceDetectionHashV4-win32-[ Node version ].node
|
|
67
|
+
- e.g. FiftyOneDeviceDetectionHashV4-win32-10.node for Node 10.
|
|
68
|
+
- Linux:
|
|
69
|
+
- FiftyOneDeviceDetectionHashV4-linux-[ Node version ].node
|
|
70
|
+
- e.g. FiftyOneDeviceDetectionHashV4-linux-10.node for Node 10.
|
|
71
|
+
- MacOS:
|
|
72
|
+
- FiftyOneDeviceDetectionHashV4-darwin-[ Node version ].node
|
|
73
|
+
- e.g. FiftyOneDeviceDetectionHashV4-darwin-10.node for Node 10.
|
|
74
|
+
- Please see the [tested versions page](https://51degrees.com/documentation/_info__tested_versions.html) for Node versions that we currently test against. The software may run fine against other versions, but extra caution should be applied.
|
|
75
|
+
- You can optionally clear up by removing all the build files and folders except for the *.node file that's been created.
|
|
76
|
+
- `WARNING`: `npm install` removes this copied file, so you will need to do the above steps again after running `npm install`
|
|
61
77
|
|
|
62
|
-
### Examples
|
|
63
78
|
|
|
64
|
-
|
|
79
|
+
### Examples
|
|
65
80
|
|
|
66
|
-
|
|
81
|
+
For details of how to run the examples, please refer to [run examples](/run_examples.md).
|
|
82
|
+
The tables below describe the examples that are available.
|
|
67
83
|
|
|
68
|
-
|
|
84
|
+
| Example | Description |
|
|
85
|
+
|----------------------------------------|-------------|
|
|
86
|
+
| [automaticupdates/dataFileSystemWatcher.js](/fiftyone.devicedetection.onpremise/examples/onpremise/automaticupdates/dataFileSystemWatcher.js) | How to configure automatic updates using the file system watcher to monitor for changes to the data file. |
|
|
87
|
+
| [automaticupdates/updateOnStartUp.js](/fiftyone.devicedetection.onpremise/examples/onpremise/automaticupdates/updateOnStartUp.js) | How to configure the Pipeline to automatically update the device detection data file on startup. |
|
|
88
|
+
| [automaticupdates/updatePollingInterval.js](/fiftyone.devicedetection.onpremise/examples/onpremise/automaticupdates/updatePollingInterval.js) | Ho to configure and verify the various automatic data file update settings. |
|
|
89
|
+
| [gettingstarted-console](/fiftyone.devicedetection.onpremise/examples/onpremise/gettingstarted-console) | How to use the 51Degrees on-premise device detection API to determine details about a device based on its User-Agent and User-Agent Client Hints HTTP header values. |
|
|
90
|
+
| [gettingstarted-web](/fiftyone.devicedetection.onpremise/examples/onpremise/gettingstarted-web) | How to use the 51Degrees Cloud service to determine details about a device as part of a simple web server. |
|
|
91
|
+
| [matchmetrics-console](/fiftyone.devicedetection.onpremise/examples/onpremise/matchmetrics-console) | How to view metrics associated with the results of processing with a Device Detection engine. |
|
|
92
|
+
| [metadata-console](/fiftyone.devicedetection.onpremise/examples/onpremise/metadata-console) | How to access the meta-data that relates to the device detection algorithm. |
|
|
93
|
+
| [offlineprocessing-console](/fiftyone.devicedetection.onpremise/examples/onpremise/offlineprocessing-console) | How to process data for later viewing using a Device Detection Hash data file. |
|
|
94
|
+
| [performance-console](/fiftyone.devicedetection.onpremise/examples/onpremise/performance-console) | How to configure the various performance options and run a simple performance test. |
|
|
95
|
+
| [updatedatafile-console](/fiftyone.devicedetection.onpremise/examples/onpremise/updatedatafile-console) | This example illustrates various parameters that can be adjusted when using the on-premise device detection engine, and controls when a new data file is sought and when it is loaded by the device detection software. |
|
|
96
|
+
| [useragentclienthints-web](/fiftyone.devicedetection.onpremise/examples/onpremise/useragentclienthints-web) | This is now deprecated. Kept for testing purposes. Please see **gettingstarted-web** instead. |
|
|
69
97
|
|
|
70
|
-
- **configureFromFile.js** - This example shows how to configure a pipeline from a configuration file using the pipelinebuilder's buildFromConfigurationFile method.
|
|
71
|
-
- **failureToMatch.js** - This example shows how the hasValue function can help make sure that meaningful values are returned when checking properties returned from the device detection engine. It also illustrates how the "allowUnmatched" parameters can be used to alter these results.
|
|
72
|
-
- **gettingStarted.js** - Getting started example of using the 51Degrees device detection 'Hash' algorithm to determine whether a given User-Agent corresponds to a mobile device or not.
|
|
73
|
-
- **metaData.js** - This example shows how to get properties from a pipeline's processed flowData based on their metadata, the getProperties() method and also additional meta data properties on device detection data.
|
|
74
|
-
- **webIntegration.js** - This example demonstrates the evidence.addFromRequest() method and client side JavaScript overrides by creating a web server, serving JavaScript created by the device detection engine and bundled together by a special JavaScript bundler engine. This JavaScript is then used on the client side to save a cookie so that when the device detection engine next processes the request (using the addFromRequest() method) it has a more accurate reading for properties set on the client side.
|
|
75
|
-
- **matchMetrics.js** - This example shows how to get information about the detection result such as the algorithm that was used to perform the detection.
|
|
76
|
-
- **offlineProcessing.js** - This example shows how to process a CSV file containing User-Agent strings and produce an output csv containing the source User-Agent strings with IsMobile, PlatformName and PlatformVersion properties appended.
|
|
77
|
-
- **performance.js** - The examples demonstrates the performance of the HighPerformance device detection configuration.
|
|
78
98
|
|
|
79
99
|
## Tests
|
|
80
100
|
|
|
81
101
|
In this repository, there are tests for the examples.
|
|
82
102
|
You will need to install jest to run them:
|
|
83
103
|
|
|
84
|
-
|
|
104
|
+
```
|
|
105
|
+
npm install jest --global
|
|
106
|
+
```
|
|
85
107
|
|
|
86
108
|
You will also need to install any required packages for the examples in the **Examples** section.
|
|
87
109
|
|
|
88
110
|
To run the tests, navigate to the module directory and execute:
|
|
89
111
|
|
|
90
|
-
|
|
112
|
+
```
|
|
113
|
+
npm test
|
|
114
|
+
```
|
|
91
115
|
|
|
92
116
|
## Native code updates
|
|
93
117
|
|
|
@@ -106,3 +130,4 @@ Process for rebuilding SWIG interfaces following an update to the device detecti
|
|
|
106
130
|
5. Run the 'Build Device Detection Binaries for Node.js' Azure CI Pipeline.
|
|
107
131
|
6. Copy the produced artifacts into the fiftyone.pipeline.devicedetection/build directory.
|
|
108
132
|
7. Commit changes to repository.
|
|
133
|
+
|