@camera.ui/browser 0.0.102 → 0.0.104
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/utils.d.ts +1 -1
- package/dist/types/packages/plugineer/src/polyglot/node/plugins/schema.d.ts +2 -14
- package/dist/types/packages/plugineer/src/polyglot/node/plugins/types.d.ts +1 -0
- package/dist/types/packages/types/src/index.d.ts +6 -7
- package/dist/types/server/src/api/database/index.d.ts +3 -4
- package/dist/types/server/src/api/database/types.d.ts +7 -13
- package/dist/types/server/src/api/go2rtc/index.d.ts +1 -0
- package/dist/types/server/src/api/middlewares/socketAuth.middleware.d.ts +1 -1
- package/dist/types/server/src/api/schemas/cameras.schema.d.ts +24 -24
- package/dist/types/server/src/api/schemas/users.schema.d.ts +48 -48
- package/dist/types/server/src/api/types/index.d.ts +105 -122
- package/dist/types/server/src/api/websocket/types.d.ts +3 -9
- package/dist/types/server/src/camera/controller.d.ts +4 -4
- package/dist/types/server/src/camera/frameWorker.d.ts +1 -2
- package/dist/types/server/src/nats/index.d.ts +3 -2
- package/dist/types/server/src/nats/proxy/cameraDevice.d.ts +2 -1
- package/dist/types/server/src/nats/proxy/coreManager.d.ts +1 -1
- package/dist/types/server/src/nats/proxy/deviceManager.d.ts +1 -1
- package/dist/types/server/src/nats/types.d.ts +1 -1
- package/dist/types/server/src/nats/utils.d.ts +1 -1
- package/dist/types/server/src/plugins/plugin.d.ts +0 -2
- package/dist/types/server/src/plugins/worker.d.ts +7 -3
- package/dist/types/server/src/services/config/constants.d.ts +1 -1
- package/dist/types/server/src/services/config/index.d.ts +0 -1
- package/dist/types/server/src/services/config/types.d.ts +3 -9
- package/dist/types/shared/types/index.d.ts +1 -1
- package/eslint.config.js +89 -0
- package/package.json +12 -13
- /package/dist/types/packages/{plugineer/src/utils → common/src/nats}/messageQueue.d.ts +0 -0
- /package/dist/types/packages/{plugineer/src/utils → common/src/nats}/nats.d.ts +0 -0
- /package/dist/types/packages/{plugineer/src/utils → common/src/nats}/packer.d.ts +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AuthConfig
|
|
1
|
+
import type { AuthConfig } from '@camera.ui/common';
|
|
2
|
+
import type { PLUGIN_STATUS, PluginContract } from '@camera.ui/plugineer';
|
|
2
3
|
import type { CameraExtension, CameraZone, RootSchema } from '@camera.ui/types';
|
|
3
4
|
import type { Readable } from 'node:stream';
|
|
4
5
|
import type { LoggingLevel } from '../../services/config/types.js';
|
|
@@ -180,213 +181,213 @@ export interface PaginationQuery {
|
|
|
180
181
|
page?: number;
|
|
181
182
|
pageSize?: number;
|
|
182
183
|
}
|
|
183
|
-
export
|
|
184
|
+
export interface PaginationRequest {
|
|
184
185
|
Querystring: PaginationQuery;
|
|
185
|
-
}
|
|
186
|
-
export
|
|
186
|
+
}
|
|
187
|
+
export interface AuthParamsRequest {
|
|
187
188
|
Params: {
|
|
188
189
|
id: string;
|
|
189
190
|
username?: string;
|
|
190
191
|
};
|
|
191
|
-
}
|
|
192
|
-
export
|
|
192
|
+
}
|
|
193
|
+
export interface AuthLoginRequest {
|
|
193
194
|
Querystring: {
|
|
194
195
|
username?: string;
|
|
195
196
|
password?: string;
|
|
196
197
|
token?: string;
|
|
197
198
|
};
|
|
198
|
-
}
|
|
199
|
-
export
|
|
199
|
+
}
|
|
200
|
+
export interface AuthNewLoginRequest {
|
|
200
201
|
Body: LoginUserInput;
|
|
201
|
-
}
|
|
202
|
-
export
|
|
202
|
+
}
|
|
203
|
+
export interface AuthRefreshRequest {
|
|
203
204
|
Body: {
|
|
204
205
|
refresh_token: string;
|
|
205
206
|
};
|
|
206
|
-
}
|
|
207
|
-
export
|
|
207
|
+
}
|
|
208
|
+
export interface AuthTokensRequest {
|
|
208
209
|
Querystring: {
|
|
209
210
|
clientData?: boolean;
|
|
210
211
|
};
|
|
211
|
-
}
|
|
212
|
-
export
|
|
212
|
+
}
|
|
213
|
+
export interface CamerasParamsRequest {
|
|
213
214
|
Params: {
|
|
214
215
|
cameraname: string;
|
|
215
216
|
};
|
|
216
|
-
}
|
|
217
|
-
export
|
|
217
|
+
}
|
|
218
|
+
export interface CameraSnapshotQueryRequest {
|
|
218
219
|
Querystring: {
|
|
219
220
|
forceNew?: boolean;
|
|
220
221
|
};
|
|
221
|
-
}
|
|
222
|
-
export
|
|
222
|
+
}
|
|
223
|
+
export interface CameraSourceParamsRequest {
|
|
223
224
|
Params: {
|
|
224
225
|
sourcename: string;
|
|
225
226
|
};
|
|
226
|
-
}
|
|
227
|
-
export
|
|
227
|
+
}
|
|
228
|
+
export interface CamerasParamsIdRequest {
|
|
228
229
|
Params: {
|
|
229
230
|
cameraid: string;
|
|
230
231
|
};
|
|
231
|
-
}
|
|
232
|
-
export
|
|
232
|
+
}
|
|
233
|
+
export interface CameraZonesParamsRequest {
|
|
233
234
|
Params: {
|
|
234
235
|
zonename: string;
|
|
235
236
|
};
|
|
236
|
-
}
|
|
237
|
-
export
|
|
237
|
+
}
|
|
238
|
+
export interface CamerasExtensionsParamsRequest {
|
|
238
239
|
Params: {
|
|
239
240
|
cameraname: string;
|
|
240
241
|
pluginname: string;
|
|
241
242
|
scope?: string;
|
|
242
243
|
};
|
|
243
|
-
}
|
|
244
|
-
export
|
|
244
|
+
}
|
|
245
|
+
export interface CamerasExtensionsRequest {
|
|
245
246
|
Querystring: {
|
|
246
247
|
type: CameraExtension;
|
|
247
248
|
};
|
|
248
|
-
}
|
|
249
|
-
export
|
|
249
|
+
}
|
|
250
|
+
export interface CameraZoneInsertPatchRequest {
|
|
250
251
|
Body: CameraZone;
|
|
251
|
-
}
|
|
252
|
-
export
|
|
252
|
+
}
|
|
253
|
+
export interface CamerasInsertRequest {
|
|
253
254
|
Body: CreateCameraInput;
|
|
254
|
-
}
|
|
255
|
-
export
|
|
255
|
+
}
|
|
256
|
+
export interface CamerasPreviewRequest {
|
|
256
257
|
Body: PreviewCameraInput;
|
|
257
|
-
}
|
|
258
|
-
export
|
|
258
|
+
}
|
|
259
|
+
export interface CamerasPatchRequest {
|
|
259
260
|
Body: PatchCameraInput;
|
|
260
|
-
}
|
|
261
|
-
export
|
|
261
|
+
}
|
|
262
|
+
export interface ExtensionsPatchRequest {
|
|
262
263
|
Body: Record<string, any>;
|
|
263
|
-
}
|
|
264
|
-
export
|
|
264
|
+
}
|
|
265
|
+
export interface ExtensionsSubmitRequest {
|
|
265
266
|
Body: {
|
|
266
267
|
configPath: string;
|
|
267
268
|
};
|
|
268
|
-
}
|
|
269
|
-
export
|
|
269
|
+
}
|
|
270
|
+
export interface ConfigRequest {
|
|
270
271
|
Querystring: {
|
|
271
272
|
json?: boolean;
|
|
272
273
|
};
|
|
273
|
-
}
|
|
274
|
-
export
|
|
274
|
+
}
|
|
275
|
+
export interface ConfigPatchRequest {
|
|
275
276
|
Body: PatchConfigInput;
|
|
276
|
-
}
|
|
277
|
-
export
|
|
277
|
+
}
|
|
278
|
+
export interface Go2RtcConfigPatchRequest {
|
|
278
279
|
Body: PatchGo2RtcConfigInput;
|
|
279
|
-
}
|
|
280
|
-
export
|
|
280
|
+
}
|
|
281
|
+
export interface FilesParamsRequest {
|
|
281
282
|
Params: {
|
|
282
283
|
file: string;
|
|
283
284
|
};
|
|
284
|
-
}
|
|
285
|
-
export
|
|
285
|
+
}
|
|
286
|
+
export interface PluginsParamsIdRequest {
|
|
286
287
|
Params: {
|
|
287
288
|
pluginid: string;
|
|
288
289
|
};
|
|
289
|
-
}
|
|
290
|
-
export
|
|
290
|
+
}
|
|
291
|
+
export interface PluginsParamsNameRequest {
|
|
291
292
|
Params: {
|
|
292
293
|
scope?: string;
|
|
293
294
|
pluginname: string;
|
|
294
295
|
};
|
|
295
|
-
}
|
|
296
|
-
export
|
|
296
|
+
}
|
|
297
|
+
export interface FrameWorkerParamsNameRequest {
|
|
297
298
|
Params: {
|
|
298
299
|
frameworkername: string;
|
|
299
300
|
};
|
|
300
|
-
}
|
|
301
|
-
export
|
|
301
|
+
}
|
|
302
|
+
export interface PluginsParamsRemoveRequest {
|
|
302
303
|
Querystring: {
|
|
303
304
|
removeStorage?: boolean;
|
|
304
305
|
};
|
|
305
|
-
}
|
|
306
|
+
}
|
|
306
307
|
export interface PluginsQuery {
|
|
307
308
|
pluginname?: string;
|
|
308
309
|
pluginversion?: string;
|
|
309
310
|
}
|
|
310
|
-
export
|
|
311
|
+
export interface PluginsQueryRequest {
|
|
311
312
|
Querystring: PluginsQuery;
|
|
312
|
-
}
|
|
313
|
-
export
|
|
313
|
+
}
|
|
314
|
+
export interface PluginsInsertRequest {
|
|
314
315
|
Body: {
|
|
315
316
|
pluginname: string;
|
|
316
317
|
pluginversion?: string;
|
|
317
318
|
};
|
|
318
|
-
}
|
|
319
|
-
export
|
|
319
|
+
}
|
|
320
|
+
export interface PluginsConfigPatchRequest {
|
|
320
321
|
Body: Record<string, any>;
|
|
321
|
-
}
|
|
322
|
-
export
|
|
322
|
+
}
|
|
323
|
+
export interface PluginsActionRequest {
|
|
323
324
|
Body: {
|
|
324
325
|
actionId: string;
|
|
325
326
|
payload: any;
|
|
326
327
|
};
|
|
327
|
-
}
|
|
328
|
-
export
|
|
328
|
+
}
|
|
329
|
+
export interface PluginsDetectMotionRequest {
|
|
329
330
|
Body: DetectMotionInput;
|
|
330
|
-
}
|
|
331
|
-
export
|
|
331
|
+
}
|
|
332
|
+
export interface PluginsDetectObjectRequest {
|
|
332
333
|
Body: DetectObjectInput;
|
|
333
|
-
}
|
|
334
|
-
export
|
|
334
|
+
}
|
|
335
|
+
export interface PluginsDetectAudioRequest {
|
|
335
336
|
Body: DetectAudioInput;
|
|
336
|
-
}
|
|
337
|
+
}
|
|
337
338
|
export interface PluginsInterfaceQueryType {
|
|
338
339
|
type: 'objectDetection' | 'motionDetection' | 'audioDetection';
|
|
339
340
|
}
|
|
340
|
-
export
|
|
341
|
+
export interface PluginsInterfaceQuery {
|
|
341
342
|
Querystring: {
|
|
342
343
|
type: PluginsInterfaceQueryType;
|
|
343
344
|
};
|
|
344
|
-
}
|
|
345
|
-
export
|
|
345
|
+
}
|
|
346
|
+
export interface UsersParamsRequest {
|
|
346
347
|
Params: {
|
|
347
348
|
username: string;
|
|
348
349
|
};
|
|
349
|
-
}
|
|
350
|
-
export
|
|
350
|
+
}
|
|
351
|
+
export interface UsersInsertRequest {
|
|
351
352
|
Body: CreateUserInput & {
|
|
352
353
|
avatar: string;
|
|
353
354
|
};
|
|
354
|
-
}
|
|
355
|
-
export
|
|
355
|
+
}
|
|
356
|
+
export interface UsersPatchRequest {
|
|
356
357
|
Body: PatchUserInput & {
|
|
357
358
|
avatar: string;
|
|
358
359
|
};
|
|
359
|
-
}
|
|
360
|
-
export
|
|
360
|
+
}
|
|
361
|
+
export interface SystemPatchRequest {
|
|
361
362
|
Body: PatchSystemInput;
|
|
362
|
-
}
|
|
363
|
-
export
|
|
363
|
+
}
|
|
364
|
+
export interface ViewsParamsRequest {
|
|
364
365
|
Params: {
|
|
365
366
|
viewid: string;
|
|
366
367
|
};
|
|
367
|
-
}
|
|
368
|
-
export
|
|
368
|
+
}
|
|
369
|
+
export interface ViewsInsertRequest {
|
|
369
370
|
Body: CreateViewInput;
|
|
370
|
-
}
|
|
371
|
-
export
|
|
371
|
+
}
|
|
372
|
+
export interface ViewsPatchRequest {
|
|
372
373
|
Body: PatchViewInput;
|
|
373
|
-
}
|
|
374
|
-
export
|
|
374
|
+
}
|
|
375
|
+
export interface ShortcutParamsRequest {
|
|
375
376
|
Params: {
|
|
376
377
|
shortcutid: string;
|
|
377
378
|
};
|
|
378
|
-
}
|
|
379
|
-
export
|
|
379
|
+
}
|
|
380
|
+
export interface ShortcutInsertRequest {
|
|
380
381
|
Body: CreateShortcutInput;
|
|
381
|
-
}
|
|
382
|
-
export
|
|
382
|
+
}
|
|
383
|
+
export interface ShortcutPatchRequest {
|
|
383
384
|
Body: PatchShortcutInput;
|
|
384
|
-
}
|
|
385
|
-
export
|
|
385
|
+
}
|
|
386
|
+
export interface BackupCreateRequest {
|
|
386
387
|
Body: {
|
|
387
388
|
localStorage: Partial<UiLocalStorage>;
|
|
388
389
|
};
|
|
389
|
-
}
|
|
390
|
+
}
|
|
390
391
|
export interface BackupInfo {
|
|
391
392
|
backupDirectory: string;
|
|
392
393
|
backupFile: string;
|
|
@@ -429,9 +430,9 @@ export interface UiLocalStorage {
|
|
|
429
430
|
theme: ThemeLocalStorage;
|
|
430
431
|
locale: SupportedLanguageAbbreviatons;
|
|
431
432
|
}
|
|
432
|
-
export
|
|
433
|
+
export interface BackupRestoreRequest {
|
|
433
434
|
Body: RestoreBackupInput;
|
|
434
|
-
}
|
|
435
|
+
}
|
|
435
436
|
export interface INpmPluginState {
|
|
436
437
|
updateAvailable: boolean;
|
|
437
438
|
betaUpdateAvailable: boolean;
|
|
@@ -462,32 +463,18 @@ export interface IPackageJson {
|
|
|
462
463
|
contributors?: string[] | INpmPerson[];
|
|
463
464
|
files?: string[];
|
|
464
465
|
main?: string;
|
|
465
|
-
bin?: string |
|
|
466
|
-
[key: string]: string;
|
|
467
|
-
};
|
|
466
|
+
bin?: string | Record<string, string>;
|
|
468
467
|
repository?: string | {
|
|
469
468
|
type: string;
|
|
470
469
|
url: string;
|
|
471
470
|
};
|
|
472
|
-
scripts?:
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
};
|
|
478
|
-
devDependencies?: {
|
|
479
|
-
[key: string]: string;
|
|
480
|
-
};
|
|
481
|
-
peerDependencies?: {
|
|
482
|
-
[key: string]: string;
|
|
483
|
-
};
|
|
484
|
-
optionalDependencies?: {
|
|
485
|
-
[key: string]: string;
|
|
486
|
-
};
|
|
471
|
+
scripts?: Record<string, string>;
|
|
472
|
+
dependencies?: Record<string, string>;
|
|
473
|
+
devDependencies?: Record<string, string>;
|
|
474
|
+
peerDependencies?: Record<string, string>;
|
|
475
|
+
optionalDependencies?: Record<string, string>;
|
|
487
476
|
bundledDependencies?: string[];
|
|
488
|
-
engines?:
|
|
489
|
-
[key: string]: string;
|
|
490
|
-
};
|
|
477
|
+
engines?: Record<string, string>;
|
|
491
478
|
os?: string[];
|
|
492
479
|
cpu?: string[];
|
|
493
480
|
preferGlobal?: boolean;
|
|
@@ -495,9 +482,7 @@ export interface IPackageJson {
|
|
|
495
482
|
publishConfig?: {
|
|
496
483
|
registry?: string;
|
|
497
484
|
};
|
|
498
|
-
exports?:
|
|
499
|
-
[key: string]: any;
|
|
500
|
-
};
|
|
485
|
+
exports?: Record<string, any>;
|
|
501
486
|
type?: 'module';
|
|
502
487
|
'camera.ui'?: PluginContract;
|
|
503
488
|
}
|
|
@@ -509,9 +494,7 @@ export interface INpmRegistryModule {
|
|
|
509
494
|
latest: string;
|
|
510
495
|
[key: string]: string;
|
|
511
496
|
};
|
|
512
|
-
versions:
|
|
513
|
-
[key: string]: IPackageJson;
|
|
514
|
-
};
|
|
497
|
+
versions: Record<string, IPackageJson>;
|
|
515
498
|
time: {
|
|
516
499
|
created: string;
|
|
517
500
|
modified: string;
|
|
@@ -23,12 +23,8 @@ export interface ServerProcesses {
|
|
|
23
23
|
go2rtc: ProcessInfo[];
|
|
24
24
|
nats: ProcessInfo[];
|
|
25
25
|
}
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
export interface WorkerProcesses {
|
|
30
|
-
[key: string]: ProcessInfo[];
|
|
31
|
-
}
|
|
26
|
+
export type WorkerProcessInfo = Record<string, ProcessInfo>;
|
|
27
|
+
export type WorkerProcesses = Record<string, ProcessInfo[]>;
|
|
32
28
|
export interface AllProcesses extends ServerProcessInfo {
|
|
33
29
|
plugins: WorkerProcessInfo;
|
|
34
30
|
workers: WorkerProcessInfo;
|
|
@@ -42,6 +38,4 @@ export interface ServerRuntime {
|
|
|
42
38
|
go2rtc?: RuntimeInfo;
|
|
43
39
|
nats?: RuntimeInfo;
|
|
44
40
|
}
|
|
45
|
-
export
|
|
46
|
-
[key: string]: PluginRuntimeInfo;
|
|
47
|
-
}
|
|
41
|
+
export type WorkerRuntime = Record<string, PluginRuntimeInfo>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CameraDevice, CameraPrebufferInterface, CameraPTZInterface } from '@camera.ui/plugineer';
|
|
2
|
+
import { FrameWorker } from './frameWorker.js';
|
|
2
3
|
import type { Logger } from '@camera.ui/common/logger';
|
|
3
4
|
import type { Camera, CameraConfigInputSettings, CameraDelegate, CameraDeviceInternalSource, CameraDeviceSource, MotionFrame, ProbeStream, SetValues, VideoFrame } from '@camera.ui/types';
|
|
4
|
-
import {
|
|
5
|
+
import type { WriteStream } from 'node:fs';
|
|
5
6
|
export declare class CameraController extends CameraDevice {
|
|
6
7
|
readonly frameWorker: FrameWorker;
|
|
7
8
|
readonly streamInfos: Map<string, ProbeStream>;
|
|
8
|
-
|
|
9
|
+
readonly logStream?: WriteStream;
|
|
9
10
|
private motionTimeout?;
|
|
10
11
|
private objectTimeout?;
|
|
11
12
|
private objectTimeoutDuration;
|
|
@@ -40,7 +41,6 @@ export declare class CameraController extends CameraDevice {
|
|
|
40
41
|
updateCamera(updatedCamera: Camera): void;
|
|
41
42
|
cleanup(): void;
|
|
42
43
|
writeLog(...args: any[]): void;
|
|
43
|
-
private internalLog;
|
|
44
44
|
private subscribeToCameraState;
|
|
45
45
|
private subscribeToCameraChanges;
|
|
46
46
|
private subscribeToStateChanges;
|
|
@@ -55,7 +55,7 @@ export declare class CameraController extends CameraDevice {
|
|
|
55
55
|
private getAudioCodecProperties;
|
|
56
56
|
private getVideoCodecProperties;
|
|
57
57
|
private generateSdp;
|
|
58
|
-
private
|
|
58
|
+
private writeHeader;
|
|
59
59
|
private closeLogStream;
|
|
60
60
|
private removeLogStream;
|
|
61
61
|
private truncateLog;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Subscribed } from '@camera.ui/common';
|
|
2
2
|
import { PLUGIN_STATUS } from '@camera.ui/plugineer';
|
|
3
|
-
import type { AuthConfig } from '@camera.ui/
|
|
3
|
+
import type { AuthConfig } from '@camera.ui/common';
|
|
4
4
|
import type { CameraController } from './controller.js';
|
|
5
5
|
export declare class FrameWorker extends Subscribed {
|
|
6
6
|
readonly frameWorkerId: string;
|
|
@@ -38,6 +38,5 @@ export declare class FrameWorker extends Subscribed {
|
|
|
38
38
|
private sendMessage;
|
|
39
39
|
private onChildMessage;
|
|
40
40
|
private setStatus;
|
|
41
|
-
private internalLog;
|
|
42
41
|
private createPythonPath;
|
|
43
42
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ProxyConnection } from '@camera.ui/
|
|
1
|
+
import { ProxyConnection } from '@camera.ui/common';
|
|
2
2
|
import { CameraDeviceProxy } from './proxy/cameraDevice.js';
|
|
3
3
|
import { CoreManagerProxy } from './proxy/coreManager.js';
|
|
4
4
|
import { DeviceManagerProxy } from './proxy/deviceManager.js';
|
|
5
5
|
import { NatsServer } from './server.js';
|
|
6
|
-
import type {
|
|
6
|
+
import type { ProxySubscription } from '@camera.ui/common';
|
|
7
|
+
import type { CameraDeviceListenerMessagePayload, CoreManagerProxyEvents, DeviceManagerProxyEvents } from '@camera.ui/plugineer';
|
|
7
8
|
import type { CameraStorage, StateValues } from '@camera.ui/types';
|
|
8
9
|
import type { MethodKeys, MethodType } from '../types.js';
|
|
9
10
|
import type { PluginMap, ProxyAuth } from './types.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MessageQueue, ProxyMessageStructure } from '@camera.ui/common';
|
|
2
|
+
import type { CameraDeviceProxyMethods, CameraInterfaces, RefreshedStates } from '@camera.ui/plugineer';
|
|
2
3
|
import type { CameraConfigInputSettings, ProbeStream, SetValues } from '@camera.ui/types';
|
|
3
4
|
import type { MethodKeys, MethodType } from '../../types.js';
|
|
4
5
|
export declare class CameraDeviceProxy implements CameraDeviceProxyMethods {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageQueue, ProxyMessageStructure } from '@camera.ui/
|
|
1
|
+
import type { MessageQueue, ProxyMessageStructure } from '@camera.ui/common';
|
|
2
2
|
import type { CoreManager, FfmpegArgs, IceServer } from '@camera.ui/types';
|
|
3
3
|
export declare class CoreManagerProxy implements CoreManager {
|
|
4
4
|
private configService;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageQueue, ProxyMessageStructure } from '@camera.ui/
|
|
1
|
+
import type { MessageQueue, ProxyMessageStructure } from '@camera.ui/common';
|
|
2
2
|
import type { Camera, CameraConfig, DeviceManager } from '@camera.ui/types';
|
|
3
3
|
export declare class DeviceManagerProxy implements DeviceManager {
|
|
4
4
|
private camerasService;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthConfig } from '@camera.ui/
|
|
1
|
+
import type { AuthConfig } from '@camera.ui/common';
|
|
2
2
|
import type { AudioDetectionPlugin, BasePlugin, MotionDetectionPlugin, ObjectDetectionPlugin } from '@camera.ui/types';
|
|
3
3
|
import type { VideoStreamingMode } from '../api/database/types.js';
|
|
4
4
|
export interface ProxyAuth {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AuthConfig } from '@camera.ui/
|
|
1
|
+
import type { AuthConfig } from '@camera.ui/common';
|
|
2
2
|
export declare function generateCredentials(): AuthConfig;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PythonInstaller } from '@camera.ui/plugineer';
|
|
2
1
|
import { PluginWorker } from './worker.js';
|
|
3
2
|
import type { PluginContract } from '@camera.ui/plugineer';
|
|
4
3
|
import type { CameraExtension } from '@camera.ui/types';
|
|
@@ -20,7 +19,6 @@ export declare class Plugin {
|
|
|
20
19
|
readonly installPath: string;
|
|
21
20
|
readonly configFile: string;
|
|
22
21
|
readonly storagePath: string;
|
|
23
|
-
readonly py: PythonInstaller;
|
|
24
22
|
readonly logPath: string;
|
|
25
23
|
readonly worker: PluginWorker;
|
|
26
24
|
get contract(): PluginContract;
|
|
@@ -12,6 +12,7 @@ export declare class PluginWorker {
|
|
|
12
12
|
private configService;
|
|
13
13
|
private socketService;
|
|
14
14
|
private pluginManager;
|
|
15
|
+
private py;
|
|
15
16
|
private publisher?;
|
|
16
17
|
private subscriber?;
|
|
17
18
|
private subject;
|
|
@@ -20,6 +21,7 @@ export declare class PluginWorker {
|
|
|
20
21
|
private shuttingDown;
|
|
21
22
|
private truncateInterval?;
|
|
22
23
|
private truncateIntervalMs;
|
|
24
|
+
private logBuffer;
|
|
23
25
|
private _status;
|
|
24
26
|
get status(): PLUGIN_STATUS;
|
|
25
27
|
constructor(plugin: Plugin);
|
|
@@ -32,6 +34,7 @@ export declare class PluginWorker {
|
|
|
32
34
|
isRunning(): boolean;
|
|
33
35
|
isReady(): boolean;
|
|
34
36
|
cleanup(): Promise<void>;
|
|
37
|
+
writeLog(...args: any[]): void;
|
|
35
38
|
private gatherDevices;
|
|
36
39
|
private kill;
|
|
37
40
|
private setStatus;
|
|
@@ -41,9 +44,10 @@ export declare class PluginWorker {
|
|
|
41
44
|
private updatePython;
|
|
42
45
|
private onChildMessage;
|
|
43
46
|
private createPythonPath;
|
|
44
|
-
|
|
45
|
-
private
|
|
46
|
-
private
|
|
47
|
+
private handleLogData;
|
|
48
|
+
private processLogEntry;
|
|
49
|
+
private writeProcessLog;
|
|
50
|
+
private writeHeader;
|
|
47
51
|
private closeLogStream;
|
|
48
52
|
private removeLogStream;
|
|
49
53
|
private truncateLog;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IceServer } from '@camera.ui/types';
|
|
2
2
|
import type { Go2RtcConfig, IConfig } from './types.js';
|
|
3
|
+
export declare const APP_NAME: string;
|
|
3
4
|
export declare const PROCESS_IDENTIFIER = "--id=camera.ui";
|
|
4
|
-
export declare const APP_NAME: any;
|
|
5
5
|
export declare const DEFAULT_ICE_SERVERS: IceServer[];
|
|
6
6
|
export declare const DEFAULT_CONFIG: IConfig;
|
|
7
7
|
export declare const DEFAULT_GO2RTC_CONFIG: Go2RtcConfig;
|
|
@@ -9,7 +9,6 @@ export declare class ConfigService {
|
|
|
9
9
|
static readonly NODE_VERSION: string;
|
|
10
10
|
static readonly MIN_NODE_VERSION: string;
|
|
11
11
|
static readonly INSTALL_PATH: string | null;
|
|
12
|
-
static readonly SERVER_PATH: string;
|
|
13
12
|
static readonly INTERFACE_PATH: string;
|
|
14
13
|
private logger;
|
|
15
14
|
private _config;
|
|
@@ -99,9 +99,7 @@ export interface API {
|
|
|
99
99
|
username?: string;
|
|
100
100
|
password?: string;
|
|
101
101
|
}
|
|
102
|
-
export
|
|
103
|
-
[key: string]: string | string[] | null;
|
|
104
|
-
}
|
|
102
|
+
export type Streams = Record<string, string | string[] | null>;
|
|
105
103
|
export interface SRTP {
|
|
106
104
|
listen: string;
|
|
107
105
|
}
|
|
@@ -136,9 +134,7 @@ export interface Ffmpeg {
|
|
|
136
134
|
output: string;
|
|
137
135
|
[key: string]: string;
|
|
138
136
|
}
|
|
139
|
-
export
|
|
140
|
-
[key: string]: Partial<HomeKitSettings> | null | undefined;
|
|
141
|
-
}
|
|
137
|
+
export type HomeKit = Record<string, Partial<HomeKitSettings> | null | undefined>;
|
|
142
138
|
export interface Hass {
|
|
143
139
|
config: string;
|
|
144
140
|
}
|
|
@@ -151,9 +147,7 @@ export interface HomeKitSettings {
|
|
|
151
147
|
export interface Webtorrent {
|
|
152
148
|
shares: Shares;
|
|
153
149
|
}
|
|
154
|
-
export
|
|
155
|
-
[key: string]: Partial<ShareSettings>;
|
|
156
|
-
}
|
|
150
|
+
export type Shares = Record<string, Partial<ShareSettings>>;
|
|
157
151
|
export interface ShareSettings {
|
|
158
152
|
pwd: string;
|
|
159
153
|
src: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
export type * from '../../packages/common/src/nats/messageQueue.js';
|
|
1
2
|
export { Subscribed as SubscribedImp } from '../../packages/common/src/utils/subscribed.js';
|
|
2
3
|
export * from '../../packages/plugineer/src/polyglot/node/camera/polygon.js';
|
|
3
4
|
export * from '../../packages/plugineer/src/polyglot/node/plugins/schema.js';
|
|
4
5
|
export * from '../../packages/plugineer/src/polyglot/node/plugins/types.js';
|
|
5
|
-
export type * from '../../packages/plugineer/src/utils/messageQueue.js';
|
|
6
6
|
export * from '../../packages/types/src/index.js';
|
|
7
7
|
export type * from '../../server/src/api/database/types.js';
|
|
8
8
|
export type * from '../../server/src/api/go2rtc/types.js';
|