@shopgate/pwa-core 7.30.0-alpha.10 → 7.30.0-alpha.12

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.
Files changed (37) hide show
  1. package/classes/AppCommand/index.js +17 -15
  2. package/classes/AppCommand/spec.js +11 -8
  3. package/classes/AppCommandRequest/index.js +38 -34
  4. package/classes/AppPermissionsRequest/AppPermissionsRequest.js +21 -15
  5. package/classes/AppPermissionsRequest/GetAppPermissionsRequest.js +12 -8
  6. package/classes/AppPermissionsRequest/RequestAppPermissionsRequest.js +12 -8
  7. package/classes/Bridge/index.js +7 -5
  8. package/classes/BrightnessRequest/index.js +7 -5
  9. package/classes/BrightnessRequest/spec.js +2 -2
  10. package/classes/BrowserConnector/index.js +98 -81
  11. package/classes/Conditioner/index.js +17 -14
  12. package/classes/DataRequest/index.js +25 -19
  13. package/classes/DevServerBridge/index.js +11 -9
  14. package/classes/DevServerBridge/spec.js +4 -4
  15. package/classes/ErrorManager/index.js +11 -9
  16. package/classes/Event/index.js +29 -24
  17. package/classes/HttpRequest/index.js +39 -33
  18. package/classes/PipelineDependencies/index.js +11 -9
  19. package/classes/PipelineDependencies/spec.js +1 -1
  20. package/classes/PipelineManager/index.js +48 -46
  21. package/classes/PipelineRequest/index.js +50 -44
  22. package/classes/PipelineRequest/mock.js +52 -39
  23. package/classes/PipelineRequest/spec.js +1 -1
  24. package/classes/PipelineSequence/index.js +11 -9
  25. package/classes/Request/index.js +15 -13
  26. package/classes/RequestBuffer/index.js +11 -9
  27. package/classes/RequestManager/index.js +20 -15
  28. package/classes/RequestManager/spec.js +40 -25
  29. package/classes/Scanner/index.js +218 -219
  30. package/classes/ScannerEvent/index.js +22 -22
  31. package/classes/ScannerEventHandler/index.js +35 -35
  32. package/classes/ScannerEventListener/index.js +77 -78
  33. package/classes/ScannerManager/ScanProcessingError.js +11 -5
  34. package/classes/ScannerManager/index.js +16 -14
  35. package/classes/WebStorageRequest/index.js +18 -12
  36. package/helpers/index.js +8 -8
  37. package/package.json +1 -1
@@ -11,238 +11,237 @@ import { openScanner as openAppScanner, startScanner as startAppScanner, stopSca
11
11
  /**
12
12
  * Represents the app scanner.
13
13
  */
14
- export class Scanner {
14
+ export let Scanner =
15
+ /**
16
+ * Initializes the scanner
17
+ */
18
+ function Scanner() {
15
19
  /**
16
- * Initializes the scanner
20
+ * Reset Scanner state
17
21
  */
18
- constructor() {
19
- /**
20
- * Reset Scanner state
21
- */
22
- this.reset = () => {
23
- this.scope = null;
24
- this.type = null;
25
- this.opened = false;
26
- this.running = false;
27
- this.handling = false;
28
- this.flashlightEnabled = false;
29
- this.closeHandler = null;
30
- };
31
- /**
32
- * Adds an event listener to the scanner.
33
- * @param {ScannerEventListener} eventListener The eventListener to add.
34
- */
35
- this.addListener = eventListener => {
36
- this.eventHandler.attach(eventListener);
37
- };
38
- /**
39
- * @param {ScannerEventListener} eventListener The event listener to remove.
40
- * @returns {boolean} Returns false if the listener was not found by id. Returns true otherwise.
41
- */
42
- this.removeListener = eventListener => this.eventHandler.detach(eventListener);
43
- /**
44
- * Callback for the close handler for the scanner. The scanner stops scanning and notifies
45
- * the close handler when it's done. The close handler can either shut down the Scanner instance
46
- * by calling its close() method or restart it to continue scanning.
47
- *
48
- * @callback Scanner~CloseHandler
49
- * @param {Scanner} scannerInstance The instance of the scanner which requested closing.
50
- * @returns {undefined|null} The return value is ignored.
51
- */
52
- /**
53
- * Starts the app scanner. It will instantly start the scanning process for type
54
- * "barcodeRecognition". The image scanner requires user interaction to scan.
55
- * @param {string} scope The initially activated scanner scope.
56
- * @param {ScannerType|string} type The initially activated scanner type.
57
- * @param {CloseHandler|null} [closeHandler] This handler is called when the Scanner is closed.
58
- * @param {string|null} [source] Tells the app which overlay to use, null for "current".
59
- * @param {string|null} [animation] Tells the app what type of animation to apply when opening.
60
- */
61
- this.open = async (scope, type = SCANNER_TYPE_BARCODE, closeHandler = null, source = null, animation = null) => {
62
- const errMsgPrefix = 'Failed to open scanner:';
22
+ this.reset = () => {
23
+ this.scope = null;
24
+ this.type = null;
25
+ this.opened = false;
26
+ this.running = false;
27
+ this.handling = false;
28
+ this.flashlightEnabled = false;
29
+ this.closeHandler = null;
30
+ };
31
+ /**
32
+ * Adds an event listener to the scanner.
33
+ * @param {ScannerEventListener} eventListener The eventListener to add.
34
+ */
35
+ this.addListener = eventListener => {
36
+ this.eventHandler.attach(eventListener);
37
+ };
38
+ /**
39
+ * @param {ScannerEventListener} eventListener The event listener to remove.
40
+ * @returns {boolean} Returns false if the listener was not found by id. Returns true otherwise.
41
+ */
42
+ this.removeListener = eventListener => this.eventHandler.detach(eventListener);
43
+ /**
44
+ * Callback for the close handler for the scanner. The scanner stops scanning and notifies
45
+ * the close handler when it's done. The close handler can either shut down the Scanner instance
46
+ * by calling its close() method or restart it to continue scanning.
47
+ *
48
+ * @callback Scanner~CloseHandler
49
+ * @param {Scanner} scannerInstance The instance of the scanner which requested closing.
50
+ * @returns {undefined|null} The return value is ignored.
51
+ */
52
+ /**
53
+ * Starts the app scanner. It will instantly start the scanning process for type
54
+ * "barcodeRecognition". The image scanner requires user interaction to scan.
55
+ * @param {string} scope The initially activated scanner scope.
56
+ * @param {ScannerType|string} type The initially activated scanner type.
57
+ * @param {CloseHandler|null} [closeHandler] This handler is called when the Scanner is closed.
58
+ * @param {string|null} [source] Tells the app which overlay to use, null for "current".
59
+ * @param {string|null} [animation] Tells the app what type of animation to apply when opening.
60
+ */
61
+ this.open = async (scope, type = SCANNER_TYPE_BARCODE, closeHandler = null, source = null, animation = null) => {
62
+ const errMsgPrefix = 'Failed to open scanner:';
63
63
 
64
- // A minimum app lib version is required, which is defined above.
65
- let libVersionResult;
66
- try {
67
- libVersionResult = await isLibVersionAtLeast(SCANNER_MIN_APP_LIB_VERSION);
68
- } catch (err) {
69
- logger.error(`${errMsgPrefix} Could not fetch app lib version. Instead received error:`, err);
70
- return;
71
- }
72
- if (!libVersionResult) {
73
- const err = new Error(`${errMsgPrefix} App lib version must be at least equal to or higher than ${SCANNER_MIN_APP_LIB_VERSION}.`);
74
- logger.error(err);
75
- return;
76
- }
64
+ // A minimum app lib version is required, which is defined above.
65
+ let libVersionResult;
66
+ try {
67
+ libVersionResult = await isLibVersionAtLeast(SCANNER_MIN_APP_LIB_VERSION);
68
+ } catch (err) {
69
+ logger.error(`${errMsgPrefix} Could not fetch app lib version. Instead received error:`, err);
70
+ return;
71
+ }
72
+ if (!libVersionResult) {
73
+ const err = new Error(`${errMsgPrefix} App lib version must be at least equal to or higher than ${SCANNER_MIN_APP_LIB_VERSION}.`);
74
+ logger.error(err);
75
+ return;
76
+ }
77
77
 
78
- // Make sure the scope was properly set
79
- if (!scope || scope === '') {
80
- const err = new Error(`${errMsgPrefix} Scope can not be empty.`);
81
- logger.error(err);
82
- return;
83
- }
84
- if (!this.supportedTypes.includes(type)) {
85
- const err = new Error(`${errMsgPrefix} ${type} is a not supported scanner type.`);
86
- logger.error(err);
87
- return;
88
- }
78
+ // Make sure the scope was properly set
79
+ if (!scope || scope === '') {
80
+ const err = new Error(`${errMsgPrefix} Scope can not be empty.`);
81
+ logger.error(err);
82
+ return;
83
+ }
84
+ if (!this.supportedTypes.includes(type)) {
85
+ const err = new Error(`${errMsgPrefix} ${type} is a not supported scanner type.`);
86
+ logger.error(err);
87
+ return;
88
+ }
89
89
 
90
- // Only one instance can be running at the same time.
91
- if (this.opened) {
92
- const err = new Error(`${errMsgPrefix} An instance with scope "${this.scope}" is already running.`);
93
- logger.error(err);
94
- return;
95
- }
96
- if (closeHandler !== null && typeof closeHandler !== 'function') {
97
- const err = new Error(`${errMsgPrefix} Close handler must be a function.`);
98
- logger.error(err);
99
- return;
100
- }
90
+ // Only one instance can be running at the same time.
91
+ if (this.opened) {
92
+ const err = new Error(`${errMsgPrefix} An instance with scope "${this.scope}" is already running.`);
93
+ logger.error(err);
94
+ return;
95
+ }
96
+ if (closeHandler !== null && typeof closeHandler !== 'function') {
97
+ const err = new Error(`${errMsgPrefix} Close handler must be a function.`);
98
+ logger.error(err);
99
+ return;
100
+ }
101
101
 
102
- // Add a listener to the scannerDidScan app event to process scanned data.
103
- appEvent.addCallback(APP_EVENT_SCANNER_DID_SCAN, this.handleScan);
102
+ // Add a listener to the scannerDidScan app event to process scanned data.
103
+ appEvent.addCallback(APP_EVENT_SCANNER_DID_SCAN, this.handleScan);
104
104
 
105
- // Open the app scanner.
106
- openAppScanner({
107
- src: source || '',
108
- modes: {
109
- [type]: SCANNER_MODE_ON
110
- },
111
- animation: animation || SCANNER_ANIMATION_NONE
112
- });
105
+ // Open the app scanner.
106
+ openAppScanner({
107
+ src: source || '',
108
+ modes: {
109
+ [type]: SCANNER_MODE_ON
110
+ },
111
+ animation: animation || SCANNER_ANIMATION_NONE
112
+ });
113
113
 
114
- // Initialize internal states
115
- this.scope = scope;
116
- this.type = type;
117
- this.opened = true;
114
+ // Initialize internal states
115
+ this.scope = scope;
116
+ this.type = type;
117
+ this.opened = true;
118
118
 
119
- // Image scanner does not automatically scan
120
- this.running = this.type !== SCANNER_TYPE_IMAGE;
121
- this.closeHandler = closeHandler || null;
122
- };
123
- /**
124
- * Starts the Scanner if it is opened and not already running.
125
- */
126
- this.start = () => {
127
- if (!this.opened) {
128
- logger.error(new Error("Can't start Scanner: Scanner is not opened."));
129
- return;
130
- }
131
- this.handling = false;
119
+ // Image scanner does not automatically scan
120
+ this.running = this.type !== SCANNER_TYPE_IMAGE;
121
+ this.closeHandler = closeHandler || null;
122
+ };
123
+ /**
124
+ * Starts the Scanner if it is opened and not already running.
125
+ */
126
+ this.start = () => {
127
+ if (!this.opened) {
128
+ logger.error(new Error("Can't start Scanner: Scanner is not opened."));
129
+ return;
130
+ }
131
+ this.handling = false;
132
132
 
133
- // Start only if not already running.
134
- if (!this.running) {
135
- this.running = true;
136
- startAppScanner();
137
- }
138
- };
139
- /**
140
- * Stops the scanner if it is opened and running.
141
- */
142
- this.stop = () => {
143
- if (!this.opened) {
144
- logger.error(new Error("Can't start Scanner: Scanner is not opened."));
145
- return;
146
- }
133
+ // Start only if not already running.
134
+ if (!this.running) {
135
+ this.running = true;
136
+ startAppScanner();
137
+ }
138
+ };
139
+ /**
140
+ * Stops the scanner if it is opened and running.
141
+ */
142
+ this.stop = () => {
143
+ if (!this.opened) {
144
+ logger.error(new Error("Can't start Scanner: Scanner is not opened."));
145
+ return;
146
+ }
147
147
 
148
- // Stop only if is running at the moment.
149
- if (this.isRunning) {
150
- this.running = false;
151
- stopAppScanner();
152
- }
153
- };
154
- /**
155
- * Close the app scanner.
156
- */
157
- this.close = () => {
158
- if (!this.opened) {
159
- logger.warn("Can't close Scanner: Scanner is not opened.");
160
- return;
161
- }
148
+ // Stop only if is running at the moment.
149
+ if (this.isRunning) {
150
+ this.running = false;
151
+ stopAppScanner();
152
+ }
153
+ };
154
+ /**
155
+ * Close the app scanner.
156
+ */
157
+ this.close = () => {
158
+ if (!this.opened) {
159
+ logger.warn("Can't close Scanner: Scanner is not opened.");
160
+ return;
161
+ }
162
162
 
163
- // Remove the listener to avoid further scan results.
164
- appEvent.removeCallback(APP_EVENT_SCANNER_DID_SCAN, this.handleScan);
163
+ // Remove the listener to avoid further scan results.
164
+ appEvent.removeCallback(APP_EVENT_SCANNER_DID_SCAN, this.handleScan);
165
165
 
166
- // Switch off flashlight to make sure it does not stay enabled.
167
- this.toggleFlashlight(false);
168
- closeAppScanner();
169
- this.reset();
170
- };
171
- /**
172
- * Switches between the flashlight being on or off. The return result might not always
173
- * be reliable when the app is brought into the background or if other apps interfere.
174
- * Can only be toggled when the scanner is opened.
175
- * @param {boolean|undefined} [enable] True/false to switch on/off or leave out for toggle.
176
- * @returns {boolean} Returns the new flashlight on/off state.
177
- */
178
- this.toggleFlashlight = (enable = undefined) => {
179
- if (!this.opened) {
180
- logger.error(new Error("Can't toggle the flashlight: Scanner not opened!"));
181
- return false;
182
- }
183
- if (enable !== undefined) {
184
- this.flashlightEnabled = !!enable;
185
- } else {
186
- this.flashlightEnabled = !this.flashlightEnabled;
187
- }
188
- setAppScannerFlashlightMode(this.flashlightEnabled);
189
- return this.flashlightEnabled;
190
- };
191
- /**
192
- * Because opening the scanner can fail silently, this is a way to check if it was
193
- * opened properly.
194
- * @returns {boolean}
195
- */
196
- this.isOpened = () => this.opened;
197
- /**
198
- * Some scanner types don't start and all of them stop running after a successful scan.
199
- * This method allows checking if a scan is currently in progress.
200
- * @returns {boolean}
201
- */
202
- this.isRunning = () => this.running;
203
- /**
204
- * Helps checking the current state of the flashlight. This might not be reliable as the
205
- * flashlight is turned off without notice, when the app is pushed into the background.
206
- * @returns {boolean}
207
- */
208
- this.isFlashlightEnabled = () => this.flashlightEnabled;
209
- /**
210
- * The internal handler for the "scannerDidScan" app event.
211
- * @private
212
- * @param {ScannerEventPayload} payload The payload of the scanner event for the scanned result.
213
- */
214
- this.handleScan = async payload => {
215
- const event = new ScannerEvent(this.scope, this.type, payload);
216
- if (!this.eventHandler.hasListenersForEvent(event)) {
217
- logger.warn('No scanner listeners', payload);
218
- return;
219
- }
220
- if (this.handling) {
221
- logger.warn('Scan result ignored in handling stage', payload);
222
- return;
223
- }
224
- this.handling = true;
225
- this.stop();
226
- try {
227
- // Ignore return values from handlers.
228
- await this.eventHandler.notifyAllListeners(event);
166
+ // Switch off flashlight to make sure it does not stay enabled.
167
+ this.toggleFlashlight(false);
168
+ closeAppScanner();
169
+ this.reset();
170
+ };
171
+ /**
172
+ * Switches between the flashlight being on or off. The return result might not always
173
+ * be reliable when the app is brought into the background or if other apps interfere.
174
+ * Can only be toggled when the scanner is opened.
175
+ * @param {boolean|undefined} [enable] True/false to switch on/off or leave out for toggle.
176
+ * @returns {boolean} Returns the new flashlight on/off state.
177
+ */
178
+ this.toggleFlashlight = (enable = undefined) => {
179
+ if (!this.opened) {
180
+ logger.error(new Error("Can't toggle the flashlight: Scanner not opened!"));
181
+ return false;
182
+ }
183
+ if (enable !== undefined) {
184
+ this.flashlightEnabled = !!enable;
185
+ } else {
186
+ this.flashlightEnabled = !this.flashlightEnabled;
187
+ }
188
+ setAppScannerFlashlightMode(this.flashlightEnabled);
189
+ return this.flashlightEnabled;
190
+ };
191
+ /**
192
+ * Because opening the scanner can fail silently, this is a way to check if it was
193
+ * opened properly.
194
+ * @returns {boolean}
195
+ */
196
+ this.isOpened = () => this.opened;
197
+ /**
198
+ * Some scanner types don't start and all of them stop running after a successful scan.
199
+ * This method allows checking if a scan is currently in progress.
200
+ * @returns {boolean}
201
+ */
202
+ this.isRunning = () => this.running;
203
+ /**
204
+ * Helps checking the current state of the flashlight. This might not be reliable as the
205
+ * flashlight is turned off without notice, when the app is pushed into the background.
206
+ * @returns {boolean}
207
+ */
208
+ this.isFlashlightEnabled = () => this.flashlightEnabled;
209
+ /**
210
+ * The internal handler for the "scannerDidScan" app event.
211
+ * @private
212
+ * @param {ScannerEventPayload} payload The payload of the scanner event for the scanned result.
213
+ */
214
+ this.handleScan = async payload => {
215
+ const event = new ScannerEvent(this.scope, this.type, payload);
216
+ if (!this.eventHandler.hasListenersForEvent(event)) {
217
+ logger.warn('No scanner listeners', payload);
218
+ return;
219
+ }
220
+ if (this.handling) {
221
+ logger.warn('Scan result ignored in handling stage', payload);
222
+ return;
223
+ }
224
+ this.handling = true;
225
+ this.stop();
226
+ try {
227
+ // Ignore return values from handlers.
228
+ await this.eventHandler.notifyAllListeners(event);
229
229
 
230
- // Notify the close handler that the Scanner is done doing his work.
231
- if (this.closeHandler) {
232
- this.closeHandler(this);
233
- }
234
- } catch (error) {
235
- logger.warn('Scan handler threw error:', error);
236
- // Force restart when a handler throws an error.
237
- this.start();
238
- }
239
- };
240
- this.supportedTypes = [SCANNER_TYPE_BARCODE, SCANNER_TYPE_IMAGE];
241
- this.eventHandler = new ScannerEventHandler();
230
+ // Notify the close handler that the Scanner is done doing his work.
231
+ if (this.closeHandler) {
232
+ this.closeHandler(this);
233
+ }
234
+ } catch (error) {
235
+ logger.warn('Scan handler threw error:', error);
236
+ // Force restart when a handler throws an error.
237
+ this.start();
238
+ }
239
+ };
240
+ this.supportedTypes = [SCANNER_TYPE_BARCODE, SCANNER_TYPE_IMAGE];
241
+ this.eventHandler = new ScannerEventHandler();
242
242
 
243
- // Register app scan event to listen for.
244
- registerEvents([APP_EVENT_SCANNER_DID_SCAN]);
245
- this.reset();
246
- }
247
- }
243
+ // Register app scan event to listen for.
244
+ registerEvents([APP_EVENT_SCANNER_DID_SCAN]);
245
+ this.reset();
246
+ };
248
247
  export default new Scanner();
@@ -5,27 +5,27 @@
5
5
  *
6
6
  * Defines an event which is emitted when the scanner scans something.
7
7
  */
8
- export default class ScannerEvent {
8
+ let ScannerEvent =
9
+ /**
10
+ * @param {string} scope The scanner instance, that was running when this event was emitted.
11
+ * @param {string} type The type of scanner that produced this result.
12
+ * @param {ScannerEventPayload} payload The payload of the scan result.
13
+ */
14
+ function ScannerEvent(scope, type, payload) {
15
+ /**
16
+ * @returns {string}
17
+ */
18
+ this.getScope = () => this.scope;
19
+ /**
20
+ * @returns {string}
21
+ */
22
+ this.getType = () => this.type;
9
23
  /**
10
- * @param {string} scope The scanner instance, that was running when this event was emitted.
11
- * @param {string} type The type of scanner that produced this result.
12
- * @param {ScannerEventPayload} payload The payload of the scan result.
24
+ * @returns {ScannerEventPayload}
13
25
  */
14
- constructor(scope, type, payload) {
15
- /**
16
- * @returns {string}
17
- */
18
- this.getScope = () => this.scope;
19
- /**
20
- * @returns {string}
21
- */
22
- this.getType = () => this.type;
23
- /**
24
- * @returns {ScannerEventPayload}
25
- */
26
- this.getPayload = () => this.payload;
27
- this.scope = scope;
28
- this.type = type;
29
- this.payload = payload;
30
- }
31
- }
26
+ this.getPayload = () => this.payload;
27
+ this.scope = scope;
28
+ this.type = type;
29
+ this.payload = payload;
30
+ };
31
+ export { ScannerEvent as default };
@@ -1,41 +1,41 @@
1
1
  /**
2
2
  * Manages scanner event listeners.
3
3
  */
4
- export default class ScannerEventHandler {
4
+ let ScannerEventHandler =
5
+ /**
6
+ * Initializes the event handler.
7
+ */
8
+ function ScannerEventHandler() {
9
+ /**
10
+ * @param {ScannerEventListener} eventListener The event listener to attach to the handler.
11
+ */
12
+ this.attach = eventListener => {
13
+ this.eventListeners.add(eventListener);
14
+ };
15
+ /**
16
+ * @param {ScannerEventListener} eventListener The event listener to detach from the handler.
17
+ * @returns {boolean} Returns true if the event listener was detached successfully.
18
+ */
19
+ this.detach = eventListener => this.eventListeners.delete(eventListener);
20
+ /**
21
+ * @param {ScannerEvent} event The event which has been emitted by the scanner.
22
+ * @returns {boolean}
23
+ */
24
+ this.hasListenersForEvent = event => Array.from(this.eventListeners).some(listener => listener.canHandleEvent(event));
5
25
  /**
6
- * Initializes the event handler.
26
+ * @param {ScannerEvent} event The event which has been emitted by the scanner.
27
+ * @returns {Promise<undefined>}
28
+ * @throws {Error}
7
29
  */
8
- constructor() {
9
- /**
10
- * @param {ScannerEventListener} eventListener The event listener to attach to the handler.
11
- */
12
- this.attach = eventListener => {
13
- this.eventListeners.add(eventListener);
14
- };
15
- /**
16
- * @param {ScannerEventListener} eventListener The event listener to detach from the handler.
17
- * @returns {boolean} Returns true if the event listener was detached successfully.
18
- */
19
- this.detach = eventListener => this.eventListeners.delete(eventListener);
20
- /**
21
- * @param {ScannerEvent} event The event which has been emitted by the scanner.
22
- * @returns {boolean}
23
- */
24
- this.hasListenersForEvent = event => Array.from(this.eventListeners).some(listener => listener.canHandleEvent(event));
25
- /**
26
- * @param {ScannerEvent} event The event which has been emitted by the scanner.
27
- * @returns {Promise<undefined>}
28
- * @throws {Error}
29
- */
30
- this.notifyAllListeners = event => {
31
- const notifyResults = [];
32
- this.eventListeners.forEach(listener => {
33
- notifyResults.push(listener.notify(event));
34
- });
30
+ this.notifyAllListeners = event => {
31
+ const notifyResults = [];
32
+ this.eventListeners.forEach(listener => {
33
+ notifyResults.push(listener.notify(event));
34
+ });
35
35
 
36
- // Forward occurring errors only, because there should be no return value from "notify"
37
- return Promise.all(notifyResults).then(() => {});
38
- };
39
- this.eventListeners = new Set();
40
- }
41
- }
36
+ // Forward occurring errors only, because there should be no return value from "notify"
37
+ return Promise.all(notifyResults).then(() => {});
38
+ };
39
+ this.eventListeners = new Set();
40
+ };
41
+ export { ScannerEventHandler as default };