camstreamerlib 5.0.0-5bbcf7f → 5.0.0-9647f54
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/README.md +18 -0
- package/cjs/CamOverlayAPI.d.ts +4 -19
- package/cjs/CamStreamerAPI.d.ts +2 -21
- package/cjs/CamSwitcherAPI.d.ts +2 -1
- package/cjs/CamSwitcherAPI.js +2 -0
- package/cjs/PlaneTrackerAPI.d.ts +13 -76
- package/cjs/VapixAPI.d.ts +5 -19
- package/cjs/VapixAPI.js +1 -1
- package/cjs/bin/CreatePackage.js +17 -7
- package/cjs/internal/transformers.d.ts +4 -4
- package/cjs/internal/utils.js +3 -3
- package/cjs/node/CamOverlayDrawingAPI.d.ts +0 -3
- package/cjs/node/CamOverlayPainter/Frame.d.ts +0 -1
- package/cjs/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
- package/cjs/node/CamOverlayPainter/ResourceManager.js +17 -7
- package/cjs/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
- package/cjs/node/DefaultClient.d.ts +0 -2
- package/cjs/node/Digest.js +17 -7
- package/cjs/node/HttpRequestSender.d.ts +0 -2
- package/cjs/node/HttpRequestSender.test.js +17 -7
- package/cjs/node/HttpServer.d.ts +0 -2
- package/cjs/node/HttpServer.js +17 -7
- package/cjs/node/TimeZoneDaemon.js +1 -2
- package/cjs/node/VapixEvents.js +1 -1
- package/cjs/node/WsClient.js +1 -1
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +14 -456
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +20 -1818
- package/cjs/types/CamSwitcherAPI.d.ts +1 -0
- package/cjs/types/CamSwitcherAPI.js +1 -0
- package/cjs/web/WsClient.js +1 -1
- package/esm/CamSwitcherAPI.js +2 -0
- package/esm/VapixAPI.js +1 -1
- package/esm/node/TimeZoneDaemon.js +1 -2
- package/esm/node/VapixEvents.js +1 -1
- package/esm/node/WsClient.js +1 -1
- package/esm/types/CamSwitcherAPI.js +1 -0
- package/esm/web/WsClient.js +1 -1
- package/package.json +6 -7
- package/types/CamOverlayAPI.d.ts +4 -19
- package/types/CamStreamerAPI.d.ts +2 -21
- package/types/CamSwitcherAPI.d.ts +2 -1
- package/types/PlaneTrackerAPI.d.ts +13 -76
- package/types/VapixAPI.d.ts +5 -19
- package/types/internal/transformers.d.ts +4 -4
- package/types/node/CamOverlayDrawingAPI.d.ts +0 -3
- package/types/node/CamOverlayPainter/Frame.d.ts +0 -1
- package/types/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
- package/types/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
- package/types/node/DefaultClient.d.ts +0 -2
- package/types/node/HttpRequestSender.d.ts +0 -2
- package/types/node/HttpServer.d.ts +0 -2
- package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +14 -456
- package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +20 -1818
- package/types/types/CamSwitcherAPI.d.ts +1 -0
package/README.md
CHANGED
|
@@ -66,6 +66,24 @@ The library now depends on `zod` v4 (`^4.6.7`) instead of v3 (fixes [GHSA-mrhx-c
|
|
|
66
66
|
- Object keys declared as `z.unknown()` / `z.any()` are now required in the inferred types (e.g. `TGuardTour` fields, `postJsonBody` in PlaneTracker events).
|
|
67
67
|
- See the [zod v4 migration guide](https://zod.dev/v4/changelog) for changes in your own schemas.
|
|
68
68
|
|
|
69
|
+
<hr/>
|
|
70
|
+
|
|
71
|
+
### TypeScript 5.9 or Newer Required
|
|
72
|
+
|
|
73
|
+
Exported types (e.g. the camelCase/snake_case types in `CamSwitcherAPI` and `VapixAPI`) are built on `type-fest` v5, which requires TypeScript `>=5.9` with `strict: true` in your `tsconfig.json`.
|
|
74
|
+
|
|
75
|
+
<hr/>
|
|
76
|
+
|
|
77
|
+
### VapixEvents Upgraded to eventemitter2 v6
|
|
78
|
+
|
|
79
|
+
`VapixEvents` now extends `EventEmitter2` from `eventemitter2` v6. Its typings are stricter, e.g. `eventNames()` returns `(string | symbol | event[])[]` instead of `string[]`, so code relying on the old types may need to narrow the values.
|
|
80
|
+
|
|
81
|
+
<hr/>
|
|
82
|
+
|
|
83
|
+
### Node.js 18 or Newer Required
|
|
84
|
+
|
|
85
|
+
`package.json` now declares `"engines": { "node": ">=18" }`.
|
|
86
|
+
|
|
69
87
|
<hr/>
|
|
70
88
|
</details>
|
|
71
89
|
|
package/cjs/CamOverlayAPI.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IClient, TResponse } from './internal/types';
|
|
2
2
|
import { THttpRequestOptions } from './types/common';
|
|
3
|
-
import { z } from 'zod';
|
|
4
3
|
import { ImageType, TCoordinates, TField, TFile, TFileType, TFileStorageType, TService, TFileList, TStorageDataList } from './types/CamOverlayAPI';
|
|
5
4
|
import { BasicAPI } from './internal/BasicAPI';
|
|
6
5
|
export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> extends BasicAPI<Client> {
|
|
@@ -105,11 +104,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> exten
|
|
|
105
104
|
northPan: number;
|
|
106
105
|
cameraPosX: number;
|
|
107
106
|
cameraPosY: number;
|
|
108
|
-
colorScheme:
|
|
109
|
-
black: "black";
|
|
110
|
-
white: "white";
|
|
111
|
-
orange: "orange";
|
|
112
|
-
}>;
|
|
107
|
+
colorScheme: "black" | "white" | "orange";
|
|
113
108
|
showDegrees: boolean;
|
|
114
109
|
invertInput?: boolean | undefined;
|
|
115
110
|
camera?: number | undefined;
|
|
@@ -222,10 +217,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> exten
|
|
|
222
217
|
pos_y: number;
|
|
223
218
|
coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
|
|
224
219
|
clockFormat: "12h" | "24h";
|
|
225
|
-
background:
|
|
226
|
-
custom: "custom";
|
|
227
|
-
image: "image";
|
|
228
|
-
}>;
|
|
220
|
+
background: "custom" | "image";
|
|
229
221
|
image: string;
|
|
230
222
|
customAreaColor: string;
|
|
231
223
|
customAreaWidth: number;
|
|
@@ -548,11 +540,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> exten
|
|
|
548
540
|
northPan: number;
|
|
549
541
|
cameraPosX: number;
|
|
550
542
|
cameraPosY: number;
|
|
551
|
-
colorScheme:
|
|
552
|
-
black: "black";
|
|
553
|
-
white: "white";
|
|
554
|
-
orange: "orange";
|
|
555
|
-
}>;
|
|
543
|
+
colorScheme: "black" | "white" | "orange";
|
|
556
544
|
showDegrees: boolean;
|
|
557
545
|
invertInput?: boolean | undefined;
|
|
558
546
|
camera?: number | undefined;
|
|
@@ -665,10 +653,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> exten
|
|
|
665
653
|
pos_y: number;
|
|
666
654
|
coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
|
|
667
655
|
clockFormat: "12h" | "24h";
|
|
668
|
-
background:
|
|
669
|
-
custom: "custom";
|
|
670
|
-
image: "image";
|
|
671
|
-
}>;
|
|
656
|
+
background: "custom" | "image";
|
|
672
657
|
image: string;
|
|
673
658
|
customAreaColor: string;
|
|
674
659
|
customAreaWidth: number;
|
package/cjs/CamStreamerAPI.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { IClient, TResponse } from './internal/types';
|
|
3
2
|
import { TAudioFile, TAudioFileStorageType, TDiagnosticsParams, TStream } from './types/CamStreamerAPI/CamStreamerAPI';
|
|
4
3
|
import { THttpRequestOptions } from './types/common';
|
|
@@ -109,16 +108,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> exte
|
|
|
109
108
|
locationName: string;
|
|
110
109
|
locationAddress: string;
|
|
111
110
|
mapZoom: number;
|
|
112
|
-
direction:
|
|
113
|
-
N: "N";
|
|
114
|
-
NE: "NE";
|
|
115
|
-
E: "E";
|
|
116
|
-
SE: "SE";
|
|
117
|
-
S: "S";
|
|
118
|
-
SW: "SW";
|
|
119
|
-
W: "W";
|
|
120
|
-
NW: "NW";
|
|
121
|
-
}> | null;
|
|
111
|
+
direction: "N" | "NE" | "E" | "SE" | "S" | "SW" | "W" | "NW" | null;
|
|
122
112
|
position: "fix" | "rotating" | "controllable";
|
|
123
113
|
webPageUrl: string;
|
|
124
114
|
} | {
|
|
@@ -1911,16 +1901,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> exte
|
|
|
1911
1901
|
locationName: string;
|
|
1912
1902
|
locationAddress: string;
|
|
1913
1903
|
mapZoom: number;
|
|
1914
|
-
direction:
|
|
1915
|
-
N: "N";
|
|
1916
|
-
NE: "NE";
|
|
1917
|
-
E: "E";
|
|
1918
|
-
SE: "SE";
|
|
1919
|
-
S: "S";
|
|
1920
|
-
SW: "SW";
|
|
1921
|
-
W: "W";
|
|
1922
|
-
NW: "NW";
|
|
1923
|
-
}> | null;
|
|
1904
|
+
direction: "N" | "NE" | "E" | "SE" | "S" | "SW" | "W" | "NW" | null;
|
|
1924
1905
|
position: "fix" | "rotating" | "controllable";
|
|
1925
1906
|
webPageUrl: string;
|
|
1926
1907
|
} | {
|
package/cjs/CamSwitcherAPI.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
|
|
|
6
6
|
private CustomFormData;
|
|
7
7
|
private vapixAgent;
|
|
8
8
|
constructor(client: Client, CustomFormData?: {
|
|
9
|
-
new (form?: HTMLFormElement
|
|
9
|
+
new (form?: HTMLFormElement, submitter?: HTMLElement | null): FormData;
|
|
10
10
|
prototype: FormData;
|
|
11
11
|
});
|
|
12
12
|
static getProxyPath: () => string;
|
|
@@ -157,6 +157,7 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
|
|
|
157
157
|
bitrateVapixParams?: string | null | undefined;
|
|
158
158
|
audioSampleRate?: number | undefined;
|
|
159
159
|
audioChannelCount?: 1 | 2 | undefined;
|
|
160
|
+
audioBitrate?: number | undefined;
|
|
160
161
|
keyboard?: {
|
|
161
162
|
fromSource: string | null;
|
|
162
163
|
none: string | null;
|
package/cjs/CamSwitcherAPI.js
CHANGED
|
@@ -156,6 +156,7 @@ class CamSwitcherAPI extends BasicAPI_1.BasicAPI {
|
|
|
156
156
|
audio: {
|
|
157
157
|
sampleRate: data.audioSampleRate,
|
|
158
158
|
channelCount: data.audioChannelCount,
|
|
159
|
+
bitrate: data.audioBitrate,
|
|
159
160
|
},
|
|
160
161
|
keyboard: data.keyboard,
|
|
161
162
|
};
|
|
@@ -207,6 +208,7 @@ class CamSwitcherAPI extends BasicAPI_1.BasicAPI {
|
|
|
207
208
|
const settings = {
|
|
208
209
|
audioSampleRate: saveData.audio?.sampleRate,
|
|
209
210
|
audioChannelCount: saveData.audio?.channelCount,
|
|
211
|
+
audioBitrate: saveData.audio?.bitrate,
|
|
210
212
|
keyboard: saveData.keyboard,
|
|
211
213
|
fps: saveData.video.fps,
|
|
212
214
|
resolution: saveData.video.resolution,
|
package/cjs/PlaneTrackerAPI.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { IClient, TResponse } from './internal/types';
|
|
3
2
|
import { ICAO, TBlackList, TCameraSettings, TConnection, TExportDataType, TGetIcaoByOption, TImportDataType, TMilestoneCameraOption, TPriorityList, TTrackingMode, TWhiteList, TZones } from './types/PlaneTrackerAPI';
|
|
4
3
|
import { THttpRequestOptions } from './types/common';
|
|
@@ -216,34 +215,13 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
216
215
|
}>;
|
|
217
216
|
exportAppSettings(dataType: TExportDataType, options?: THttpRequestOptions): Promise<ReturnType<Awaited<ReturnType<Client["get"]>>["blob"]>>;
|
|
218
217
|
importAppSettings(dataType: TImportDataType, formData: Parameters<Client['post']>[0]['data'], options?: THttpRequestOptions): Promise<void>;
|
|
219
|
-
getDomainList(options?: THttpRequestOptions): Promise<Partial<Record<
|
|
220
|
-
adsb: "adsb";
|
|
221
|
-
remoteId: "remoteId";
|
|
222
|
-
}>, {
|
|
218
|
+
getDomainList(options?: THttpRequestOptions): Promise<Partial<Record<"adsb" | "remoteId", {
|
|
223
219
|
uiName: string;
|
|
224
|
-
icon:
|
|
225
|
-
unknown: "unknown";
|
|
226
|
-
small: "small";
|
|
227
|
-
drone: "drone";
|
|
228
|
-
large: "large";
|
|
229
|
-
heavy: "heavy";
|
|
230
|
-
helicopter: "helicopter";
|
|
231
|
-
operator: "operator";
|
|
232
|
-
vehicle: "vehicle";
|
|
233
|
-
}>;
|
|
220
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
234
221
|
categoryList: {
|
|
235
222
|
categoryId: string;
|
|
236
223
|
uiName: string;
|
|
237
|
-
icon:
|
|
238
|
-
unknown: "unknown";
|
|
239
|
-
small: "small";
|
|
240
|
-
drone: "drone";
|
|
241
|
-
large: "large";
|
|
242
|
-
heavy: "heavy";
|
|
243
|
-
helicopter: "helicopter";
|
|
244
|
-
operator: "operator";
|
|
245
|
-
vehicle: "vehicle";
|
|
246
|
-
}>;
|
|
224
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
247
225
|
}[];
|
|
248
226
|
}>>>;
|
|
249
227
|
fetchFlightInfo(targetId: string, options?: THttpRequestOptions): Promise<{
|
|
@@ -278,17 +256,8 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
278
256
|
getIcao(by: TGetIcaoByOption, value: string, options?: THttpRequestOptions): Promise<string>;
|
|
279
257
|
getPriorityList(options?: THttpRequestOptions): Promise<{
|
|
280
258
|
list: {
|
|
281
|
-
domain:
|
|
282
|
-
|
|
283
|
-
remoteId: "remoteId";
|
|
284
|
-
}>;
|
|
285
|
-
idType: z.core.$InferEnumOutput<{
|
|
286
|
-
icao: "icao";
|
|
287
|
-
type_icao: "type_icao";
|
|
288
|
-
drone_mac: "drone_mac";
|
|
289
|
-
operator_mac: "operator_mac";
|
|
290
|
-
category: "category";
|
|
291
|
-
}>;
|
|
259
|
+
domain: "adsb" | "remoteId";
|
|
260
|
+
idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
|
|
292
261
|
idValue: string;
|
|
293
262
|
priority: number;
|
|
294
263
|
}[];
|
|
@@ -296,34 +265,16 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
296
265
|
setPriorityList(priorityList: TPriorityList, options?: THttpRequestOptions): Promise<void>;
|
|
297
266
|
getWhiteList(options?: THttpRequestOptions): Promise<{
|
|
298
267
|
list: {
|
|
299
|
-
domain:
|
|
300
|
-
|
|
301
|
-
remoteId: "remoteId";
|
|
302
|
-
}>;
|
|
303
|
-
idType: z.core.$InferEnumOutput<{
|
|
304
|
-
icao: "icao";
|
|
305
|
-
type_icao: "type_icao";
|
|
306
|
-
drone_mac: "drone_mac";
|
|
307
|
-
operator_mac: "operator_mac";
|
|
308
|
-
category: "category";
|
|
309
|
-
}>;
|
|
268
|
+
domain: "adsb" | "remoteId";
|
|
269
|
+
idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
|
|
310
270
|
idValue: string;
|
|
311
271
|
}[];
|
|
312
272
|
}>;
|
|
313
273
|
setWhiteList(whiteList: TWhiteList, options?: THttpRequestOptions): Promise<void>;
|
|
314
274
|
getBlackList(options?: THttpRequestOptions): Promise<{
|
|
315
275
|
list: {
|
|
316
|
-
domain:
|
|
317
|
-
|
|
318
|
-
remoteId: "remoteId";
|
|
319
|
-
}>;
|
|
320
|
-
idType: z.core.$InferEnumOutput<{
|
|
321
|
-
icao: "icao";
|
|
322
|
-
type_icao: "type_icao";
|
|
323
|
-
drone_mac: "drone_mac";
|
|
324
|
-
operator_mac: "operator_mac";
|
|
325
|
-
category: "category";
|
|
326
|
-
}>;
|
|
276
|
+
domain: "adsb" | "remoteId";
|
|
277
|
+
idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
|
|
327
278
|
idValue: string;
|
|
328
279
|
}[];
|
|
329
280
|
}>;
|
|
@@ -331,10 +282,7 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
331
282
|
fetchMapInfo(options?: THttpRequestOptions): Promise<{
|
|
332
283
|
minZoom: number;
|
|
333
284
|
maxZoom: number;
|
|
334
|
-
mapTypes:
|
|
335
|
-
roadmap: "roadmap";
|
|
336
|
-
satellite: "satellite";
|
|
337
|
-
}>[];
|
|
285
|
+
mapTypes: ("roadmap" | "satellite")[];
|
|
338
286
|
tileSize: number;
|
|
339
287
|
}>;
|
|
340
288
|
getZones(options?: THttpRequestOptions): Promise<{
|
|
@@ -344,21 +292,10 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
344
292
|
lat: number;
|
|
345
293
|
lon: number;
|
|
346
294
|
}[];
|
|
347
|
-
flightDirection:
|
|
348
|
-
all: "all";
|
|
349
|
-
arrival: "arrival";
|
|
350
|
-
departure: "departure";
|
|
351
|
-
}>;
|
|
295
|
+
flightDirection: "all" | "arrival" | "departure";
|
|
352
296
|
weight: number;
|
|
353
|
-
perimeter:
|
|
354
|
-
|
|
355
|
-
outer: "outer";
|
|
356
|
-
inner: "inner";
|
|
357
|
-
}>;
|
|
358
|
-
trackingDomains: z.core.$InferEnumOutput<{
|
|
359
|
-
adsb: "adsb";
|
|
360
|
-
remoteId: "remoteId";
|
|
361
|
-
}>[];
|
|
297
|
+
perimeter: "none" | "outer" | "inner";
|
|
298
|
+
trackingDomains: ("adsb" | "remoteId")[];
|
|
362
299
|
name?: string | undefined;
|
|
363
300
|
minAltitudeAmsl?: number | undefined;
|
|
364
301
|
maxAltitudeAmsl?: number | undefined;
|
package/cjs/VapixAPI.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { IClient, TParameters, TResponse } from './internal/types';
|
|
2
2
|
import { TAudioDevice, TPortSetSchema, TPortSequenceStateSchema } from './types/VapixAPI';
|
|
3
3
|
import { TCameraImageConfig, THttpRequestOptions } from './types/common';
|
|
4
|
-
import { z } from 'zod';
|
|
5
4
|
import { BasicAPI } from './internal/BasicAPI';
|
|
6
5
|
export declare class VapixAPI<Client extends IClient<TResponse, any>> extends BasicAPI<Client> {
|
|
7
6
|
private CustomFormData;
|
|
8
7
|
constructor(client: Client, CustomFormData?: {
|
|
9
|
-
new (form?: HTMLFormElement
|
|
8
|
+
new (form?: HTMLFormElement, submitter?: HTMLElement | null): FormData;
|
|
10
9
|
prototype: FormData;
|
|
11
10
|
});
|
|
12
11
|
postUrlEncoded(path: string, parameters?: TParameters, headers?: Record<string, string>, options?: THttpRequestOptions): Promise<TResponse>;
|
|
@@ -47,11 +46,7 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
|
|
|
47
46
|
getHeaders(options?: THttpRequestOptions): Promise<Record<string, string>>;
|
|
48
47
|
setHeaders(headers: Record<string, string>, options?: THttpRequestOptions): Promise<void>;
|
|
49
48
|
checkSDCard(options?: THttpRequestOptions): Promise<{
|
|
50
|
-
status:
|
|
51
|
-
OK: "OK";
|
|
52
|
-
connected: "connected";
|
|
53
|
-
disconnected: "disconnected";
|
|
54
|
-
}>;
|
|
49
|
+
status: "OK" | "connected" | "disconnected";
|
|
55
50
|
totalSize: number;
|
|
56
51
|
freeSize: number;
|
|
57
52
|
}>;
|
|
@@ -99,21 +94,12 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
|
|
|
99
94
|
}>;
|
|
100
95
|
getPorts(options?: THttpRequestOptions): Promise<{
|
|
101
96
|
port: string;
|
|
102
|
-
state:
|
|
103
|
-
open: "open";
|
|
104
|
-
closed: "closed";
|
|
105
|
-
}>;
|
|
97
|
+
state: "open" | "closed";
|
|
106
98
|
configurable: boolean;
|
|
107
99
|
usage: string;
|
|
108
|
-
direction:
|
|
109
|
-
output: "output";
|
|
110
|
-
input: "input";
|
|
111
|
-
}>;
|
|
100
|
+
direction: "output" | "input";
|
|
112
101
|
name: string;
|
|
113
|
-
normalState:
|
|
114
|
-
open: "open";
|
|
115
|
-
closed: "closed";
|
|
116
|
-
}>;
|
|
102
|
+
normalState: "open" | "closed";
|
|
117
103
|
readonly?: boolean | undefined;
|
|
118
104
|
}[]>;
|
|
119
105
|
setPorts(ports: TPortSetSchema[], options?: THttpRequestOptions): Promise<void>;
|
package/cjs/VapixAPI.js
CHANGED
|
@@ -636,7 +636,7 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
|
|
|
636
636
|
headers: {
|
|
637
637
|
contentType: 'application/octet-stream',
|
|
638
638
|
},
|
|
639
|
-
timeout: options?.timeout ??
|
|
639
|
+
timeout: options?.timeout ?? 300_000,
|
|
640
640
|
});
|
|
641
641
|
if (!res.ok) {
|
|
642
642
|
throw new errors_1.ErrorWithResponse(res);
|
package/cjs/bin/CreatePackage.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CamelCasedProperties, CamelCasedPropertiesDeep, SnakeCasedProperties, SnakeCasedPropertiesDeep } from 'type-fest';
|
|
2
|
-
export declare const toCamelCase: <T extends object>(o: T) => CamelCasedProperties<
|
|
3
|
-
export declare const toCamelCaseDeep: <T extends object>(o: T) => CamelCasedPropertiesDeep<
|
|
4
|
-
export declare const toSnakeCase: <T extends object>(o: T) => SnakeCasedProperties<
|
|
5
|
-
export declare const toSnakeCaseDeep: <T extends object>(o: T) => SnakeCasedPropertiesDeep<
|
|
2
|
+
export declare const toCamelCase: <T extends object>(o: T) => CamelCasedProperties<typeof o>;
|
|
3
|
+
export declare const toCamelCaseDeep: <T extends object>(o: T) => CamelCasedPropertiesDeep<typeof o>;
|
|
4
|
+
export declare const toSnakeCase: <T extends object>(o: T) => SnakeCasedProperties<typeof o>;
|
|
5
|
+
export declare const toSnakeCaseDeep: <T extends object>(o: T) => SnakeCasedPropertiesDeep<typeof o>;
|
package/cjs/internal/utils.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isLoopPlayType = exports.isPlaylist = exports.isTracker = exports.isClip = exports.isStream = exports.isCamera = exports.arrayToUrl = exports.paramToUrl = exports.addParametersToPath = void 0;
|
|
4
|
+
exports.pad = pad;
|
|
5
|
+
exports.isNullish = isNullish;
|
|
4
6
|
const addParametersToPath = (path, params) => {
|
|
5
7
|
if (params === undefined || Object.keys(params).length === 0) {
|
|
6
8
|
return path;
|
|
@@ -51,8 +53,6 @@ function pad(num, size) {
|
|
|
51
53
|
.join('0')
|
|
52
54
|
.slice(-size));
|
|
53
55
|
}
|
|
54
|
-
exports.pad = pad;
|
|
55
56
|
function isNullish(value) {
|
|
56
57
|
return value === null || value === undefined;
|
|
57
58
|
}
|
|
58
|
-
exports.isNullish = isNullish;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
1
|
import { EventEmitter } from 'events';
|
|
5
2
|
import { CamOverlayDrawingOptions, TCairoCreateResponse, TCairoResponse, TUploadImageResponse, TWriteTextParams } from '../types/CamOverlayDrawingAPI';
|
|
6
3
|
export declare class CamOverlayDrawingAPI extends EventEmitter {
|
|
@@ -9,7 +9,7 @@ export declare class ResourceManager {
|
|
|
9
9
|
constructor(co: CamOverlayDrawingAPI);
|
|
10
10
|
registerImage(moniker: string, fileName: string): void;
|
|
11
11
|
registerFont(moniker: string, fileName: string): void;
|
|
12
|
-
image(moniker: string): Promise<TUploadImageResponse
|
|
13
|
-
font(moniker: string): Promise<TCairoCreateResponse
|
|
12
|
+
image(moniker: string): Promise<TUploadImageResponse>;
|
|
13
|
+
font(moniker: string): Promise<TCairoCreateResponse>;
|
|
14
14
|
clear(): void;
|
|
15
15
|
}
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.ResourceManager = void 0;
|
|
27
37
|
const fs = __importStar(require("fs/promises"));
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { IClient, HttpOptions, TGetParams, TPostParams } from '../internal/types';
|
|
4
2
|
import { FormData as UndiciFormData, Response as UndiciResponse } from 'undici';
|
|
5
3
|
export declare class DefaultClient implements IClient<UndiciResponse, UndiciFormData | Buffer> {
|
package/cjs/node/Digest.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.Digest = void 0;
|
|
27
37
|
const crypto = __importStar(require("crypto"));
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const http = __importStar(require("http"));
|
|
27
37
|
const undici_1 = require("undici");
|
package/cjs/node/HttpServer.d.ts
CHANGED
package/cjs/node/HttpServer.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.HttpServer = void 0;
|
|
27
37
|
const http = __importStar(require("http"));
|
|
@@ -16,8 +16,7 @@ class TimeZoneDaemon {
|
|
|
16
16
|
try {
|
|
17
17
|
const { stdout } = await execPromise('timedatectl show -p Timezone --value');
|
|
18
18
|
const systemTimezone = stdout.toString().trim();
|
|
19
|
-
|
|
20
|
-
if (systemTimezone !== nodeTimezone) {
|
|
19
|
+
if (systemTimezone !== '' && systemTimezone !== process.env.TZ) {
|
|
21
20
|
process.env.TZ = systemTimezone;
|
|
22
21
|
}
|
|
23
22
|
}
|
package/cjs/node/VapixEvents.js
CHANGED
|
@@ -46,7 +46,7 @@ class VapixEvents extends eventemitter2_1.EventEmitter2 {
|
|
|
46
46
|
const topics = [];
|
|
47
47
|
const eventNames = this.eventNames();
|
|
48
48
|
for (const eventName of eventNames) {
|
|
49
|
-
if (!this.isReservedEventName(eventName)) {
|
|
49
|
+
if (typeof eventName === 'string' && !this.isReservedEventName(eventName)) {
|
|
50
50
|
const topic = {
|
|
51
51
|
topicFilter: eventName,
|
|
52
52
|
};
|
package/cjs/node/WsClient.js
CHANGED
|
@@ -25,7 +25,7 @@ class WsClient {
|
|
|
25
25
|
const protocol = tls ? 'wss' : 'ws';
|
|
26
26
|
this.address = `${protocol}://${host}:${port}${options.address}`;
|
|
27
27
|
this.digestAddress = options.address;
|
|
28
|
-
this.pingInterval = options.pingInterval ??
|
|
28
|
+
this.pingInterval = options.pingInterval ?? 30_000;
|
|
29
29
|
this.protocol = options.protocol;
|
|
30
30
|
this.wsOptions = {
|
|
31
31
|
auth: `${this.user}:${this.pass}`,
|