camstreamerlib 5.0.0-5bbcf7f → 5.0.1-5fad3e0

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 (62) hide show
  1. package/README.md +18 -0
  2. package/cjs/CamOverlayAPI.d.ts +4 -19
  3. package/cjs/CamStreamerAPI.d.ts +2 -21
  4. package/cjs/CamSwitcherAPI.d.ts +2 -1
  5. package/cjs/CamSwitcherAPI.js +2 -0
  6. package/cjs/PlaneTrackerAPI.d.ts +13 -76
  7. package/cjs/VapixAPI.d.ts +5 -19
  8. package/cjs/VapixAPI.js +7 -6
  9. package/cjs/bin/CreatePackage.js +17 -7
  10. package/cjs/internal/posixTimeZone.d.ts +1 -0
  11. package/cjs/internal/posixTimeZone.js +6 -0
  12. package/cjs/internal/posixTimeZone.test.d.ts +1 -0
  13. package/cjs/internal/posixTimeZone.test.js +23 -0
  14. package/cjs/internal/transformers.d.ts +4 -4
  15. package/cjs/internal/utils.js +3 -3
  16. package/cjs/node/CamOverlayDrawingAPI.d.ts +0 -3
  17. package/cjs/node/CamOverlayPainter/Frame.d.ts +0 -1
  18. package/cjs/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
  19. package/cjs/node/CamOverlayPainter/ResourceManager.js +17 -7
  20. package/cjs/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
  21. package/cjs/node/DefaultClient.d.ts +0 -2
  22. package/cjs/node/Digest.js +17 -7
  23. package/cjs/node/HttpRequestSender.d.ts +0 -2
  24. package/cjs/node/HttpRequestSender.test.js +17 -7
  25. package/cjs/node/HttpServer.d.ts +0 -2
  26. package/cjs/node/HttpServer.js +17 -7
  27. package/cjs/node/TimeZoneDaemon.js +1 -2
  28. package/cjs/node/VapixEvents.js +1 -1
  29. package/cjs/node/WsClient.js +1 -1
  30. package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +14 -456
  31. package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +20 -1818
  32. package/cjs/types/CamSwitcherAPI.d.ts +1 -0
  33. package/cjs/types/CamSwitcherAPI.js +1 -0
  34. package/cjs/web/WsClient.js +1 -1
  35. package/esm/CamSwitcherAPI.js +2 -0
  36. package/esm/VapixAPI.js +7 -6
  37. package/esm/internal/posixTimeZone.js +2 -0
  38. package/esm/internal/posixTimeZone.test.js +21 -0
  39. package/esm/node/TimeZoneDaemon.js +1 -2
  40. package/esm/node/VapixEvents.js +1 -1
  41. package/esm/node/WsClient.js +1 -1
  42. package/esm/types/CamSwitcherAPI.js +1 -0
  43. package/esm/web/WsClient.js +1 -1
  44. package/package.json +6 -7
  45. package/types/CamOverlayAPI.d.ts +4 -19
  46. package/types/CamStreamerAPI.d.ts +2 -21
  47. package/types/CamSwitcherAPI.d.ts +2 -1
  48. package/types/PlaneTrackerAPI.d.ts +13 -76
  49. package/types/VapixAPI.d.ts +5 -19
  50. package/types/internal/posixTimeZone.d.ts +1 -0
  51. package/types/internal/posixTimeZone.test.d.ts +1 -0
  52. package/types/internal/transformers.d.ts +4 -4
  53. package/types/node/CamOverlayDrawingAPI.d.ts +0 -3
  54. package/types/node/CamOverlayPainter/Frame.d.ts +0 -1
  55. package/types/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
  56. package/types/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
  57. package/types/node/DefaultClient.d.ts +0 -2
  58. package/types/node/HttpRequestSender.d.ts +0 -2
  59. package/types/node/HttpServer.d.ts +0 -2
  60. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +14 -456
  61. package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +20 -1818
  62. 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
 
@@ -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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
669
- custom: "custom";
670
- image: "image";
671
- }>;
656
+ background: "custom" | "image";
672
657
  image: string;
673
658
  customAreaColor: string;
674
659
  customAreaWidth: number;
@@ -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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
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
  } | {
@@ -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 | undefined, submitter?: HTMLElement | null | undefined): FormData;
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;
@@ -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,
@@ -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<z.core.$InferEnumOutput<{
220
- adsb: "adsb";
221
- remoteId: "remoteId";
222
- }>, {
218
+ getDomainList(options?: THttpRequestOptions): Promise<Partial<Record<"adsb" | "remoteId", {
223
219
  uiName: string;
224
- icon: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
282
- adsb: "adsb";
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: z.core.$InferEnumOutput<{
300
- adsb: "adsb";
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: z.core.$InferEnumOutput<{
317
- adsb: "adsb";
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
348
- all: "all";
349
- arrival: "arrival";
350
- departure: "departure";
351
- }>;
295
+ flightDirection: "all" | "arrival" | "departure";
352
296
  weight: number;
353
- perimeter: z.core.$InferEnumOutput<{
354
- none: "none";
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 | undefined, submitter?: HTMLElement | null | undefined): FormData;
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
103
- open: "open";
104
- closed: "closed";
105
- }>;
97
+ state: "open" | "closed";
106
98
  configurable: boolean;
107
99
  usage: string;
108
- direction: z.core.$InferEnumOutput<{
109
- output: "output";
110
- input: "input";
111
- }>;
100
+ direction: "output" | "input";
112
101
  name: string;
113
- normalState: z.core.$InferEnumOutput<{
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
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VapixAPI = void 0;
4
4
  const utils_1 = require("./internal/utils");
5
+ const posixTimeZone_1 = require("./internal/posixTimeZone");
5
6
  const VapixAPI_1 = require("./types/VapixAPI");
6
7
  const errors_1 = require("./errors/errors");
7
8
  const zod_1 = require("zod");
@@ -159,13 +160,13 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
159
160
  }
160
161
  catch (error) {
161
162
  console.warn('Could not retreive timezone from either API endpoints, reading param.cgi');
162
- const posixTimezone = (await this.getParameter('Time.POSIXTimeZone', options))['Time.POSIXTimeZone'];
163
- if (posixTimezone !== undefined) {
164
- return zod_1.z.string().parse(posixTimezone);
165
- }
166
- else {
163
+ const params = await this.getParameter(['Time.POSIXTimeZone', 'Time.DST.Enabled'], options);
164
+ const posixTimezone = params['Time.POSIXTimeZone'];
165
+ if (posixTimezone === undefined) {
167
166
  throw error;
168
167
  }
168
+ const posix = zod_1.z.string().parse(posixTimezone);
169
+ return params['Time.DST.Enabled'] === 'no' ? (0, posixTimeZone_1.stripPosixDst)(posix) : posix;
169
170
  }
170
171
  }
171
172
  async getAllDateTimeInfo(options) {
@@ -636,7 +637,7 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
636
637
  headers: {
637
638
  contentType: 'application/octet-stream',
638
639
  },
639
- timeout: options?.timeout ?? 300000,
640
+ timeout: options?.timeout ?? 300_000,
640
641
  });
641
642
  if (!res.ok) {
642
643
  throw new errors_1.ErrorWithResponse(res);
@@ -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 (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
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
  };
@@ -0,0 +1 @@
1
+ export declare const stripPosixDst: (posix: string) => string;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripPosixDst = void 0;
4
+ const POSIX_STANDARD_PART_REGEX = /^(<[^>]+>|[A-Za-z]{3,})[+-]?\d{1,2}(?::\d{2}){0,2}/;
5
+ const stripPosixDst = (posix) => posix.match(POSIX_STANDARD_PART_REGEX)?.[0] ?? posix;
6
+ exports.stripPosixDst = stripPosixDst;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const posixTimeZone_1 = require("./posixTimeZone");
4
+ const globals_1 = require("@jest/globals");
5
+ (0, globals_1.describe)('posixTimeZone', () => {
6
+ (0, globals_1.describe)('stripPosixDst', () => {
7
+ globals_1.test.each([
8
+ { name: 'Sydney', input: 'EST-10EST,M10.1.0,M4.1.0/3', expected: 'EST-10' },
9
+ { name: 'Honolulu', input: 'HAST10HADT,M3.2.0,M11.1.0', expected: 'HAST10' },
10
+ { name: 'Denver', input: 'MST7MDT,M3.2.0,M11.1.0', expected: 'MST7' },
11
+ { name: 'bracketed names', input: '<+10>-10<+11>,M10.1.0,M4.1.0/3', expected: '<+10>-10' },
12
+ { name: 'half-hour offset', input: 'CST-9:30CST,M10.1.0,M4.1.0/3', expected: 'CST-9:30' },
13
+ ])('removes the DST part for $name', ({ input, expected }) => {
14
+ (0, globals_1.expect)((0, posixTimeZone_1.stripPosixDst)(input)).toBe(expected);
15
+ });
16
+ globals_1.test.each(['EST-10', 'HAST10', '<+10>-10', 'CST-9:30', 'UTC0'])('keeps DST-free input %s unchanged', (input) => {
17
+ (0, globals_1.expect)((0, posixTimeZone_1.stripPosixDst)(input)).toBe(input);
18
+ });
19
+ (0, globals_1.test)('returns unparseable input unchanged', () => {
20
+ (0, globals_1.expect)((0, posixTimeZone_1.stripPosixDst)('garbage')).toBe('garbage');
21
+ });
22
+ });
23
+ });
@@ -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<T>;
3
- export declare const toCamelCaseDeep: <T extends object>(o: T) => CamelCasedPropertiesDeep<T>;
4
- export declare const toSnakeCase: <T extends object>(o: T) => SnakeCasedProperties<T>;
5
- export declare const toSnakeCaseDeep: <T extends object>(o: T) => SnakeCasedPropertiesDeep<T>;
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>;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isNullish = exports.pad = exports.isLoopPlayType = exports.isPlaylist = exports.isTracker = exports.isClip = exports.isStream = exports.isCamera = exports.arrayToUrl = exports.paramToUrl = exports.addParametersToPath = void 0;
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 {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from 'events';
3
2
  import { CamOverlayDrawingAPI } from '../CamOverlayDrawingAPI';
4
3
  import { TAlign, TCairoCreateResponse, TUploadImageResponse } from '../../types/CamOverlayDrawingAPI';
@@ -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 | undefined>;
13
- font(moniker: string): Promise<TCairoCreateResponse | undefined>;
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 (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
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,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from 'events';
3
2
  import { Options } from '../internal/types';
4
3
  import { TCamScripterEvent, TEventDeclaration, TEventUndeclaration, TCamScripterResponse } from '../types/CamScripterAPICameraEventsGenerator';
@@ -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> {
@@ -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 (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
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"));
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { FormData as UndiciFormData, Response as UndiciResponse } from 'undici';
4
2
  export type HttpRequestOptions = {
5
3
  method?: string;
@@ -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 (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
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");
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import * as http from 'http';
4
2
  import { EventEmitter } from 'events';
5
3
  export type HttpServerOptions = {