fiftyone.pipeline.core 4.4.98 → 4.4.100

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
  /**
@@ -30,7 +30,7 @@ class AspectPropertyValue {
30
30
  * Constructor for AspectPropertyValue
31
31
  *
32
32
  * @param {string} noValueMessage The message to show when no value is set
33
- * @param {Mixed} value The value inside the wrapper
33
+ * @param {*} value The value inside the wrapper
34
34
  */
35
35
  constructor (noValueMessage = 'No value has been set.', value) {
36
36
  if (typeof value !== 'undefined') {
@@ -46,7 +46,7 @@ class AspectPropertyValue {
46
46
  /**
47
47
  * Get the value of this instance.
48
48
  *
49
- * @returns {Mixed} The value of the property
49
+ * @returns {*} The value of the property
50
50
  * @throws Will throw error if 'hasValue' is false.
51
51
  */
52
52
  get value () {
@@ -60,7 +60,7 @@ class AspectPropertyValue {
60
60
  /**
61
61
  * Set the value of this instance.
62
62
  *
63
- * @param {Mixed} value the value to set
63
+ * @param {*} value the value to set
64
64
  */
65
65
  set value (value) {
66
66
  if (typeof value !== 'undefined') {
package/elementData.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 util = require('util');
@@ -25,6 +25,7 @@ const errorMessages = require('./errorMessages');
25
25
 
26
26
  /**
27
27
  * @typedef {import('./flowElement')} FlowElement
28
+ * @typedef {import('./flowData')} FlowData
28
29
  */
29
30
 
30
31
  /**
@@ -88,7 +89,7 @@ class ElementData {
88
89
  * (or skipping) the getInternal method
89
90
  *
90
91
  * @param {string} key the key to retrieve a property value for
91
- * @returns {mixed} value
92
+ * @returns {FlowData} value
92
93
  */
93
94
  get (key) {
94
95
  const value = this.getInternal(key);
@@ -121,7 +122,7 @@ class ElementData {
121
122
  * Return float value of property
122
123
  *
123
124
  * @param {string} key the key to retreive a property value for
124
- * @returns {number} value
125
+ * @returns {number} float value
125
126
  */
126
127
  getAsFloat (key) {
127
128
  const result = this.get(key);
@@ -135,7 +136,7 @@ class ElementData {
135
136
  * Return int value of property
136
137
  *
137
138
  * @param {string} key the key to retreive a property value for
138
- * @returns {number} value
139
+ * @returns {number} int value
139
140
  */
140
141
  getAsInteger (key) {
141
142
  const result = this.get(key);
package/evidence.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 url = require('url');
@@ -44,7 +44,7 @@ class Evidence {
44
44
  * Add a piece of evidence to flowData
45
45
  *
46
46
  * @param {string} key evidence key to add
47
- * @param {Mixed} value value of evidence key
47
+ * @param {*} value value of evidence key
48
48
  */
49
49
  add (key, value) {
50
50
  // Filter out any evidence that isn't needed in the pipeline
@@ -76,7 +76,7 @@ class Evidence {
76
76
  *
77
77
  * @param {object} evidenceObject key value map of evidence
78
78
  * @param {string} evidenceObject.key evidencekey
79
- * @param {Mixed} evidenceObject.value evidence value
79
+ * @param {*} evidenceObject.value evidence value
80
80
  */
81
81
  addObject (evidenceObject) {
82
82
  const evidenceContainer = this;
@@ -92,7 +92,7 @@ class Evidence {
92
92
  * headers, cookies, protocol, IP and query params
93
93
  *
94
94
  * @param {object} request an HTTP request object
95
- * @returns {undefined}
95
+ * @returns {Evidence} return updated evidence
96
96
  */
97
97
  addFromRequest (request) {
98
98
  // Process headers
@@ -173,7 +173,7 @@ class Evidence {
173
173
  * Get a piece of evidence
174
174
  *
175
175
  * @param {string} key evidence key to retreive
176
- * @returns {mixed} the evidence value
176
+ * @returns {*} the evidence value
177
177
  */
178
178
  get (key) {
179
179
  return this.evidenceStore[key];
package/flowData.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 util = require('util');
@@ -126,7 +126,7 @@ class FlowData {
126
126
  * Set an error on the flowData (usually triggered by
127
127
  * something going wrong in a flowElement's process function)
128
128
  *
129
- * @param {mixed} error the error to throw
129
+ * @param {*} error the error to throw
130
130
  * @param {FlowElement} flowElement the FlowElement the error is thrown on
131
131
  */
132
132
  setError (error, flowElement) {
package/flowElement.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 EvidenceKeyFilterBase = require('./evidenceKeyFilter');
@@ -25,6 +25,7 @@ const EvidenceKeyFilterBase = require('./evidenceKeyFilter');
25
25
  /**
26
26
  * @typedef {import('./flowData')} FlowData
27
27
  * @typedef {import('./pipeline')} Pipeline
28
+ * @typedef {import('./evidenceKeyFilter')} EvidenceKeyFilter
28
29
  */
29
30
 
30
31
  /**
@@ -66,9 +67,15 @@ class FlowElement {
66
67
  this.evidenceKeyFilter = new EvidenceKeyFilterBase();
67
68
  }
68
69
 
70
+ /**
71
+ * @type {Function[]}
72
+ */
69
73
  this.registrationCallbacks = [];
70
74
 
71
75
  // List of pipelines the flowElement has been added to
76
+ /**
77
+ * @type {Pipeline[]}
78
+ */
72
79
  this.pipelines = [];
73
80
  }
74
81
 
@@ -102,7 +109,7 @@ class FlowElement {
102
109
  * by a pipleline is processsed. Overriden by instances of this base class
103
110
  *
104
111
  * @param {FlowData} flowData FlowData being processed
105
- * @returns {Mixed} result of processing
112
+ * @returns {*} result of processing
106
113
  */
107
114
  processInternal (flowData) {
108
115
  return true;
@@ -149,6 +156,12 @@ class FlowElement {
149
156
  return this.properties;
150
157
  }
151
158
 
159
+ /**
160
+ * Internal log
161
+ *
162
+ * @param {string} type log type
163
+ * @param {*} message message to log
164
+ */
152
165
  _log (type, message) {
153
166
  if (this.pipelines) {
154
167
  this.pipelines.forEach(pipeline => {
package/helpers.js CHANGED
@@ -1,30 +1,34 @@
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('./flowData')} FlowData
25
+ */
26
+
23
27
  class Helpers {
24
28
  /**
25
29
  * Set response headers in the response object (e.g. Accept-CH)
26
30
  *
27
- * @param {http.ServerResponse} response The response to set the headers in.
31
+ * @param {import('http').ServerResponse} response The response to set the headers in.
28
32
  * @param {FlowData} flowData A processed FlowData instance to get the response header values
29
33
  * from.
30
34
  */
@@ -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 mustache = require('mustache');
@@ -36,6 +36,10 @@ const ElementDataDictionary = require('./elementDataDictionary.js');
36
36
  const Constants = require('./constants.js');
37
37
  const uglifyJS = require('uglify-js');
38
38
 
39
+ /**
40
+ * @typedef {import('./flowData')} FlowData
41
+ */
42
+
39
43
  /**
40
44
  * An instance of EvidenceKeyFilter which removes all but header
41
45
  * and query evidence as that is all that is used by
package/jsonbundler.js CHANGED
@@ -1,29 +1,33 @@
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 FlowElement = require('./flowElement.js');
24
24
  const ElementDataDictionary = require('./elementDataDictionary.js');
25
25
  const BasicListEvidenceKeyFilter = require('./basicListEvidenceKeyFilter.js');
26
26
 
27
+ /**
28
+ * @typedef {import('./flowData')} FlowData
29
+ */
30
+
27
31
  const elementBlacklist = ['jsonbundler', 'javascriptbuilder', 'sequence', 'set-headers'];
28
32
 
29
33
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fiftyone.pipeline.core",
3
- "version": "4.4.98",
3
+ "version": "4.4.100",
4
4
  "description": "Core library for the 51Degrees Pipeline API",
5
5
  "keywords": [
6
6
  "51degrees",
@@ -22,10 +22,12 @@
22
22
  "uglify-js": "^3.17.4"
23
23
  },
24
24
  "devDependencies": {
25
- "@types/node": "^15.14.9",
25
+ "@types/jest": "^27.5.2",
26
+ "@types/node": "^20.14.10",
26
27
  "jest": "^27.5.1",
27
28
  "jest-each": "^27.5.1",
28
- "node-mocks-http": "^1.13.0"
29
+ "node-mocks-http": "^1.13.0",
30
+ "typescript": "^5.5.3"
29
31
  },
30
32
  "license": "EUPL-1.2",
31
33
  "bugs": {
package/pipeline.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 FlowData = require('./flowData');
@@ -25,7 +25,7 @@ const EventEmitter = require('events');
25
25
 
26
26
  /**
27
27
  * @typedef {import('./flowElement')} FlowElement
28
- * @typedef {import('../fiftyone.pipeline.engines/dataFileUpdateService')} DataFileUpdateService
28
+ * @typedef {import('fiftyone.pipeline.engines').DataFileUpdateService} DataFileUpdateService
29
29
  */
30
30
 
31
31
  /**
@@ -52,10 +52,16 @@ class Pipeline {
52
52
  // If true then pipeline will suppress exceptions added to FlowData.
53
53
  this.suppressProcessExceptions = suppressProcessExceptions;
54
54
 
55
- // A logger for emitting messages
55
+ /**
56
+ * A logger for emitting messages
57
+ * @type {EventEmitter}
58
+ */
56
59
  this.eventEmitter = new EventEmitter();
57
60
 
58
61
  // Flattened dictionary of flowElements the pipeline contains
62
+ /**
63
+ * @type {object}
64
+ */
59
65
  this.flowElements = {};
60
66
 
61
67
  if (dataFileUpdateService) {
@@ -67,8 +73,8 @@ class Pipeline {
67
73
  // in the pipeline.flowElements object.
68
74
  // Recursive function so it can handle parallel elements
69
75
  // which are passed in as arrays
70
- const storeInFlowElementList = function (flowElemmentList) {
71
- flowElemmentList.forEach(function (slot) {
76
+ const storeInFlowElementList = function (flowElementList) {
77
+ flowElementList.forEach(function (slot) {
72
78
  if (Array.isArray(slot)) {
73
79
  storeInFlowElementList(slot);
74
80
  } else {
@@ -87,6 +93,9 @@ class Pipeline {
87
93
 
88
94
  // Empty property database, later populated and possibly
89
95
  // updated by flowElements' property lists
96
+ /**
97
+ * @type {object}
98
+ */
90
99
  this.propertyDatabase = {};
91
100
 
92
101
  // Update property list - Note that some of these could be async
@@ -201,7 +210,7 @@ class Pipeline {
201
210
  * Shorthand to trigger a message on the pipeline's eventEmitter
202
211
  *
203
212
  * @param {string} type type of message
204
- * @param {mixed} message message to store in the log
213
+ * @param {*} message message to store in the log
205
214
  */
206
215
  log (type, message) {
207
216
  this.eventEmitter.emit(type, message);