@angular-helpers/browser-web-apis 21.10.0 → 21.11.0

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,22 +1,66 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, inject, DestroyRef, PLATFORM_ID, signal, computed, isSignal, effect, ElementRef, makeEnvironmentProviders } from '@angular/core';
2
+ import { InjectionToken, isDevMode, inject, Injectable, DestroyRef, PLATFORM_ID, signal, computed, isSignal, effect, ElementRef, makeEnvironmentProviders } from '@angular/core';
3
3
  import { isPlatformBrowser, isPlatformServer } from '@angular/common';
4
4
  import { Observable, fromEvent, Subject, of, map as map$1 } from 'rxjs';
5
5
  import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { filter, map, distinctUntilChanged } from 'rxjs/operators';
7
7
  import { Router } from '@angular/router';
8
8
 
9
+ const LEVEL_RANK = {
10
+ debug: 10,
11
+ info: 20,
12
+ warn: 30,
13
+ error: 40,
14
+ silent: 100,
15
+ };
16
+ /**
17
+ * Global log level for `BROWSER_API_LOGGER`. Defaults to `'debug'` in dev mode and
18
+ * `'warn'` in production. Override via `provideBrowserApiLogLevel('silent')` etc.
19
+ */
20
+ const BROWSER_API_LOG_LEVEL = new InjectionToken('BROWSER_API_LOG_LEVEL', {
21
+ providedIn: 'root',
22
+ factory: () => (isDevMode() ? 'debug' : 'warn'),
23
+ });
9
24
  const BROWSER_API_LOGGER = new InjectionToken('BROWSER_API_LOGGER', {
10
25
  providedIn: 'root',
11
- factory: () => ({
12
- // oxlint-disable-next-line no-console
13
- info: (message) => console.info(message),
14
- // oxlint-disable-next-line no-console
15
- warn: (message) => console.warn(message),
16
- // oxlint-disable-next-line no-console
17
- error: (message, error) => console.error(message, error),
18
- }),
26
+ factory: () => {
27
+ const level = inject(BROWSER_API_LOG_LEVEL);
28
+ return createLevelGatedLogger(level);
29
+ },
19
30
  });
31
+ function createLevelGatedLogger(level) {
32
+ const min = LEVEL_RANK[level];
33
+ return {
34
+ debug: (message) => {
35
+ if (LEVEL_RANK.debug < min)
36
+ return;
37
+ // oxlint-disable-next-line no-console
38
+ console.debug(message);
39
+ },
40
+ info: (message) => {
41
+ if (LEVEL_RANK.info < min)
42
+ return;
43
+ // oxlint-disable-next-line no-console
44
+ console.info(message);
45
+ },
46
+ warn: (message) => {
47
+ if (LEVEL_RANK.warn < min)
48
+ return;
49
+ // oxlint-disable-next-line no-console
50
+ console.warn(message);
51
+ },
52
+ error: (message, error) => {
53
+ if (LEVEL_RANK.error < min)
54
+ return;
55
+ // oxlint-disable-next-line no-console
56
+ console.error(message, error);
57
+ },
58
+ };
59
+ }
60
+ /** Log level helper provider. Overrides the default `BROWSER_API_LOG_LEVEL`. */
61
+ function provideBrowserApiLogLevel(level) {
62
+ return { provide: BROWSER_API_LOG_LEVEL, useValue: level };
63
+ }
20
64
 
21
65
  const BROWSER_CAPABILITIES = [
22
66
  { id: 'permissions', label: 'Permissions API', requiresSecureContext: false },
@@ -267,6 +311,9 @@ class BrowserApiBaseService {
267
311
  logInfo(message) {
268
312
  this.logger.info(`[${this.getApiName()}] ${message}`);
269
313
  }
314
+ logDebug(message) {
315
+ this.logger.debug?.(`[${this.getApiName()}] ${message}`);
316
+ }
270
317
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: BrowserApiBaseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
271
318
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: BrowserApiBaseService });
272
319
  }
@@ -3285,6 +3332,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
3285
3332
  type: Injectable
3286
3333
  }] });
3287
3334
 
3335
+ /**
3336
+ * When set to `true`, suppresses the one-time runtime warning that experimental
3337
+ * services emit on first use. Default is `false` (warnings emitted).
3338
+ */
3339
+ const BROWSER_API_EXPERIMENTAL_SILENT = new InjectionToken('BROWSER_API_EXPERIMENTAL_SILENT', {
3340
+ providedIn: 'root',
3341
+ factory: () => false,
3342
+ });
3343
+ const warned = new Set();
3344
+ /**
3345
+ * Emit a one-time runtime warning explaining that the API is experimental and
3346
+ * subject to breaking changes. No-op after the first call for a given key, or if
3347
+ * the consumer has provided `BROWSER_API_EXPERIMENTAL_SILENT` as `true`.
3348
+ */
3349
+ function warnExperimental(key, context) {
3350
+ if (context.silent)
3351
+ return;
3352
+ if (warned.has(key))
3353
+ return;
3354
+ warned.add(key);
3355
+ context.logger.warn(`[browser-web-apis:experimental] "${key}" is part of the experimental surface ` +
3356
+ 'and may change without a major bump. Provide BROWSER_API_EXPERIMENTAL_SILENT=true ' +
3357
+ 'to suppress this warning.');
3358
+ }
3359
+ /** Test-only: reset the in-memory dedup set. */
3360
+ function resetExperimentalWarnings() {
3361
+ warned.clear();
3362
+ }
3363
+
3288
3364
  // Common types for browser APIs
3289
3365
 
3290
3366
  function injectPageVisibility() {
@@ -4000,9 +4076,33 @@ const defaultBrowserWebApisConfig = {
4000
4076
  enableWebAudio: false,
4001
4077
  enableGamepad: false,
4002
4078
  };
4079
+ let legacyFlagsDeprecationLogged = false;
4003
4080
  function provideBrowserWebApis(config = {}) {
4004
- const mergedConfig = { ...defaultBrowserWebApisConfig, ...config };
4081
+ const { services, ...flagConfig } = config;
4082
+ // Composition-first path: only `services` provided, no flags.
4083
+ if (services && Object.keys(flagConfig).length === 0) {
4084
+ return makeEnvironmentProviders([
4085
+ PermissionsService,
4086
+ ...services.flatMap((env) => env.ɵproviders ?? []),
4087
+ ]);
4088
+ }
4089
+ // Legacy flag-bag path. Log deprecation once if any enableX is set.
4090
+ if (Object.keys(flagConfig).length > 0 && !legacyFlagsDeprecationLogged) {
4091
+ legacyFlagsDeprecationLogged = true;
4092
+ // oxlint-disable-next-line no-console
4093
+ console.warn('[browser-web-apis] provideBrowserWebApis(enableX flags) is deprecated. ' +
4094
+ 'Pass `{ services: [provideCamera(), ...] }` instead. The flag-bag form will be ' +
4095
+ 'removed in v22.');
4096
+ }
4097
+ const mergedConfig = { ...defaultBrowserWebApisConfig, ...flagConfig };
4005
4098
  const providers = [PermissionsService];
4099
+ if (services) {
4100
+ for (const env of services) {
4101
+ const inner = env.ɵproviders;
4102
+ if (inner)
4103
+ providers.push(...inner);
4104
+ }
4105
+ }
4006
4106
  const conditionalProviders = [
4007
4107
  [mergedConfig.enableCamera, CameraService],
4008
4108
  [mergedConfig.enableGeolocation, GeolocationService],
@@ -4048,4 +4148,4 @@ const version = '0.1.0';
4048
4148
  * Generated bundle index. Do not edit.
4049
4149
  */
4050
4150
 
4051
- export { BROWSER_API_LOGGER, BatteryService, BroadcastChannelService, BrowserApiBaseService, BrowserCapabilityService, BrowserSupportUtil, CameraService, ClipboardService, CompressionService, ConnectionRegistryBaseService, FileSystemAccessService, FullscreenService, GamepadService, GeolocationService, IntersectionObserverService, MediaDevicesService, MediaRecorderService, MutationObserverService, NetworkInformationService, NotificationService, PageVisibilityService, PerformanceObserverService, PermissionsService, ResizeObserverService, ScreenOrientationService, ScreenWakeLockService, ServerSentEventsService, SpeechSynthesisService, StorageManagerService, VibrationService, WebAudioService, WebLocksService, WebShareService, WebSocketClient, WebSocketService, WebStorageService, WebWorkerService, permissionGuard as createPermissionGuard, defaultBrowserWebApisConfig, injectBattery, injectClipboard, injectGamepad, injectGeolocation, injectIntersectionObserver, injectMutationObserver, injectNetworkInformation, injectPageVisibility, injectPerformanceObserver, injectResizeObserver, injectScreenOrientation, injectWakeLock, permissionGuard, provideBattery, provideBroadcastChannel, provideBrowserWebApis, provideCamera, provideClipboard, provideCommunicationApis, provideCompression, provideFileSystemAccess, provideFullscreen, provideGamepad, provideGeolocation, provideIntersectionObserver, provideLocationApis, provideMediaApis, provideMediaDevices, provideMediaRecorder, provideMutationObserver, provideNetworkInformation, provideNotifications, providePageVisibility, providePerformanceObserver, providePermissions, provideResizeObserver, provideScreenOrientation, provideScreenWakeLock, provideServerSentEvents, provideSpeechSynthesis, provideStorageApis, provideStorageManager, provideVibration, provideWebAudio, provideWebLocks, provideWebShare, provideWebSocket, provideWebStorage, provideWebWorker, version };
4151
+ export { BROWSER_API_EXPERIMENTAL_SILENT, BROWSER_API_LOGGER, BROWSER_API_LOG_LEVEL, BatteryService, BroadcastChannelService, BrowserApiBaseService, BrowserCapabilityService, BrowserSupportUtil, CameraService, ClipboardService, CompressionService, ConnectionRegistryBaseService, FileSystemAccessService, FullscreenService, GamepadService, GeolocationService, IntersectionObserverService, MediaDevicesService, MediaRecorderService, MutationObserverService, NetworkInformationService, NotificationService, PageVisibilityService, PerformanceObserverService, PermissionsService, ResizeObserverService, ScreenOrientationService, ScreenWakeLockService, ServerSentEventsService, SpeechSynthesisService, StorageManagerService, VibrationService, WebAudioService, WebLocksService, WebShareService, WebSocketClient, WebSocketService, WebStorageService, WebWorkerService, permissionGuard as createPermissionGuard, defaultBrowserWebApisConfig, injectBattery, injectClipboard, injectGamepad, injectGeolocation, injectIntersectionObserver, injectMutationObserver, injectNetworkInformation, injectPageVisibility, injectPerformanceObserver, injectResizeObserver, injectScreenOrientation, injectWakeLock, permissionGuard, provideBattery, provideBroadcastChannel, provideBrowserApiLogLevel, provideBrowserWebApis, provideCamera, provideClipboard, provideCommunicationApis, provideCompression, provideFileSystemAccess, provideFullscreen, provideGamepad, provideGeolocation, provideIntersectionObserver, provideLocationApis, provideMediaApis, provideMediaDevices, provideMediaRecorder, provideMutationObserver, provideNetworkInformation, provideNotifications, providePageVisibility, providePerformanceObserver, providePermissions, provideResizeObserver, provideScreenOrientation, provideScreenWakeLock, provideServerSentEvents, provideSpeechSynthesis, provideStorageApis, provideStorageManager, provideVibration, provideWebAudio, provideWebLocks, provideWebShare, provideWebSocket, provideWebStorage, provideWebWorker, version, warnExperimental };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-helpers/browser-web-apis",
3
- "version": "21.10.0",
3
+ "version": "21.11.0",
4
4
  "description": "Sistema de servicios Angular para acceso formalizado a Browser Web APIs (cámara, permisos, geolocalización, etc.)",
5
5
  "homepage": "https://gaspar1992.github.io/angular-helpers/docs/browser-web-apis",
6
6
  "repository": {
@@ -230,6 +230,7 @@ declare abstract class BrowserApiBaseService {
230
230
  protected logError(message: string, error?: unknown): void;
231
231
  protected logWarn(message: string): void;
232
232
  protected logInfo(message: string): void;
233
+ protected logDebug(message: string): void;
233
234
  static ɵfac: i0.ɵɵFactoryDeclaration<BrowserApiBaseService, never>;
234
235
  static ɵprov: i0.ɵɵInjectableDeclaration<BrowserApiBaseService>;
235
236
  }
@@ -392,12 +393,24 @@ type ErrorCallback = (error: BrowserError) => void;
392
393
  */
393
394
  type ElementInput = Element | ElementRef<Element> | Signal<Element | ElementRef<Element> | undefined>;
394
395
 
396
+ type BrowserApiLogLevel = 'debug' | 'info' | 'warn' | 'error' | 'silent';
395
397
  interface BrowserApiLogger {
398
+ debug?(message: string): void;
396
399
  info(message: string): void;
397
400
  warn(message: string): void;
398
401
  error(message: string, error?: unknown): void;
399
402
  }
403
+ /**
404
+ * Global log level for `BROWSER_API_LOGGER`. Defaults to `'debug'` in dev mode and
405
+ * `'warn'` in production. Override via `provideBrowserApiLogLevel('silent')` etc.
406
+ */
407
+ declare const BROWSER_API_LOG_LEVEL: InjectionToken<BrowserApiLogLevel>;
400
408
  declare const BROWSER_API_LOGGER: InjectionToken<BrowserApiLogger>;
409
+ /** Log level helper provider. Overrides the default `BROWSER_API_LOG_LEVEL`. */
410
+ declare function provideBrowserApiLogLevel(level: BrowserApiLogLevel): {
411
+ provide: InjectionToken<BrowserApiLogLevel>;
412
+ useValue: BrowserApiLogLevel;
413
+ };
401
414
 
402
415
  interface StorageOptions {
403
416
  /** Optional prefix used to namespace keys (e.g. `app:` -> `app:userId`). */
@@ -1242,6 +1255,24 @@ declare class CompressionService extends BrowserApiBaseService {
1242
1255
  static ɵprov: i0.ɵɵInjectableDeclaration<CompressionService>;
1243
1256
  }
1244
1257
 
1258
+ /**
1259
+ * When set to `true`, suppresses the one-time runtime warning that experimental
1260
+ * services emit on first use. Default is `false` (warnings emitted).
1261
+ */
1262
+ declare const BROWSER_API_EXPERIMENTAL_SILENT: InjectionToken<boolean>;
1263
+ interface ExperimentalWarnContext {
1264
+ silent: boolean;
1265
+ logger: {
1266
+ warn: (message: string) => void;
1267
+ };
1268
+ }
1269
+ /**
1270
+ * Emit a one-time runtime warning explaining that the API is experimental and
1271
+ * subject to breaking changes. No-op after the first call for a given key, or if
1272
+ * the consumer has provided `BROWSER_API_EXPERIMENTAL_SILENT` as `true`.
1273
+ */
1274
+ declare function warnExperimental(key: string, context: ExperimentalWarnContext): void;
1275
+
1245
1276
  interface MediaDevice {
1246
1277
  deviceId: string;
1247
1278
  groupId: string;
@@ -1547,7 +1578,20 @@ declare function provideLocationApis(): EnvironmentProviders;
1547
1578
  declare function provideStorageApis(): EnvironmentProviders;
1548
1579
  declare function provideCommunicationApis(): EnvironmentProviders;
1549
1580
 
1550
- interface BrowserWebApisConfig {
1581
+ /**
1582
+ * Composition-first config: pass an array of `provide*()` calls and we merge them
1583
+ * into a single `EnvironmentProviders`. Preferred over the `enableX` flag bag.
1584
+ *
1585
+ * ```ts
1586
+ * provideBrowserWebApis({
1587
+ * services: [provideCamera(), provideClipboard(), provideMediaApis()],
1588
+ * })
1589
+ * ```
1590
+ */
1591
+ interface BrowserWebApisCompositionConfig {
1592
+ services?: EnvironmentProviders[];
1593
+ }
1594
+ interface BrowserWebApisConfig extends BrowserWebApisCompositionConfig {
1551
1595
  enableCamera?: boolean;
1552
1596
  enableGeolocation?: boolean;
1553
1597
  enableNotifications?: boolean;
@@ -1581,5 +1625,5 @@ declare function provideBrowserWebApis(config?: BrowserWebApisConfig): Environme
1581
1625
 
1582
1626
  declare const version = "0.1.0";
1583
1627
 
1584
- export { BROWSER_API_LOGGER, BatteryService, BroadcastChannelService, BrowserApiBaseService, BrowserCapabilityService, BrowserSupportUtil, CameraService, ClipboardService, CompressionService, ConnectionRegistryBaseService, FileSystemAccessService, FullscreenService, GamepadService, GeolocationService, IntersectionObserverService, MediaDevicesService, MediaRecorderService, MutationObserverService, NetworkInformationService, NotificationService, PageVisibilityService, PerformanceObserverService, PermissionsService, ResizeObserverService, ScreenOrientationService, ScreenWakeLockService, ServerSentEventsService, SpeechSynthesisService, StorageManagerService, VibrationService, WebAudioService, WebLocksService, WebShareService, WebSocketClient, WebSocketService, WebStorageService, WebWorkerService, permissionGuard as createPermissionGuard, defaultBrowserWebApisConfig, injectBattery, injectClipboard, injectGamepad, injectGeolocation, injectIntersectionObserver, injectMutationObserver, injectNetworkInformation, injectPageVisibility, injectPerformanceObserver, injectResizeObserver, injectScreenOrientation, injectWakeLock, permissionGuard, provideBattery, provideBroadcastChannel, provideBrowserWebApis, provideCamera, provideClipboard, provideCommunicationApis, provideCompression, provideFileSystemAccess, provideFullscreen, provideGamepad, provideGeolocation, provideIntersectionObserver, provideLocationApis, provideMediaApis, provideMediaDevices, provideMediaRecorder, provideMutationObserver, provideNetworkInformation, provideNotifications, providePageVisibility, providePerformanceObserver, providePermissions, provideResizeObserver, provideScreenOrientation, provideScreenWakeLock, provideServerSentEvents, provideSpeechSynthesis, provideStorageApis, provideStorageManager, provideVibration, provideWebAudio, provideWebLocks, provideWebShare, provideWebSocket, provideWebStorage, provideWebWorker, version };
1585
- export type { AudioAnalyserData, AudioContextState, BatteryInfo, BatteryManager, BatteryRef, BrowserApiLogger, BrowserCapabilityId, BrowserError, BrowserPermissions, BrowserWebApisConfig, CameraCapabilities, CameraInfo, ClipboardRef, CompressionFormat, ConnectionType, EffectiveConnectionType, ElementInput, ElementSize, ErrorCallback, EventHandler, FileOpenOptions, FileSaveOptions, GamepadRef, GamepadState, GeolocationCoordinates, GeolocationError, GeolocationOptions, GeolocationPosition$1 as GeolocationPosition, GeolocationRef, GeolocationWatchOptions, IntersectionObserverOptions, IntersectionRef, MediaDevice, MediaDeviceKind, MediaDevicesInfo, MediaStreamConstraints$1 as MediaStreamConstraints, MediaTrackConstraints$1 as MediaTrackConstraints, MutationObserverOptions, MutationRef, NetworkInformation, NetworkInformationRef, OrientationInfo, OrientationLockType, OrientationType, PageVisibilityRef, PerformanceEntryType, PerformanceObserverConfig, PerformanceObserverRef, PermissionNameExt, PermissionRequest, RecordingOptions, RecordingResult, RecordingState, ResizeObserverOptions, ResizeRef, SSEConfig, SSEConnectionState, SSEMessage, ScreenOrientationRef, SpeechOptions, SpeechState, StorageEvent, StorageNamespace, StorageOptions, StorageQuotaEstimate, StorageValue, VibrationPattern, VibrationPreset, VisibilityState, WakeLockRef, WakeLockStatus, WakeLockType, WebSocketClientConfig, WebSocketConfig, WebSocketMessage, WebSocketRequestOptions, WebSocketState, WebSocketStatus, WebSocketStatusV2, WorkerMessage, WorkerRequestOptions, WorkerStatus, WorkerTask };
1628
+ export { BROWSER_API_EXPERIMENTAL_SILENT, BROWSER_API_LOGGER, BROWSER_API_LOG_LEVEL, BatteryService, BroadcastChannelService, BrowserApiBaseService, BrowserCapabilityService, BrowserSupportUtil, CameraService, ClipboardService, CompressionService, ConnectionRegistryBaseService, FileSystemAccessService, FullscreenService, GamepadService, GeolocationService, IntersectionObserverService, MediaDevicesService, MediaRecorderService, MutationObserverService, NetworkInformationService, NotificationService, PageVisibilityService, PerformanceObserverService, PermissionsService, ResizeObserverService, ScreenOrientationService, ScreenWakeLockService, ServerSentEventsService, SpeechSynthesisService, StorageManagerService, VibrationService, WebAudioService, WebLocksService, WebShareService, WebSocketClient, WebSocketService, WebStorageService, WebWorkerService, permissionGuard as createPermissionGuard, defaultBrowserWebApisConfig, injectBattery, injectClipboard, injectGamepad, injectGeolocation, injectIntersectionObserver, injectMutationObserver, injectNetworkInformation, injectPageVisibility, injectPerformanceObserver, injectResizeObserver, injectScreenOrientation, injectWakeLock, permissionGuard, provideBattery, provideBroadcastChannel, provideBrowserApiLogLevel, provideBrowserWebApis, provideCamera, provideClipboard, provideCommunicationApis, provideCompression, provideFileSystemAccess, provideFullscreen, provideGamepad, provideGeolocation, provideIntersectionObserver, provideLocationApis, provideMediaApis, provideMediaDevices, provideMediaRecorder, provideMutationObserver, provideNetworkInformation, provideNotifications, providePageVisibility, providePerformanceObserver, providePermissions, provideResizeObserver, provideScreenOrientation, provideScreenWakeLock, provideServerSentEvents, provideSpeechSynthesis, provideStorageApis, provideStorageManager, provideVibration, provideWebAudio, provideWebLocks, provideWebShare, provideWebSocket, provideWebStorage, provideWebWorker, version, warnExperimental };
1629
+ export type { AudioAnalyserData, AudioContextState, BatteryInfo, BatteryManager, BatteryRef, BrowserApiLogLevel, BrowserApiLogger, BrowserCapabilityId, BrowserError, BrowserPermissions, BrowserWebApisCompositionConfig, BrowserWebApisConfig, CameraCapabilities, CameraInfo, ClipboardRef, CompressionFormat, ConnectionType, EffectiveConnectionType, ElementInput, ElementSize, ErrorCallback, EventHandler, ExperimentalWarnContext, FileOpenOptions, FileSaveOptions, GamepadRef, GamepadState, GeolocationCoordinates, GeolocationError, GeolocationOptions, GeolocationPosition$1 as GeolocationPosition, GeolocationRef, GeolocationWatchOptions, IntersectionObserverOptions, IntersectionRef, MediaDevice, MediaDeviceKind, MediaDevicesInfo, MediaStreamConstraints$1 as MediaStreamConstraints, MediaTrackConstraints$1 as MediaTrackConstraints, MutationObserverOptions, MutationRef, NetworkInformation, NetworkInformationRef, OrientationInfo, OrientationLockType, OrientationType, PageVisibilityRef, PerformanceEntryType, PerformanceObserverConfig, PerformanceObserverRef, PermissionNameExt, PermissionRequest, RecordingOptions, RecordingResult, RecordingState, ResizeObserverOptions, ResizeRef, SSEConfig, SSEConnectionState, SSEMessage, ScreenOrientationRef, SpeechOptions, SpeechState, StorageEvent, StorageNamespace, StorageOptions, StorageQuotaEstimate, StorageValue, VibrationPattern, VibrationPreset, VisibilityState, WakeLockRef, WakeLockStatus, WakeLockType, WebSocketClientConfig, WebSocketConfig, WebSocketMessage, WebSocketRequestOptions, WebSocketState, WebSocketStatus, WebSocketStatusV2, WorkerMessage, WorkerRequestOptions, WorkerStatus, WorkerTask };