fiftyone.pipeline.engines.fiftyone 4.4.84 → 4.4.85
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 +1 -7
- package/shareUsage.js +22 -22
- package/tests/shareUsage.test.js +21 -21
- package/.eslintrc +0 -51
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fiftyone.pipeline.engines.fiftyone",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.85",
|
|
4
4
|
"description": "Shared base functions for implementing 51Degrees engines for the 51Degrees Pipeline API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"51degrees",
|
|
@@ -21,12 +21,6 @@
|
|
|
21
21
|
"fiftyone.pipeline.engines": "4.4.x"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"eslint": "^6.8.0",
|
|
25
|
-
"eslint-config-standard": "^14.1.1",
|
|
26
|
-
"eslint-plugin-import": "^2.28.1",
|
|
27
|
-
"eslint-plugin-node": "^11.1.0",
|
|
28
|
-
"eslint-plugin-promise": "^4.3.1",
|
|
29
|
-
"eslint-plugin-standard": "^4.1.0",
|
|
30
24
|
"jest": "^27.5.1"
|
|
31
25
|
},
|
|
32
26
|
"license": "EUPL-1.2",
|
package/shareUsage.js
CHANGED
|
@@ -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 engines = require('fiftyone.pipeline.engines');
|
|
@@ -110,7 +110,7 @@ class ShareUsage extends Engine {
|
|
|
110
110
|
endpoint.includes('http://') === false) {
|
|
111
111
|
endpoint = 'https://' + endpoint;
|
|
112
112
|
}
|
|
113
|
-
this.endpoint = url.
|
|
113
|
+
this.endpoint = new url.URL(endpoint);
|
|
114
114
|
switch (this.endpoint.protocol) {
|
|
115
115
|
case 'http:':
|
|
116
116
|
this.http = require('http');
|
|
@@ -377,7 +377,7 @@ class ReplacedString {
|
|
|
377
377
|
const length = Math.min(escapedText.length, SHARE_USAGE_MAX_EVIDENCE_LENGTH);
|
|
378
378
|
this.truncated = escapedText.length > SHARE_USAGE_MAX_EVIDENCE_LENGTH;
|
|
379
379
|
Array.from(escapedText.substring(0, length))
|
|
380
|
-
.
|
|
380
|
+
.forEach(c => {
|
|
381
381
|
if (c.charCodeAt(0) < Object.keys(IS_VALID_XML_CHAR).length && IS_VALID_XML_CHAR[c.charCodeAt(0)]) {
|
|
382
382
|
this.result += c;
|
|
383
383
|
} else {
|
package/tests/shareUsage.test.js
CHANGED
|
@@ -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 { PipelineBuilder } = require('fiftyone.pipeline.core');
|
|
@@ -111,7 +111,7 @@ test('share usage - data correct', done => {
|
|
|
111
111
|
expect(received[0]).not.toBeNull();
|
|
112
112
|
expect(received[0].length).toBeGreaterThan(0);
|
|
113
113
|
expect(received[0]).toMatch(new RegExp(`^<Devices version="${shareUsageVersion}"><Device>.*`));
|
|
114
|
-
expect(received[0]).toMatch(
|
|
114
|
+
expect(received[0]).toMatch(/.*<\/Device><\/Devices>$/);
|
|
115
115
|
expect(received[0]).toContain('<Language>Node.JS</Language>');
|
|
116
116
|
expect(received[0]).toContain(`<LanguageVersion>${process.versions.node}</LanguageVersion>`);
|
|
117
117
|
expect(received[0]).toContain(`<Platform>${process.platform} ${os.release()}</Platform>`);
|
package/.eslintrc
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"commonjs": true,
|
|
5
|
-
"es6": true
|
|
6
|
-
},
|
|
7
|
-
"plugins": [
|
|
8
|
-
"jsdoc"
|
|
9
|
-
],
|
|
10
|
-
"extends": [
|
|
11
|
-
"standard"
|
|
12
|
-
],
|
|
13
|
-
"globals": {
|
|
14
|
-
"Atomics": "readonly",
|
|
15
|
-
"SharedArrayBuffer": "readonly",
|
|
16
|
-
"test": true,
|
|
17
|
-
"jest": true,
|
|
18
|
-
"expect": true
|
|
19
|
-
},
|
|
20
|
-
"parserOptions": {
|
|
21
|
-
"ecmaVersion": 2018
|
|
22
|
-
},
|
|
23
|
-
"rules": {
|
|
24
|
-
"node/no-deprecated-api": "off",
|
|
25
|
-
"no-throw-literal": "off",
|
|
26
|
-
"no-path-concat": "off",
|
|
27
|
-
"no-prototype-builtins": "off",
|
|
28
|
-
"no-eval": "off",
|
|
29
|
-
"semi": [
|
|
30
|
-
2,
|
|
31
|
-
"always"
|
|
32
|
-
],
|
|
33
|
-
"jsdoc/check-alignment": 1,
|
|
34
|
-
"jsdoc/check-param-names": 1,
|
|
35
|
-
"jsdoc/check-tag-names": 1,
|
|
36
|
-
"jsdoc/check-types": 1,
|
|
37
|
-
"jsdoc/implements-on-classes": 1,
|
|
38
|
-
"jsdoc/newline-after-description": 1,
|
|
39
|
-
"jsdoc/require-description": 1,
|
|
40
|
-
"jsdoc/require-jsdoc": 1,
|
|
41
|
-
"jsdoc/require-param": 1,
|
|
42
|
-
"jsdoc/require-param-description": 1,
|
|
43
|
-
"jsdoc/require-param-name": 1,
|
|
44
|
-
"jsdoc/require-param-type": 1,
|
|
45
|
-
"jsdoc/require-returns": 1,
|
|
46
|
-
"jsdoc/require-returns-check": 1,
|
|
47
|
-
"jsdoc/require-returns-description": 1,
|
|
48
|
-
"jsdoc/require-returns-type": 1,
|
|
49
|
-
"jsdoc/valid-types": 1
|
|
50
|
-
}
|
|
51
|
-
}
|