@camera.ui/browser 0.0.73 → 0.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +1 -1
- package/dist/types/packages/client/browser/src/types.d.ts +2 -2
- package/dist/types/server/src/api/controllers/cameras.controller.d.ts +5 -5
- package/dist/types/server/src/api/database/types.d.ts +22 -5
- package/dist/types/server/src/api/index.d.ts +13 -7
- package/dist/types/server/src/api/schemas/cameras.schema.d.ts +192 -158
- package/dist/types/server/src/api/schemas/go2rtc.schema.d.ts +6 -6
- package/dist/types/server/src/api/schemas/users.schema.d.ts +2 -2
- package/dist/types/server/src/api/services/cameras.service.d.ts +4 -3
- package/dist/types/server/src/api/types/index.d.ts +0 -5
- package/dist/types/server/src/api.d.ts +4 -4
- package/dist/types/server/src/{devices/camera/controller/index.d.ts → camera/controller.d.ts} +10 -6
- package/dist/types/server/src/{devices/camera/cameraDevice.d.ts → camera/device.d.ts} +2 -2
- package/dist/types/server/src/{devices/camera → camera}/index.d.ts +30 -23
- package/dist/types/server/src/camera/polygon.d.ts +3 -0
- package/dist/types/server/src/{devices/camera → camera}/streaming/peer-connection.d.ts +4 -4
- package/dist/types/server/src/{devices/camera → camera}/streaming/streaming-session.d.ts +3 -3
- package/dist/types/server/src/{devices/camera → camera}/streaming/webrtc-connection.d.ts +4 -4
- package/dist/types/server/src/{devices/camera/controller → camera}/types.d.ts +39 -23
- package/dist/types/server/src/camera/videoFrame.d.ts +18 -0
- package/dist/types/server/src/decoder/ffmpeg.d.ts +2 -1
- package/dist/types/server/src/decoder/index.d.ts +2 -13
- package/dist/types/server/src/decoder/types.d.ts +29 -9
- package/dist/types/server/src/decoder/{worker/index.d.ts → worker.d.ts} +7 -15
- package/dist/types/server/src/nats/constants.d.ts +0 -1
- package/dist/types/server/src/nats/index.d.ts +2 -2
- package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +8 -20
- package/dist/types/server/src/nats/proxy/deviceManager.d.ts +1 -1
- package/dist/types/server/src/nats/proxy/pluginsManager.d.ts +1 -1
- package/dist/types/server/src/nats/server.d.ts +4 -2
- package/dist/types/server/src/nats/types.d.ts +14 -23
- package/dist/types/server/src/nats/websocket.d.ts +1 -1
- package/dist/types/server/src/plugins/base.d.ts +1 -1
- package/dist/types/server/src/plugins/plugin.d.ts +1 -1
- package/dist/types/server/src/plugins/worker.d.ts +5 -1
- package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/api.d.ts +3 -3
- package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/cameraStorage.d.ts +1 -1
- package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/config.d.ts +1 -1
- package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/cameraDevice.d.ts +20 -19
- package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/deviceManager.d.ts +10 -8
- package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/pluginsManager.d.ts +7 -6
- package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/queue.d.ts +2 -2
- package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/systemManager.d.ts +7 -6
- package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/schema.d.ts +2 -2
- package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/storageController.d.ts +1 -1
- package/dist/types/server/src/utils/pythonInstaller.d.ts +1 -1
- package/dist/types/shared/types/index.d.ts +2 -1
- package/package.json +3 -3
- package/dist/types/server/src/api/plugins/logger.plugin.d.ts +0 -7
- package/dist/types/server/src/plugins/worker-ipc.d.ts +0 -25
- /package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/logger.d.ts +0 -0
- /package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/index.d.ts +0 -0
|
@@ -2,7 +2,7 @@ import { type NatsConnection, type Subscription } from 'nats';
|
|
|
2
2
|
import { CameraDeviceProxy } from './proxy/cameraDevice.js';
|
|
3
3
|
import { DeviceManagerProxy, PluginsManagerProxy, SystemManagerProxy } from './proxy/index.js';
|
|
4
4
|
import { NatsServer } from './server.js';
|
|
5
|
-
import type { StateValues } from '../
|
|
5
|
+
import type { StateValues } from '../camera/types.js';
|
|
6
6
|
import type { CameraDeviceListenerMessagePayload, DeviceManagerProxyEvents, PluginsManagerProxyEvents, ProxyAuth, SystemManagerProxyEvents } from './types.js';
|
|
7
7
|
import type { WebsocketProxy } from './websocket.js';
|
|
8
8
|
export declare class ProxyServer {
|
|
@@ -16,7 +16,7 @@ export declare class ProxyServer {
|
|
|
16
16
|
server: NatsServer;
|
|
17
17
|
publisher?: NatsConnection;
|
|
18
18
|
subscriber?: Subscription;
|
|
19
|
-
private messageQueue
|
|
19
|
+
private messageQueue?;
|
|
20
20
|
private initialized;
|
|
21
21
|
auth: ProxyAuth;
|
|
22
22
|
constructor();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import type { Camera } from '../../api/database/types.js';
|
|
3
|
-
import type {
|
|
4
|
-
import type { CameraDelegate, CameraPrebufferDelegate, FfmpegOptions, PrebufferType, SetValues, StateValues, StreamInfo } from '../../devices/camera/controller/types.js';
|
|
3
|
+
import type { CameraDelegate, CameraPrebufferDelegate, FfmpegOptions, PrebufferContainer, PrebufferState, SetValues, StateValues, StreamInfo } from '../../camera/types.js';
|
|
5
4
|
import type { IceServer } from '../../services/config/types.js';
|
|
6
5
|
import type { MessageQueue } from '../queue.js';
|
|
7
6
|
import type { CameraDeviceProxyMethods, ProxyMessageStructure } from '../types.js';
|
|
@@ -30,22 +29,6 @@ export declare class CameraDeviceProxy implements CameraDeviceProxyMethods {
|
|
|
30
29
|
cameraId: string;
|
|
31
30
|
pluginId: string;
|
|
32
31
|
}): Promise<StreamInfo | undefined>;
|
|
33
|
-
isPrebuffering(data: {
|
|
34
|
-
sourceName: string;
|
|
35
|
-
type: PrebufferType;
|
|
36
|
-
cameraId: string;
|
|
37
|
-
pluginId: string;
|
|
38
|
-
}): Promise<boolean>;
|
|
39
|
-
getPrebufferRawUrl(data: {
|
|
40
|
-
sourceName: string;
|
|
41
|
-
type: PrebufferType;
|
|
42
|
-
cameraId: string;
|
|
43
|
-
pluginId: string;
|
|
44
|
-
}): Promise<string | undefined>;
|
|
45
|
-
getFrameMetadata(data: {
|
|
46
|
-
cameraId: string;
|
|
47
|
-
pluginId: string;
|
|
48
|
-
}): Promise<FrameMetadata>;
|
|
49
32
|
getFfmpegPath(): string;
|
|
50
33
|
getIceServers(): IceServer[];
|
|
51
34
|
snapshot(data: {
|
|
@@ -72,6 +55,13 @@ export declare class CameraDeviceProxy implements CameraDeviceProxyMethods {
|
|
|
72
55
|
cameraId: string;
|
|
73
56
|
pluginId: string;
|
|
74
57
|
}): Promise<void>;
|
|
58
|
+
updatePrebufferState(data: {
|
|
59
|
+
sourceId: string;
|
|
60
|
+
container: PrebufferContainer;
|
|
61
|
+
state: PrebufferState;
|
|
62
|
+
cameraId: string;
|
|
63
|
+
pluginId: string;
|
|
64
|
+
}): Promise<void>;
|
|
75
65
|
refreshStates(data: {
|
|
76
66
|
cameraId: string;
|
|
77
67
|
pluginId: string;
|
|
@@ -82,8 +72,6 @@ export declare class CameraDeviceProxy implements CameraDeviceProxyMethods {
|
|
|
82
72
|
};
|
|
83
73
|
onRequestReboot(pluginId: string, cameraId: string, ...args: Parameters<CameraDelegate['reboot']>): Promise<Buffer>;
|
|
84
74
|
onRequestGetStreamInfo(pluginId: string, cameraId: string, ...args: Parameters<CameraPrebufferDelegate['getStreamInfo']>): Promise<StreamInfo | undefined>;
|
|
85
|
-
onRequestIsPrebuffering(pluginId: string, cameraId: string, ...args: Parameters<CameraPrebufferDelegate['isPrebuffering']>): Promise<boolean>;
|
|
86
|
-
onRequestGetRawUrl(pluginId: string, cameraId: string, ...args: Parameters<CameraPrebufferDelegate['getPrebufferRawUrl']>): Promise<string | undefined>;
|
|
87
75
|
onRequestSnapshotRequest(pluginId: string, cameraId: string, ...args: Parameters<CameraDelegate['snapshotRequest']>): Promise<Buffer>;
|
|
88
76
|
onRequestPrepareStream(pluginId: string, cameraId: string, ...args: Parameters<CameraDelegate['prepareStream']>): Promise<void>;
|
|
89
77
|
onRequestWebRTCOffer(pluginId: string, cameraId: string, ...args: Parameters<CameraDelegate['onOffer']>): Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Camera } from '../../api/database/types.js';
|
|
2
|
-
import type { CameraConfig } from '../../
|
|
2
|
+
import type { CameraConfig } from '../../camera/types.js';
|
|
3
3
|
import type { MessageQueue } from '../queue.js';
|
|
4
4
|
import type { DeviceManagerServerProxyMethods, ProxyMessageStructure } from '../types.js';
|
|
5
5
|
export declare class DeviceManagerProxy implements DeviceManagerServerProxyMethods {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BasePlugin } from '../../plugins/base.js';
|
|
2
|
-
import type { CameraStorage } from '../../
|
|
2
|
+
import type { CameraStorage } from '../../polyglot/node/plugins/cameraStorage.js';
|
|
3
3
|
import type { MessageQueue } from '../queue.js';
|
|
4
4
|
import type { CallablePluginMethods, CallablePluginStorageMethods, PluginsManagerServerProxyMethods, ProxyMessageStructure } from '../types.js';
|
|
5
5
|
export declare class PluginsManagerProxy implements PluginsManagerServerProxyMethods {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RUNTIME_STATUS } from '../services/config/types.js';
|
|
2
2
|
import type { ProxyAuth } from './types.js';
|
|
3
3
|
export declare class NatsServer {
|
|
4
|
-
readonly serverPort = 4222;
|
|
5
4
|
private readonly clusterAmount;
|
|
6
5
|
private readonly auth;
|
|
7
|
-
private
|
|
6
|
+
private _serverPort;
|
|
7
|
+
private _clusterPort;
|
|
8
8
|
private serverProcess?;
|
|
9
9
|
private clusterProcesses;
|
|
10
10
|
private logger;
|
|
@@ -15,6 +15,8 @@ export declare class NatsServer {
|
|
|
15
15
|
private shuttingDown;
|
|
16
16
|
private _status;
|
|
17
17
|
get status(): RUNTIME_STATUS;
|
|
18
|
+
get serverPort(): number;
|
|
19
|
+
get clusterPort(): number;
|
|
18
20
|
constructor(auth: ProxyAuth);
|
|
19
21
|
start(): Promise<void>;
|
|
20
22
|
private startServer;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { Camera } from '../api/database/types.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { CameraConfig, FfmpegOptions, PrebufferType, SetValues, StateValues, StreamInfo } from '../devices/camera/controller/types.js';
|
|
2
|
+
import type { CameraDevice } from '../camera/device.js';
|
|
3
|
+
import type { CameraConfig, FfmpegOptions, PrebufferContainer, PrebufferState, SetValues, StateValues, StreamInfo } from '../camera/types.js';
|
|
5
4
|
import type { BasePlugin } from '../plugins/base.js';
|
|
6
|
-
import type { CameraStorage } from '../plugins/node/cameraStorage.js';
|
|
7
5
|
import type { CameraExtension } from '../plugins/types.js';
|
|
6
|
+
import type { CameraStorage } from '../polyglot/node/plugins/cameraStorage.js';
|
|
8
7
|
import type { IceServer } from '../services/config/types.js';
|
|
9
8
|
export type MethodKeys<T> = {
|
|
10
9
|
[K in keyof T]: T[K] extends Function ? K : never;
|
|
@@ -92,27 +91,11 @@ export interface CameraDeviceProxyMethods {
|
|
|
92
91
|
cameraId: string;
|
|
93
92
|
pluginId: string;
|
|
94
93
|
}): Promise<void>;
|
|
95
|
-
isPrebuffering(data: {
|
|
96
|
-
sourceName: string;
|
|
97
|
-
type: PrebufferType;
|
|
98
|
-
cameraId: string;
|
|
99
|
-
pluginId: string;
|
|
100
|
-
}): Promise<boolean>;
|
|
101
|
-
getPrebufferRawUrl(data: {
|
|
102
|
-
sourceName: string;
|
|
103
|
-
type: PrebufferType;
|
|
104
|
-
cameraId: string;
|
|
105
|
-
pluginId: string;
|
|
106
|
-
}): Promise<string | undefined>;
|
|
107
94
|
getStreamInfo(data: {
|
|
108
95
|
sourceName: string;
|
|
109
96
|
cameraId: string;
|
|
110
97
|
pluginId: string;
|
|
111
98
|
}): Promise<StreamInfo | undefined>;
|
|
112
|
-
getFrameMetadata(data: {
|
|
113
|
-
cameraId: string;
|
|
114
|
-
pluginId: string;
|
|
115
|
-
}): Promise<FrameMetadata>;
|
|
116
99
|
getFfmpegPath(data: {
|
|
117
100
|
cameraId: string;
|
|
118
101
|
pluginId: string;
|
|
@@ -145,6 +128,13 @@ export interface CameraDeviceProxyMethods {
|
|
|
145
128
|
cameraId: string;
|
|
146
129
|
pluginId: string;
|
|
147
130
|
}): void;
|
|
131
|
+
updatePrebufferState(data: {
|
|
132
|
+
sourceId: string;
|
|
133
|
+
container: PrebufferContainer;
|
|
134
|
+
state: PrebufferState;
|
|
135
|
+
cameraId: string;
|
|
136
|
+
pluginId: string;
|
|
137
|
+
}): Promise<void>;
|
|
148
138
|
refreshStates(data: {
|
|
149
139
|
cameraId: string;
|
|
150
140
|
pluginId: string;
|
|
@@ -157,7 +147,7 @@ export interface CameraDeviceProxyMethods {
|
|
|
157
147
|
export type CameraDeviceProxyMethodNames = MethodKeys<CameraDeviceProxyMethods>;
|
|
158
148
|
export interface DeviceManagerListenerMessagePayload {
|
|
159
149
|
type: keyof DeviceManagerProxyEventCallbacks;
|
|
160
|
-
data:
|
|
150
|
+
data: DeviceManagerProxyEvents['cameraSelected'] | DeviceManagerProxyEvents['cameraDeselected'] | DeviceManagerProxyEvents['cameraUpdated'];
|
|
161
151
|
}
|
|
162
152
|
export interface DeviceManagerProxyMethods {
|
|
163
153
|
getCameraByName(name: string): Promise<CameraDevice | undefined>;
|
|
@@ -178,12 +168,13 @@ export interface DeviceManagerProxyEvents {
|
|
|
178
168
|
};
|
|
179
169
|
cameraUpdated: {
|
|
180
170
|
camera: Camera;
|
|
171
|
+
extension: CameraExtension;
|
|
181
172
|
};
|
|
182
173
|
}
|
|
183
174
|
export interface DeviceManagerProxyEventCallbacks {
|
|
184
175
|
cameraSelected: (camera: CameraDevice, extension: CameraExtension) => void;
|
|
185
176
|
cameraDeselected: (cameraId: string, extension: CameraExtension) => void;
|
|
186
|
-
cameraUpdated: (cameraId: string,
|
|
177
|
+
cameraUpdated: (cameraId: string, extension: CameraExtension) => void;
|
|
187
178
|
}
|
|
188
179
|
export interface DeviceManagerProxyGenericEvent<K extends keyof DeviceManagerProxyEvents> {
|
|
189
180
|
type: K;
|
|
@@ -237,6 +228,6 @@ export interface CameraDeviceListenerStatePayload<K extends keyof StateValues> {
|
|
|
237
228
|
};
|
|
238
229
|
}
|
|
239
230
|
export interface CameraDeviceListenerMessagePayload {
|
|
240
|
-
type: 'removed' | 'updated' | 'cameraState';
|
|
231
|
+
type: 'removed' | 'updated' | 'cameraState' | 'prebufferState';
|
|
241
232
|
data?: any;
|
|
242
233
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Namespace, Server } from 'socket.io';
|
|
2
2
|
import type { SocketNsp } from '../api/websocket/types.js';
|
|
3
|
-
import type { StateValues } from '../
|
|
3
|
+
import type { StateValues } from '../camera/types.js';
|
|
4
4
|
import type { CameraDeviceListenerMessagePayload } from './types.js';
|
|
5
5
|
export declare class WebsocketProxy {
|
|
6
6
|
nsp: Namespace;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { PluginConfigService } from '../polyglot/node/plugins/config.js';
|
|
1
2
|
import { PythonInstaller } from '../utils/pythonInstaller.js';
|
|
2
|
-
import { PluginConfigService } from './node/config.js';
|
|
3
3
|
import type { PluginConstructor } from '../api.js';
|
|
4
4
|
import type { CameraUiPlugin, IPackageJson } from '../api/types/index.js';
|
|
5
5
|
import type { PluginContract } from './types.js';
|
|
@@ -4,11 +4,14 @@ export declare class PluginWorker {
|
|
|
4
4
|
plugin: Plugin;
|
|
5
5
|
private pluginWorker?;
|
|
6
6
|
private proxyServer;
|
|
7
|
-
private ipc;
|
|
8
7
|
private api;
|
|
9
8
|
private logger;
|
|
10
9
|
private configService;
|
|
11
10
|
private socketService;
|
|
11
|
+
private publisher?;
|
|
12
|
+
private subscriber?;
|
|
13
|
+
private subject;
|
|
14
|
+
private targetSubject;
|
|
12
15
|
private started;
|
|
13
16
|
private shuttingDown;
|
|
14
17
|
private _status;
|
|
@@ -26,5 +29,6 @@ export declare class PluginWorker {
|
|
|
26
29
|
private handleClose;
|
|
27
30
|
private reset;
|
|
28
31
|
private updatePython;
|
|
32
|
+
private listenToMessages;
|
|
29
33
|
private cleanedProcessEnv;
|
|
30
34
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
3
|
import { DeviceManager, PluginsManager, SystemManager } from './proxy/index.js';
|
|
4
4
|
import { StorageController } from './storageController.js';
|
|
5
|
-
import type { BasePlugin } from '
|
|
6
|
-
import type { Plugin } from '
|
|
5
|
+
import type { BasePlugin } from '../../../plugins/base.js';
|
|
6
|
+
import type { Plugin } from '../../../plugins/plugin.js';
|
|
7
7
|
import type { PluginConfigService } from './config.js';
|
|
8
8
|
import type { PluginLogger } from './logger.js';
|
|
9
9
|
export declare interface API {
|
|
@@ -34,7 +34,7 @@ export declare class PluginAPI extends EventEmitter implements API {
|
|
|
34
34
|
readonly storagePath: string;
|
|
35
35
|
readonly configFile: string;
|
|
36
36
|
readonly plugin: BasePlugin;
|
|
37
|
-
constructor(plugin: Plugin, logger: PluginLogger, auth: {
|
|
37
|
+
constructor(plugin: Plugin, logger: PluginLogger, proxyPort: number, auth: {
|
|
38
38
|
user: string;
|
|
39
39
|
pass: string;
|
|
40
40
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PluginJsonSchema, PluginJsonSchemaForm, SchemaConfig } from '
|
|
1
|
+
import type { PluginJsonSchema, PluginJsonSchemaForm, SchemaConfig } from '../../../plugins/types.js';
|
|
2
2
|
import type { PluginAPI } from './api.js';
|
|
3
3
|
export declare class CameraStorage {
|
|
4
4
|
private cameraId;
|
package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/cameraDevice.d.ts
RENAMED
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { CameraDevice } from '
|
|
2
|
-
import type { Camera } from '
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { IceServer } from '
|
|
1
|
+
import { CameraDevice } from '../../../../camera/device.js';
|
|
2
|
+
import type { Camera } from '../../../../api/database/types.js';
|
|
3
|
+
import type { CameraSource, SetValues } from '../../../../camera/types.js';
|
|
4
|
+
import type { VideoFrame } from '../../../../decoder/types.js';
|
|
5
|
+
import type { IceServer } from '../../../../services/config/types.js';
|
|
6
6
|
import type { PluginAPI } from '../api.js';
|
|
7
7
|
import type { PluginLogger } from '../logger.js';
|
|
8
8
|
export declare class CameraDeviceProxy extends CameraDevice {
|
|
9
9
|
private api;
|
|
10
10
|
private initialized;
|
|
11
|
-
private publisher;
|
|
12
|
-
private client;
|
|
13
|
-
private cameraSubscriber;
|
|
14
|
-
private cameraPluginSubscriber;
|
|
15
|
-
private signalingSubscriber;
|
|
16
|
-
private frameSubscriber?;
|
|
17
|
-
private activeRequests;
|
|
18
|
-
private messageQueue;
|
|
19
|
-
private auth;
|
|
20
|
-
private pluginID;
|
|
21
|
-
private pluginName;
|
|
22
11
|
private clientSubject;
|
|
23
12
|
private cameraSubscriberSubject;
|
|
24
13
|
private cameraPluginSubscriberSubject;
|
|
25
14
|
private frameSubject;
|
|
26
15
|
private signalingSubject;
|
|
27
16
|
private signalingTargetSubject;
|
|
17
|
+
private publisher?;
|
|
18
|
+
private client?;
|
|
19
|
+
private cameraSubscriber?;
|
|
20
|
+
private cameraPluginSubscriber?;
|
|
21
|
+
private signalingSubscriber?;
|
|
22
|
+
private frameSubscriber?;
|
|
23
|
+
private activeRequests;
|
|
24
|
+
private messageQueue?;
|
|
25
|
+
private auth;
|
|
26
|
+
private proxyPort;
|
|
27
|
+
private pluginID;
|
|
28
|
+
private pluginName;
|
|
28
29
|
get sources(): CameraSource[];
|
|
29
|
-
constructor(api: PluginAPI, logger: PluginLogger, camera: Camera, pluginId: string, pluginName: string, auth: {
|
|
30
|
+
constructor(api: PluginAPI, logger: PluginLogger, camera: Camera, pluginId: string, pluginName: string, proxyPort: number, auth: {
|
|
30
31
|
user: string;
|
|
31
32
|
pass: string;
|
|
32
33
|
});
|
|
@@ -40,8 +41,8 @@ export declare class CameraDeviceProxy extends CameraDevice {
|
|
|
40
41
|
updateState<T extends keyof SetValues>(stateName: T, eventData: SetValues[T]): Promise<void>;
|
|
41
42
|
refreshStates(): Promise<void>;
|
|
42
43
|
cleanup(): Promise<void>;
|
|
43
|
-
private
|
|
44
|
-
private
|
|
44
|
+
private connectToDecoder;
|
|
45
|
+
private disconnectFromDecoder;
|
|
45
46
|
private requestHandler;
|
|
46
47
|
private listenToMessages;
|
|
47
48
|
private listenToSignalingMessages;
|
package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/deviceManager.d.ts
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
3
|
import { CameraDeviceProxy } from './cameraDevice.js';
|
|
4
|
-
import type { CameraDevice } from '
|
|
5
|
-
import type { CameraConfig } from '
|
|
6
|
-
import type { DeviceManagerProxyEventCallbacks, DeviceManagerProxyMethods } from '
|
|
4
|
+
import type { CameraDevice } from '../../../../camera/device.js';
|
|
5
|
+
import type { CameraConfig } from '../../../../camera/types.js';
|
|
6
|
+
import type { DeviceManagerProxyEventCallbacks, DeviceManagerProxyMethods } from '../../../../nats/types.js';
|
|
7
7
|
import type { PluginAPI } from '../api.js';
|
|
8
8
|
import type { PluginLogger } from '../logger.js';
|
|
9
9
|
export declare interface DeviceManager extends DeviceManagerProxyMethods {
|
|
@@ -17,17 +17,18 @@ export declare class DeviceManager extends EventEmitter implements DeviceManager
|
|
|
17
17
|
private api;
|
|
18
18
|
private logger;
|
|
19
19
|
private initialized;
|
|
20
|
-
private publisher
|
|
21
|
-
private client
|
|
22
|
-
private subscriber
|
|
23
|
-
private messageQueue
|
|
20
|
+
private publisher?;
|
|
21
|
+
private client?;
|
|
22
|
+
private subscriber?;
|
|
23
|
+
private messageQueue?;
|
|
24
24
|
private auth;
|
|
25
|
+
private proxyPort;
|
|
25
26
|
private pluginId;
|
|
26
27
|
private pluginName;
|
|
27
28
|
private clientSubject;
|
|
28
29
|
private subscriberSubject;
|
|
29
30
|
private devices;
|
|
30
|
-
constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, auth: {
|
|
31
|
+
constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxyPort: number, auth: {
|
|
31
32
|
user: string;
|
|
32
33
|
pass: string;
|
|
33
34
|
});
|
|
@@ -40,6 +41,7 @@ export declare class DeviceManager extends EventEmitter implements DeviceManager
|
|
|
40
41
|
emit(): boolean;
|
|
41
42
|
configureCameras(cameraDevices: CameraDeviceProxy[]): void;
|
|
42
43
|
private requestHandler;
|
|
44
|
+
private emitEvent;
|
|
43
45
|
private listenToMessages;
|
|
44
46
|
private onRequest;
|
|
45
47
|
private addOrGetCamera;
|
package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/pluginsManager.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
|
-
import type { PluginsManagerProxyEventCallbacks, PluginsManagerProxyMethods } from '
|
|
3
|
+
import type { PluginsManagerProxyEventCallbacks, PluginsManagerProxyMethods } from '../../../../nats/types.js';
|
|
4
4
|
import type { PluginAPI } from '../api.js';
|
|
5
5
|
import type { PluginLogger } from '../logger.js';
|
|
6
6
|
export declare interface PluginsManager extends PluginsManagerProxyMethods {
|
|
@@ -14,16 +14,17 @@ export declare class PluginsManager extends EventEmitter implements PluginsManag
|
|
|
14
14
|
private api;
|
|
15
15
|
private logger;
|
|
16
16
|
private initialized;
|
|
17
|
-
private publisher
|
|
18
|
-
private client
|
|
19
|
-
private subscriber
|
|
20
|
-
private messageQueue
|
|
17
|
+
private publisher?;
|
|
18
|
+
private client?;
|
|
19
|
+
private subscriber?;
|
|
20
|
+
private messageQueue?;
|
|
21
21
|
private auth;
|
|
22
|
+
private proxyPort;
|
|
22
23
|
private pluginId;
|
|
23
24
|
private pluginName;
|
|
24
25
|
private clientSubject;
|
|
25
26
|
private subscriberSubject;
|
|
26
|
-
constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, auth: {
|
|
27
|
+
constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxyPort: number, auth: {
|
|
27
28
|
user: string;
|
|
28
29
|
pass: string;
|
|
29
30
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NatsConnection, Subscription } from 'nats';
|
|
2
|
-
import type { BaseLogger } from '
|
|
3
|
-
import type { ProxyMessageStructure } from '
|
|
2
|
+
import type { BaseLogger } from '../../../../camera/types.js';
|
|
3
|
+
import type { ProxyMessageStructure } from '../../../../nats/types.js';
|
|
4
4
|
export declare class ClientMessageQueue {
|
|
5
5
|
private logger;
|
|
6
6
|
private publisher;
|
package/dist/types/server/src/{plugins/node → polyglot/node/plugins}/proxy/systemManager.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
|
-
import type { SystemManagerProxyEventCallbacks, SystemManagerProxyMethods } from '
|
|
3
|
+
import type { SystemManagerProxyEventCallbacks, SystemManagerProxyMethods } from '../../../../nats/types.js';
|
|
4
4
|
import type { PluginAPI } from '../api.js';
|
|
5
5
|
import type { PluginLogger } from '../logger.js';
|
|
6
6
|
export declare interface SystemManager extends SystemManagerProxyMethods {
|
|
@@ -14,16 +14,17 @@ export declare class SystemManager extends EventEmitter implements SystemManager
|
|
|
14
14
|
private api;
|
|
15
15
|
private logger;
|
|
16
16
|
private initialized;
|
|
17
|
-
private publisher
|
|
18
|
-
private client
|
|
19
|
-
private subscriber
|
|
20
|
-
private messageQueue
|
|
17
|
+
private publisher?;
|
|
18
|
+
private client?;
|
|
19
|
+
private subscriber?;
|
|
20
|
+
private messageQueue?;
|
|
21
21
|
private auth;
|
|
22
|
+
private proxyPort;
|
|
22
23
|
private pluginId;
|
|
23
24
|
private pluginName;
|
|
24
25
|
private clientSubject;
|
|
25
26
|
private subscriberSubject;
|
|
26
|
-
constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, auth: {
|
|
27
|
+
constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxyPort: number, auth: {
|
|
27
28
|
user: string;
|
|
28
29
|
pass: string;
|
|
29
30
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z, type ZodTypeAny } from 'zod';
|
|
2
|
-
import type { JsonSchema, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBoolean, JsonSchemaButton, JsonSchemaEnum, JsonSchemaNumber, JsonSchemaObject, JsonSchemaObjectWithButtons, JsonSchemaString, PluginJsonSchema, PluginJsonSchemaForm, PluginRootSchema, RootSchema } from '
|
|
2
|
+
import type { JsonSchema, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBoolean, JsonSchemaButton, JsonSchemaEnum, JsonSchemaNumber, JsonSchemaObject, JsonSchemaObjectWithButtons, JsonSchemaString, PluginJsonSchema, PluginJsonSchemaForm, PluginRootSchema, RootSchema } from '../../../plugins/types.js';
|
|
3
3
|
type RootZodSchema = z.ZodObject<Record<string, ZodTypeAny>, 'strict', ZodTypeAny, {
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
}, {
|
|
@@ -92,7 +92,7 @@ export declare const schemaPathToConfigPath: (schemaPath: string) => string;
|
|
|
92
92
|
* @param path - The key path to search for.
|
|
93
93
|
* @returns - The value of the searched key path, if found, otherwise undefined.
|
|
94
94
|
*/
|
|
95
|
-
export declare const getValueByPath: (obj: any, path: string) => any;
|
|
95
|
+
export declare const getValueByPath: (obj: Record<any, any> | undefined, path: string) => any;
|
|
96
96
|
/**
|
|
97
97
|
* Generates a Zod schema from a given JSON schema.
|
|
98
98
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CameraStorage } from './cameraStorage.js';
|
|
2
|
-
import type { PluginJsonSchemaForm } from '
|
|
2
|
+
import type { PluginJsonSchemaForm } from '../../../plugins/types.js';
|
|
3
3
|
import type { PluginAPI } from './api.js';
|
|
4
4
|
export declare class StorageController {
|
|
5
5
|
private api;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PortablePython } from '@bjia56/portable-python';
|
|
2
|
-
import { PluginLogger } from '../
|
|
2
|
+
import { PluginLogger } from '../polyglot/node/plugins/logger.js';
|
|
3
3
|
export declare const SERVER_PY_VERSION = "3.11";
|
|
4
4
|
export declare class PythonInstaller {
|
|
5
5
|
static readonly versions: string[];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export type * from '../../server/src/api/database/types.js';
|
|
2
2
|
export type * from '../../server/src/api/types/index.js';
|
|
3
3
|
export type * from '../../server/src/api/websocket/types.js';
|
|
4
|
+
export * from '../../server/src/camera/polygon.js';
|
|
5
|
+
export type * from '../../server/src/camera/types.js';
|
|
4
6
|
export type * from '../../server/src/decoder/types.js';
|
|
5
|
-
export type * from '../../server/src/devices/camera/controller/types.js';
|
|
6
7
|
export * from '../../server/src/go2rtc/types.js';
|
|
7
8
|
export type * from '../../server/src/nats/types.js';
|
|
8
9
|
export * from '../../server/src/plugins/types.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camera.ui/browser",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.75",
|
|
4
4
|
"description": "camera.ui browser client",
|
|
5
5
|
"author": "seydx (https://github.com/seydx/camera.ui)",
|
|
6
6
|
"module": "./dist/bundle.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@rushstack/eslint-patch": "^1.10.3",
|
|
35
35
|
"@swc/register": "^0.1.10",
|
|
36
36
|
"@types/webrtc": "^0.0.43",
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
38
|
-
"@typescript-eslint/parser": "^7.
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
38
|
+
"@typescript-eslint/parser": "^7.11.0",
|
|
39
39
|
"bufferutil": "^4.0.8",
|
|
40
40
|
"eslint": "^8.57.0",
|
|
41
41
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import { EventEmitter } from 'node:events';
|
|
3
|
-
import type { Logger } from '../services/logger/index.js';
|
|
4
|
-
import type { ProcessMessage, ProcessResponse } from './types.js';
|
|
5
|
-
export declare interface WorkerIPC {
|
|
6
|
-
on(event: 'message', listener: (message: ProcessResponse) => void): this;
|
|
7
|
-
}
|
|
8
|
-
export declare class WorkerIPC extends EventEmitter {
|
|
9
|
-
private logger;
|
|
10
|
-
private publisher?;
|
|
11
|
-
private subscriber?;
|
|
12
|
-
private name;
|
|
13
|
-
private id;
|
|
14
|
-
private subject;
|
|
15
|
-
private targetSubject;
|
|
16
|
-
private auth;
|
|
17
|
-
constructor(name: string, id: string, auth: {
|
|
18
|
-
user: string;
|
|
19
|
-
pass: string;
|
|
20
|
-
}, logger: Logger);
|
|
21
|
-
listen(): Promise<void>;
|
|
22
|
-
close(): Promise<void>;
|
|
23
|
-
sendMessage(message: ProcessMessage): void;
|
|
24
|
-
private listenToMessages;
|
|
25
|
-
}
|
|
File without changes
|
|
File without changes
|