@camera.ui/browser 0.0.84 → 0.0.86

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 (25) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/types/packages/client/browser/src/streaming/go2rts-session.d.ts +0 -1
  3. package/dist/types/packages/client/browser/src/utils.d.ts +1 -1
  4. package/dist/types/server/src/api/database/index.d.ts +6 -2
  5. package/dist/types/server/src/api/schemas/cameras.schema.d.ts +5 -4
  6. package/dist/types/server/src/api/schemas/users.schema.d.ts +2 -2
  7. package/dist/types/server/src/api/types/index.d.ts +1 -1
  8. package/dist/types/server/src/api/utils/fetch.d.ts +2 -0
  9. package/dist/types/server/src/api/websocket/index.d.ts +1 -0
  10. package/dist/types/server/src/api/websocket/nsp/main.d.ts +7 -0
  11. package/dist/types/server/src/api/websocket/nsp/notifications.d.ts +5 -4
  12. package/dist/types/server/src/api/websocket/nsp/server.d.ts +14 -2
  13. package/dist/types/server/src/api/websocket/types.d.ts +1 -1
  14. package/dist/types/server/src/camera/controller.d.ts +3 -1
  15. package/dist/types/server/src/camera/index.d.ts +3 -7
  16. package/dist/types/server/src/camera/interfaces/camera.d.ts +1 -1
  17. package/dist/types/server/src/camera/types.d.ts +8 -2
  18. package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +4 -9
  19. package/dist/types/server/src/nats/types.d.ts +12 -5
  20. package/dist/types/server/src/polyglot/node/plugins/pluginApi.d.ts +0 -3
  21. package/dist/types/server/src/services/config/index.d.ts +6 -2
  22. package/dist/types/server/src/services/logger/index.d.ts +5 -12
  23. package/dist/types/server/src/utils/npm.d.ts +1 -0
  24. package/package.json +5 -5
  25. package/dist/types/server/src/api/websocket/nsp/frameWorker.d.ts +0 -13
@@ -52,5 +52,4 @@ export declare class Go2RTCSession extends EventTarget {
52
52
  private createCodecsList;
53
53
  private parseCodecs;
54
54
  private btoaBinary;
55
- private uuidv4;
56
55
  }
@@ -9,4 +9,4 @@ export declare const safariVersion: () => RegExpMatchArray | null;
9
9
  export declare const isFirefox: () => boolean;
10
10
  export declare const isChrome: () => boolean;
11
11
  export declare const isTouch: () => boolean;
12
- export declare const uuidv4: () => string;
12
+ export declare const generateUUID: () => string;
@@ -16,7 +16,6 @@ export declare class Database {
16
16
  pluginsDB: DB<DBPlugin[], 'plugins'>;
17
17
  settingsDB: DB<DBSettings, 'settings'>;
18
18
  usersDB: DB<DBUser[], 'users'>;
19
- private initialized;
20
19
  private lowdb;
21
20
  private databaseMigration;
22
21
  private databases;
@@ -26,9 +25,14 @@ export declare class Database {
26
25
  constructor(app: FastifyInstance);
27
26
  initialize(): Promise<void>;
28
27
  close(): Promise<void>;
28
+ getRootAdminId(): Promise<string | null>;
29
29
  updateCameras(): Promise<void>;
30
30
  createPluginDatabase(plugin: Plugin): Promise<void>;
31
31
  private ensureDatabases;
32
- private updateConfig;
32
+ private ensureAdmin;
33
+ private initializeRootAdmin;
34
+ private removeOldRootAdmin;
33
35
  private generateAdmin;
36
+ private saveRootAdminSecret;
37
+ private updateConfig;
34
38
  }
@@ -151,11 +151,12 @@ export declare const activitySettingsSchema: zod.ZodObject<{
151
151
  };
152
152
  }>;
153
153
  export declare const inputRoleSchema: zod.ZodUnion<[zod.ZodLiteral<"high-resolution">, zod.ZodLiteral<"mid-resolution">, zod.ZodLiteral<"low-resolution">, zod.ZodLiteral<"snapshot">]>;
154
+ export declare const inputProtocolSchema: zod.ZodUnion<[zod.ZodLiteral<"bubble://">, zod.ZodLiteral<"dvrip://">, zod.ZodLiteral<"echo:">, zod.ZodLiteral<"exec:">, zod.ZodLiteral<"expr:">, zod.ZodLiteral<"ffmpeg:">, zod.ZodLiteral<"gopro://">, zod.ZodLiteral<"hass:">, zod.ZodLiteral<"homekit://">, zod.ZodLiteral<"http://">, zod.ZodLiteral<"https://">, zod.ZodLiteral<"httpx://">, zod.ZodLiteral<"isapi://">, zod.ZodLiteral<"ivideon:">, zod.ZodLiteral<"kasa://">, zod.ZodLiteral<"nest:">, zod.ZodLiteral<"onvif://">, zod.ZodLiteral<"roborock://">, zod.ZodLiteral<"rtmp://">, zod.ZodLiteral<"rtsp://">, zod.ZodLiteral<"rtspx://">, zod.ZodLiteral<"tapo://">, zod.ZodLiteral<"tcp://">, zod.ZodLiteral<"webrtc:">, zod.ZodLiteral<"webtorrent:">]>;
154
155
  export declare const inputSchema: zod.ZodObject<{
155
156
  _id: zod.ZodEffects<zod.ZodDefault<zod.ZodString>, string, string | undefined>;
156
157
  name: zod.ZodEffects<zod.ZodString, string, string>;
157
158
  roles: zod.ZodArray<zod.ZodUnion<[zod.ZodLiteral<"high-resolution">, zod.ZodLiteral<"mid-resolution">, zod.ZodLiteral<"low-resolution">, zod.ZodLiteral<"snapshot">]>, "many">;
158
- urls: zod.ZodArray<zod.ZodString, "many">;
159
+ urls: zod.ZodArray<zod.ZodEffects<zod.ZodString, string, string>, "many">;
159
160
  }, "strict", zod.ZodTypeAny, {
160
161
  name: string;
161
162
  _id: string;
@@ -171,7 +172,7 @@ export declare const patchInputSchema: zod.ZodObject<{
171
172
  _id: zod.ZodEffects<zod.ZodDefault<zod.ZodString>, string, string | undefined>;
172
173
  name: zod.ZodEffects<zod.ZodString, string, string>;
173
174
  roles: zod.ZodArray<zod.ZodUnion<[zod.ZodLiteral<"high-resolution">, zod.ZodLiteral<"mid-resolution">, zod.ZodLiteral<"low-resolution">, zod.ZodLiteral<"snapshot">]>, "many">;
174
- urls: zod.ZodArray<zod.ZodString, "many">;
175
+ urls: zod.ZodArray<zod.ZodEffects<zod.ZodString, string, string>, "many">;
175
176
  }, "strict", zod.ZodTypeAny, {
176
177
  name: string;
177
178
  _id: string;
@@ -290,7 +291,7 @@ export declare const createCameraSchema: zod.ZodObject<{
290
291
  _id: zod.ZodEffects<zod.ZodDefault<zod.ZodString>, string, string | undefined>;
291
292
  name: zod.ZodEffects<zod.ZodString, string, string>;
292
293
  roles: zod.ZodArray<zod.ZodUnion<[zod.ZodLiteral<"high-resolution">, zod.ZodLiteral<"mid-resolution">, zod.ZodLiteral<"low-resolution">, zod.ZodLiteral<"snapshot">]>, "many">;
293
- urls: zod.ZodArray<zod.ZodString, "many">;
294
+ urls: zod.ZodArray<zod.ZodEffects<zod.ZodString, string, string>, "many">;
294
295
  }, "strict", zod.ZodTypeAny, {
295
296
  name: string;
296
297
  _id: string;
@@ -627,7 +628,7 @@ export declare const patchCameraSchema: zod.ZodObject<{
627
628
  _id: zod.ZodEffects<zod.ZodDefault<zod.ZodString>, string, string | undefined>;
628
629
  name: zod.ZodEffects<zod.ZodString, string, string>;
629
630
  roles: zod.ZodArray<zod.ZodUnion<[zod.ZodLiteral<"high-resolution">, zod.ZodLiteral<"mid-resolution">, zod.ZodLiteral<"low-resolution">, zod.ZodLiteral<"snapshot">]>, "many">;
630
- urls: zod.ZodArray<zod.ZodString, "many">;
631
+ urls: zod.ZodArray<zod.ZodEffects<zod.ZodString, string, string>, "many">;
631
632
  }, "strict", zod.ZodTypeAny, {
632
633
  name: string;
633
634
  _id: string;
@@ -391,7 +391,7 @@ export declare const userPreferences: zod.ZodObject<{
391
391
  }>;
392
392
  export declare const createUserSchema: zod.ZodEffects<zod.ZodObject<{
393
393
  _id: zod.ZodEffects<zod.ZodDefault<zod.ZodString>, string, string | undefined>;
394
- username: zod.ZodString;
394
+ username: zod.ZodEffects<zod.ZodString, string, string>;
395
395
  password: zod.ZodString;
396
396
  passwordConfirm: zod.ZodString;
397
397
  role: zod.ZodUnion<[zod.ZodLiteral<"admin">, zod.ZodLiteral<"user">]>;
@@ -704,7 +704,7 @@ export declare const loginUserSchema: zod.ZodObject<{
704
704
  rememberMe?: boolean | undefined;
705
705
  }>;
706
706
  export declare const patchUserSchema: zod.ZodEffects<zod.ZodObject<{
707
- username: zod.ZodOptional<zod.ZodString>;
707
+ username: zod.ZodEffects<zod.ZodOptional<zod.ZodString>, string | undefined, string | undefined>;
708
708
  password: zod.ZodOptional<zod.ZodString>;
709
709
  passwordConfirm: zod.ZodOptional<zod.ZodString>;
710
710
  role: zod.ZodOptional<zod.ZodUnion<[zod.ZodLiteral<"admin">, zod.ZodLiteral<"user">]>>;
@@ -429,7 +429,7 @@ export interface INpmPerson {
429
429
  export interface IPackageJson {
430
430
  name: string;
431
431
  displayName?: string;
432
- version?: string;
432
+ version: string;
433
433
  description?: string;
434
434
  keywords?: string[];
435
435
  homepage?: string;
@@ -0,0 +1,2 @@
1
+ declare const fetchWithTimeout: (url: string, options?: RequestInit) => Promise<Response>;
2
+ export default fetchWithTimeout;
@@ -9,6 +9,7 @@ export declare class SocketService {
9
9
  private logger;
10
10
  private authService;
11
11
  private configService;
12
+ private api;
12
13
  constructor(app: FastifyInstance, opts: Partial<ServerOptions>);
13
14
  private registerNamespaces;
14
15
  private setupConnection;
@@ -0,0 +1,7 @@
1
+ import type { Namespace, Server } from 'socket.io';
2
+ import type { SocketNsp } from '../types.js';
3
+ export declare class MainNamespace {
4
+ nsp: Namespace;
5
+ nspName: SocketNsp;
6
+ constructor(io: Server);
7
+ }
@@ -1,11 +1,12 @@
1
- import type { Namespace, Server, Socket } from 'socket.io';
1
+ import type { Namespace, Server } from 'socket.io';
2
+ import type { UiNotification } from '../../types/index.js';
2
3
  import type { SocketNsp } from '../types.js';
3
4
  export declare class NotificationsNamespace {
4
5
  nsp: Namespace;
5
6
  nspName: SocketNsp;
6
7
  private logger;
7
8
  constructor(io: Server);
8
- clearNotifications(): Promise<void>;
9
- getNotifications(socket: Socket): Promise<void>;
10
- removeNotification(id?: string): Promise<void>;
9
+ clearNotifications(): void;
10
+ getNotifications(payload: any, callback?: Function): UiNotification[];
11
+ removeNotification(id?: string): void;
11
12
  }
@@ -1,9 +1,21 @@
1
- import type { Namespace, Server, Socket } from 'socket.io';
1
+ import type { Namespace, Server } from 'socket.io';
2
+ import type { INpmPluginState } from '../../types/index.js';
2
3
  import type { SocketNsp } from '../types.js';
3
4
  export declare class ServerNamespace {
4
5
  nsp: Namespace;
5
6
  nspName: SocketNsp;
6
7
  private logger;
8
+ private pluginsService;
9
+ private serverUpdate;
10
+ private pluginUpdates;
7
11
  constructor(io: Server);
8
- checkUpdate(socket?: Socket): Promise<void>;
12
+ getUpdates(payload: any, callback?: Function): {
13
+ server?: INpmPluginState;
14
+ plugins: INpmPluginState[];
15
+ };
16
+ checkUpdate(): Promise<void>;
17
+ checkServerUpdate(): Promise<void>;
18
+ checkPluginUpdates(): Promise<void>;
19
+ private getPluginFromNpm;
20
+ private getAvailablePluginVersions;
9
21
  }
@@ -1,7 +1,7 @@
1
1
  import type { Namespace } from 'socket.io';
2
2
  import type { PLUGIN_STATUS } from '../../plugins/types.js';
3
3
  import type { RuntimeInfo } from '../../services/config/types.js';
4
- export type SocketNsp = '/camera.ui' | '/metrics' | '/logs' | '/status' | '/notifications' | '/plugins' | '/proxy' | '/frame' | '/frameWorker';
4
+ export type SocketNsp = '/camera.ui' | '/metrics' | '/logs' | '/status' | '/notifications' | '/plugins' | '/proxy' | '/server';
5
5
  export interface SocketNspMap {
6
6
  nsp: Namespace;
7
7
  [key: string]: any;
@@ -5,7 +5,7 @@ import type { Camera } from '../api/database/types.js';
5
5
  import type { MotionFrame, VideoFrame } from '../decoder/types.js';
6
6
  import type { ProxyServer } from '../nats/index.js';
7
7
  import type { IceServer } from '../services/config/types.js';
8
- import type { BaseLogger, CameraConfigInputSettings, CameraDelegate, CameraSource, SetValues } from './types.js';
8
+ import type { BaseLogger, CameraConfigInputSettings, CameraDelegate, CameraSource, Container, PrebufferState, SetValues } from './types.js';
9
9
  export declare class CameraController extends CameraDevice {
10
10
  proxy: ProxyServer;
11
11
  private motionTimeout?;
@@ -32,6 +32,8 @@ export declare class CameraController extends CameraDevice {
32
32
  updateCameraSource(sourceId: string, source: Partial<CameraConfigInputSettings>): Promise<void>;
33
33
  removeCameraSource(sourceId: string): Promise<void>;
34
34
  updateCamera(updatedCamera: Camera): void;
35
+ updatePrebuffer(sourceId: string, container: Container, state: PrebufferState): void;
36
+ cameraSourcePrebufferState(sourceId: string, container: Container): PrebufferState;
35
37
  cleanup(): void;
36
38
  private subscribeToCameraState;
37
39
  private subscribeToCameraSourcesState;
@@ -4,7 +4,7 @@ import { Subscribed } from '../utils/subscribed.js';
4
4
  import type { Observable } from 'rxjs';
5
5
  import type { Camera, CameraActivitySettings, CameraFrameWorkerSettings, CameraInformation, CameraType } from '../api/database/types.js';
6
6
  import type { IceServer } from '../services/config/types.js';
7
- import type { AudioSetEvent, AudioState, BaseLogger, BatterySetEvent, BatteryState, CameraDelegate, CameraPTZDelegate, CameraPrebufferDelegate, CameraSource, Container, DetectionZone, DoorbellSetEvent, DoorbellState, LightSetEvent, LightState, MotionSetEvent, MotionState, ObjectSetEvent, ObjectState, PrebufferState, SetValues, SirenSetEvent, SirenState, StateValues } from './types.js';
7
+ import type { AudioSetEvent, AudioState, BaseLogger, BatterySetEvent, BatteryState, CameraDelegate, CameraPTZDelegate, CameraPrebufferDelegate, CameraSource, Container, DetectionZone, DoorbellSetEvent, DoorbellState, LightSetEvent, LightState, MotionSetEvent, MotionState, ObjectSetEvent, ObjectState, PrebufferState, PrebufferSubject, SetValues, SirenSetEvent, SirenState, StateValues } from './types.js';
8
8
  export declare abstract class BaseCameraDevice extends Subscribed {
9
9
  protected logger: BaseLogger;
10
10
  protected snapshotCache: LRUCache<string, ArrayBuffer, unknown>;
@@ -17,11 +17,7 @@ export declare abstract class BaseCameraDevice extends Subscribed {
17
17
  protected doorbellState: BehaviorSubject<DoorbellState>;
18
18
  protected sirenState: BehaviorSubject<SirenState>;
19
19
  protected batteryState: BehaviorSubject<BatteryState>;
20
- protected prebufferStateSubjects: {
21
- [sourceId: string]: {
22
- [container: string]: BehaviorSubject<PrebufferState>;
23
- };
24
- };
20
+ protected prebufferStateSubjects: PrebufferSubject;
25
21
  readonly onConnected: Observable<boolean>;
26
22
  readonly onLightSwitched: Observable<LightState>;
27
23
  readonly onMotionDetected: Observable<MotionState>;
@@ -66,7 +62,7 @@ export declare abstract class BaseCameraDevice extends Subscribed {
66
62
  abstract getIceServers(): Promise<IceServer[]>;
67
63
  protected abstract cleanup(): void;
68
64
  getValue<T extends keyof StateValues>(stateName: T): StateValues[T];
69
- snapshot(forceNew?: boolean): Promise<ArrayBuffer>;
65
+ snapshot(forceNew?: boolean): Promise<ArrayBuffer | undefined>;
70
66
  onStateChange<T extends keyof StateValues>(stateName: T): Observable<{
71
67
  newState: StateValues[T];
72
68
  oldState: StateValues[T];
@@ -5,6 +5,6 @@ export declare class CameraInterface extends CameraDelegate {
5
5
  private onRequest;
6
6
  private logger;
7
7
  constructor(onRequest: (client: any, fn: string, args?: any[], timeout?: number) => Promise<any>, logger: BaseLogger);
8
- snapshot(): Promise<ArrayBuffer>;
8
+ snapshot(): Promise<ArrayBuffer | undefined>;
9
9
  private _onRequest;
10
10
  }
@@ -1,4 +1,4 @@
1
- import type { Observable } from 'rxjs';
1
+ import type { BehaviorSubject, Observable } from 'rxjs';
2
2
  import type { CameraInformation, CameraInput, CameraInputSettings, Point, ZoneFilter, ZoneType } from '../api/database/types.js';
3
3
  import type { FrameData, FrameMetadata } from '../decoder/types.js';
4
4
  import type { CameraInterface } from './interfaces/camera.js';
@@ -171,6 +171,12 @@ export interface SetValues {
171
171
  siren: SirenSetEvent;
172
172
  battery: BatterySetEvent;
173
173
  }
174
+ export interface PrebufferSubject {
175
+ [sourceId: string]: {
176
+ mp4: BehaviorSubject<PrebufferState>;
177
+ mpegts: BehaviorSubject<PrebufferState>;
178
+ };
179
+ }
174
180
  export type CameraStateCallbacks = {
175
181
  [K in keyof StateValues]: (event: StateValues[K]) => void;
176
182
  };
@@ -178,7 +184,7 @@ export type StateValue<T extends keyof StateValues> = StateValues[T];
178
184
  export type SetValue<T extends keyof SetValues> = SetValues[T];
179
185
  export type OnChangeCallback<T extends keyof StateValues> = (newEvent: StateValues[T], oldEvent: StateValues[T]) => void;
180
186
  export declare abstract class CameraDelegate {
181
- abstract snapshot(): Promise<ArrayBuffer>;
187
+ abstract snapshot(): Promise<ArrayBuffer | undefined>;
182
188
  }
183
189
  export declare abstract class CameraPrebufferDelegate {
184
190
  abstract getStreamInfo(sourceName: string): Promise<StreamInfo | undefined>;
@@ -1,9 +1,8 @@
1
- import type { Camera } from '../../api/database/types.js';
2
- import type { CameraConfigInputSettings, CameraInterfaces, Container, PrebufferState, SetValues, StateValues } from '../../camera/types.js';
1
+ import type { CameraConfigInputSettings, CameraInterfaces, Container, PrebufferState, SetValues } from '../../camera/types.js';
3
2
  import type { IceServer } from '../../services/config/types.js';
4
3
  import type { MethodKeys, MethodType } from '../../types.js';
5
4
  import type { MessageQueue } from '../messageQueue.js';
6
- import type { CameraDeviceProxyMethods, ProxyMessageStructure } from '../types.js';
5
+ import type { CameraDeviceProxyMethods, ProxyMessageStructure, RefreshedStates } from '../types.js';
7
6
  export declare class CameraDeviceProxy implements CameraDeviceProxyMethods {
8
7
  private api;
9
8
  private configService;
@@ -20,11 +19,7 @@ export declare class CameraDeviceProxy implements CameraDeviceProxyMethods {
20
19
  addCameraSource(source: CameraConfigInputSettings, cameraId: string, pluginId: string): Promise<void>;
21
20
  updateCameraSource(sourceId: string, source: Partial<CameraConfigInputSettings>, cameraId: string, pluginId: string): Promise<void>;
22
21
  removeCameraSource(sourceId: string, cameraId: string, pluginId: string): Promise<void>;
23
- refreshStates(cameraId: string): {
24
- camera: Camera;
25
- states: StateValues;
26
- cameraState: boolean;
27
- };
28
- onRequest<T extends keyof CameraInterfaces, K extends MethodKeys<CameraInterfaces[T]>>(cameraId: string, client: T, fn: K, ...args: Parameters<MethodType<CameraInterfaces[T], K>>): Promise<Awaited<ReturnType<MethodType<CameraInterfaces[T], K>>>>;
22
+ refreshStates(cameraId: string): RefreshedStates;
23
+ onRequest<T extends keyof CameraInterfaces, K extends MethodKeys<CameraInterfaces[T]>>(cameraId: string, client: T, fn: K, ...args: Parameters<MethodType<CameraInterfaces[T], K>>): Promise<Awaited<ReturnType<MethodType<CameraInterfaces[T], K>>> | void>;
29
24
  requestHandler(message: ProxyMessageStructure): Promise<void | ProxyMessageStructure>;
30
25
  }
@@ -39,6 +39,17 @@ export interface StreamPayload {
39
39
  type: Exclude<VideoStreamingMode, 'webrtc' | 'webrtc/tcp'> | 'webrtc/offer' | 'webrtc/candidate';
40
40
  value: string;
41
41
  }
42
+ export interface RefreshedStates {
43
+ camera: Camera;
44
+ states: StateValues;
45
+ cameraState: boolean;
46
+ prebufferStates: {
47
+ [key: string]: {
48
+ mp4: PrebufferState;
49
+ mpegts: PrebufferState;
50
+ };
51
+ };
52
+ }
42
53
  export interface CameraDeviceProxyMethods {
43
54
  connect(): void;
44
55
  disconnect(): void;
@@ -46,11 +57,7 @@ export interface CameraDeviceProxyMethods {
46
57
  getIceServers(): IceServer[];
47
58
  updateState<T extends keyof SetValues>(stateName: T, eventData: SetValues[T]): void;
48
59
  updatePrebufferState(sourceId: string, container: Container, state: PrebufferState): Promise<void>;
49
- refreshStates(): {
50
- camera: Camera;
51
- states: StateValues;
52
- cameraState: boolean;
53
- };
60
+ refreshStates(): RefreshedStates;
54
61
  addCameraSource(source: CameraConfigInputSettings): Promise<void>;
55
62
  updateCameraSource(sourceId: string, source: Partial<CameraConfigInputSettings>): Promise<void>;
56
63
  removeCameraSource(sourceId: string): Promise<void>;
@@ -2,7 +2,6 @@ import { EventEmitter } from 'node:events';
2
2
  import { PluginConfigService } from './configService.js';
3
3
  import { StorageController } from './storageController.js';
4
4
  import type { AuthConfig } from '../../../decoder/types.js';
5
- import type { BasePlugin } from '../../../plugins/interfaces/base.js';
6
5
  import type { PluginInfo } from '../../../plugins/types.js';
7
6
  import type { PluginLogger } from './pluginLogger.js';
8
7
  import type { DeviceManager } from './proxy/deviceManager.js';
@@ -28,7 +27,5 @@ export declare class API extends EventEmitter implements PluginAPI {
28
27
  readonly configService: PluginConfigService;
29
28
  readonly storagePath: string;
30
29
  readonly configFile: string;
31
- readonly plugin: BasePlugin;
32
30
  constructor(plugin: PluginInfo, storagePath: string, configFile: string, logger: PluginLogger, proxyEndpoints: string[], auth: AuthConfig);
33
- private loadModule;
34
31
  }
@@ -6,7 +6,7 @@ export declare class ConfigService {
6
6
  static readonly IS_ELECTRON: boolean;
7
7
  static readonly IS_HA: boolean;
8
8
  static readonly AS_SERVICE: boolean;
9
- static readonly APP_NAME: string;
9
+ static readonly APP_NAME: any;
10
10
  static get VERSION(): string;
11
11
  static readonly NODE_VERSION: string;
12
12
  static readonly MIN_NODE_VERSION: string;
@@ -28,6 +28,7 @@ export declare class ConfigService {
28
28
  readonly LOG_FILE: string;
29
29
  readonly CONFIG_FILE: string;
30
30
  readonly SECRETS_FILE: string;
31
+ readonly ADMIN_FILE: string;
31
32
  readonly GO2RTC_BINARY: string;
32
33
  readonly GO2RTC_CONFIG_FILE: string;
33
34
  readonly NATS_BINARY: string;
@@ -36,7 +37,7 @@ export declare class ConfigService {
36
37
  set config(newConfig: IConfig);
37
38
  get go2rtcConfig(): Go2RtcConfig;
38
39
  set go2rtcConfig(newConfig: Go2RtcConfig);
39
- constructor(storagePath?: string);
40
+ constructor(homePath?: string);
40
41
  static extractVersion(str: string): string | null;
41
42
  read(): void;
42
43
  writeConfig(newConfig?: IConfig): void;
@@ -52,5 +53,8 @@ export declare class ConfigService {
52
53
  private updateSecrets;
53
54
  private createDirs;
54
55
  private generatePluginsPackageJson;
56
+ private safetyEnsureDir;
57
+ private safetyEmptyDir;
58
+ private safetyEnsureFile;
55
59
  private getUserHomeDir;
56
60
  }
@@ -1,19 +1,12 @@
1
1
  import 'reflect-metadata';
2
- import type { Socket } from 'socket.io';
3
2
  import type { UiNotification } from '../../api/types/index.js';
4
3
  import type { LoggingLevel } from '../config/types.js';
5
4
  export declare class Logger {
6
5
  private _loggerPrefix;
7
- private _debugEnabled;
8
- private _traceEnabled;
9
- private _disableTimestamps;
6
+ debugEnabled: boolean;
7
+ traceEnabled: boolean;
8
+ disableTimestamps: boolean;
10
9
  notifications: UiNotification[];
11
- get debugEnabled(): boolean;
12
- set debugEnabled(state: boolean);
13
- get traceEnabled(): boolean;
14
- set traceEnabled(state: boolean);
15
- get disableTimestamps(): boolean;
16
- set disableTimestamps(state: boolean);
17
10
  get prefix(): string;
18
11
  constructor();
19
12
  log(...args: any[]): void;
@@ -22,9 +15,9 @@ export declare class Logger {
22
15
  attention(...args: any[]): void;
23
16
  debug(...args: any[]): void;
24
17
  trace(...args: any[]): void;
25
- notify(title: string, text: string, type: LoggingLevel, link: string, socket?: Socket): Promise<void>;
18
+ notify(title: string, text: string, type: LoggingLevel, link: string): Promise<void>;
26
19
  formatMessage(level: 'log' | 'warn' | 'error' | 'debug' | 'trace' | 'attention', ...args: any[]): string[];
27
- private setNotification;
28
20
  private formattedArgs;
29
21
  private formatDateTime;
22
+ private checkIfNotificationExists;
30
23
  }
@@ -0,0 +1 @@
1
+ export declare const getNpmPath: () => string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camera.ui/browser",
3
- "version": "0.0.84",
3
+ "version": "0.0.86",
4
4
  "description": "camera.ui browser client",
5
5
  "author": "seydx (https://github.com/seydx/camera.ui)",
6
6
  "module": "./dist/bundle.js",
@@ -23,7 +23,7 @@
23
23
  "prepublishOnly": "npm i --package-lock-only && npm run lint && npm run format && npm run build"
24
24
  },
25
25
  "dependencies": {
26
- "axios": "^1.7.3",
26
+ "axios": "^1.7.4",
27
27
  "lru-cache": "^11.0.0",
28
28
  "rxjs": "^7.8.1",
29
29
  "socket.io-client": "^4.7.5"
@@ -32,8 +32,8 @@
32
32
  "@rushstack/eslint-patch": "^1.10.4",
33
33
  "@swc/register": "^0.1.10",
34
34
  "@types/webrtc": "^0.0.43",
35
- "@typescript-eslint/eslint-plugin": "^8.0.1",
36
- "@typescript-eslint/parser": "^8.0.1",
35
+ "@typescript-eslint/eslint-plugin": "^8.1.0",
36
+ "@typescript-eslint/parser": "^8.1.0",
37
37
  "bufferutil": "^4.0.8",
38
38
  "eslint": "^8.57.0",
39
39
  "eslint-config-prettier": "^9.1.0",
@@ -42,7 +42,7 @@
42
42
  "rimraf": "^6.0.1",
43
43
  "ts-loader": "^9.5.1",
44
44
  "typescript": "^5.5.4",
45
- "updates": "^16.3.7",
45
+ "updates": "^16.4.0",
46
46
  "utf-8-validate": "^6.0.4",
47
47
  "webpack": "^5.93.0",
48
48
  "webpack-cli": "^5.1.4"
@@ -1,13 +0,0 @@
1
- import type { Namespace, Server } from 'socket.io';
2
- import type { PLUGIN_STATUS } from '../../../plugins/types.js';
3
- import type { SocketNsp } from '../types.js';
4
- export declare class FrameWorkerNamespace {
5
- nsp: Namespace;
6
- nspName: SocketNsp;
7
- private frameManager;
8
- constructor(io: Server);
9
- frameWorkerStatus(frameWorkerName: string, callback?: Function): Promise<void | {
10
- frameWorkerName: string;
11
- status: PLUGIN_STATUS;
12
- }>;
13
- }