fiftyone.devicedetection.shared 4.4.136 → 4.4.138
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/package.json +5 -3
- package/types/errorMessages.d.ts +13 -0
- package/types/examples/dataExtension.d.ts +11 -0
- package/types/examples/exampleConstants.d.ts +7 -0
- package/types/examples/optionsExtension.d.ts +46 -0
- package/types/index.d.ts +47 -0
- package/types/tests/keyUtils.d.ts +2 -0
- package/types/tests/testConstants.d.ts +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fiftyone.devicedetection.shared",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.138",
|
|
4
4
|
"description": "Shared functionality for implementing device detection engine for the 51Degrees Pipeline API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"51degrees",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"author": "51Degrees Engineering <engineering@51degrees.com>",
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"jest": "^28.1.
|
|
31
|
+
"@types/jest": "^28.1.8",
|
|
32
|
+
"jest": "^28.1.3",
|
|
32
33
|
"jest-junit": "^13.2.0"
|
|
33
34
|
},
|
|
34
35
|
"license": "EUPL-1.2",
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
"files": [
|
|
39
40
|
"examples",
|
|
40
41
|
"tests",
|
|
41
|
-
"*.js"
|
|
42
|
+
"*.js",
|
|
43
|
+
"types"
|
|
42
44
|
]
|
|
43
45
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export let cacheNotSupport: string;
|
|
2
|
+
export let evidenceNotFound: string;
|
|
3
|
+
export let dataFilePathRequired: string;
|
|
4
|
+
export let fileNotFound: string;
|
|
5
|
+
export let moduleDirNotFound: string;
|
|
6
|
+
export let nativeModuleNotFound: string;
|
|
7
|
+
export let invalidFileExtension: string;
|
|
8
|
+
export let licenseKeyRequired: string;
|
|
9
|
+
export let invalidPerformanceProfile: string;
|
|
10
|
+
export let propertyKeyDataFiles: string;
|
|
11
|
+
export let propertyNotFound: string;
|
|
12
|
+
export let badDataUnsupportedVersion: string;
|
|
13
|
+
export let badDataIncorrectFormat: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export = DataExtension;
|
|
2
|
+
declare class DataExtension {
|
|
3
|
+
/**
|
|
4
|
+
* Helper function to read property values from flowData
|
|
5
|
+
*
|
|
6
|
+
* @param {object} elementData Element data
|
|
7
|
+
* @param {string} propertyName Property name
|
|
8
|
+
* @returns {string} result string, either property value or error
|
|
9
|
+
* */
|
|
10
|
+
static getValueHelper(elementData: object, propertyName: string): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export = OptionsExtension;
|
|
2
|
+
declare class OptionsExtension {
|
|
3
|
+
/**
|
|
4
|
+
* Get element by name
|
|
5
|
+
*
|
|
6
|
+
* @param {object} options Options
|
|
7
|
+
* @param {string} elementName Element name
|
|
8
|
+
* @returns {object} Element
|
|
9
|
+
*/
|
|
10
|
+
static getElement(options: object, elementName: string): object;
|
|
11
|
+
/**
|
|
12
|
+
* Get Datafile path
|
|
13
|
+
*
|
|
14
|
+
* @param {object} options Options
|
|
15
|
+
* @returns {string} Datafile path
|
|
16
|
+
*/
|
|
17
|
+
static getDataFilePath(options: object): string;
|
|
18
|
+
/**
|
|
19
|
+
* Set Datafile path
|
|
20
|
+
*
|
|
21
|
+
* @param {object} options Options
|
|
22
|
+
* @param {string} newDataFilePath New Datafile path
|
|
23
|
+
*/
|
|
24
|
+
static setDataFilePath(options: object, newDataFilePath: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Update Element path
|
|
27
|
+
*
|
|
28
|
+
* @param {object} options Options
|
|
29
|
+
* @param {string} appendDir New element path
|
|
30
|
+
*/
|
|
31
|
+
static updateElementPath(options: object, appendDir: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Get resource Key
|
|
34
|
+
*
|
|
35
|
+
* @param {object} options Options
|
|
36
|
+
* @returns {string} Resource key
|
|
37
|
+
*/
|
|
38
|
+
static getResourceKey(options: object): string;
|
|
39
|
+
/**
|
|
40
|
+
* Set resource key
|
|
41
|
+
*
|
|
42
|
+
* @param {object} options Options
|
|
43
|
+
* @param {string} resourceKey New resource key
|
|
44
|
+
*/
|
|
45
|
+
static setResourceKey(options: object, resourceKey: string): void;
|
|
46
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export let errorMessages: {
|
|
2
|
+
cacheNotSupport: string;
|
|
3
|
+
evidenceNotFound: string;
|
|
4
|
+
dataFilePathRequired: string;
|
|
5
|
+
fileNotFound: string;
|
|
6
|
+
moduleDirNotFound: string;
|
|
7
|
+
nativeModuleNotFound: string;
|
|
8
|
+
invalidFileExtension: string;
|
|
9
|
+
licenseKeyRequired: string;
|
|
10
|
+
invalidPerformanceProfile: string;
|
|
11
|
+
propertyKeyDataFiles: string;
|
|
12
|
+
propertyNotFound: string;
|
|
13
|
+
badDataUnsupportedVersion: string;
|
|
14
|
+
badDataIncorrectFormat: string;
|
|
15
|
+
};
|
|
16
|
+
export let testConstants: {
|
|
17
|
+
envVars: {
|
|
18
|
+
superResourceKeyEnvVar: string;
|
|
19
|
+
platformResourceKeyEnvVar: string;
|
|
20
|
+
hardwareResourceKeyEnvVar: string;
|
|
21
|
+
browserResourceKeyEnvVar: string;
|
|
22
|
+
noSetHeaderResourceKeyEnvVar: string;
|
|
23
|
+
licenseKeyEnvVar: string;
|
|
24
|
+
};
|
|
25
|
+
userAgents: {
|
|
26
|
+
chromeUA: string;
|
|
27
|
+
edgeUA: string;
|
|
28
|
+
firefoxUA: string;
|
|
29
|
+
safariUA: string;
|
|
30
|
+
curlUA: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export let keyUtils: {
|
|
34
|
+
getNamedKey: (keyName: string) => string;
|
|
35
|
+
isInvalidKey: (keyValue: string) => boolean;
|
|
36
|
+
};
|
|
37
|
+
export let exampleConstants: {
|
|
38
|
+
defaultEvidenceValues: Map<string, string>[];
|
|
39
|
+
fileNames: {
|
|
40
|
+
enterpriseDataFileName: string;
|
|
41
|
+
liteDataFileName: string;
|
|
42
|
+
uaFileName: string;
|
|
43
|
+
evidenceFileName: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export let optionsExtension: typeof import("./examples/optionsExtension");
|
|
47
|
+
export let dataExtension: typeof import("./examples/dataExtension");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export namespace envVars {
|
|
2
|
+
let superResourceKeyEnvVar: string;
|
|
3
|
+
let platformResourceKeyEnvVar: string;
|
|
4
|
+
let hardwareResourceKeyEnvVar: string;
|
|
5
|
+
let browserResourceKeyEnvVar: string;
|
|
6
|
+
let noSetHeaderResourceKeyEnvVar: string;
|
|
7
|
+
let licenseKeyEnvVar: string;
|
|
8
|
+
}
|
|
9
|
+
export namespace userAgents {
|
|
10
|
+
let chromeUA: string;
|
|
11
|
+
let edgeUA: string;
|
|
12
|
+
let firefoxUA: string;
|
|
13
|
+
let safariUA: string;
|
|
14
|
+
let curlUA: string;
|
|
15
|
+
}
|